@@ -287,7 +287,10 @@ func (c *controller) addServiceBinding(svcName, svcID, nID, eID, containerName s
287287 ok , entries := s .assignIPToEndpoint (ip .String (), eID )
288288 if ! ok || entries > 1 {
289289 setStr , b := s .printIPToEndpoint (ip .String ())
290- logrus .Warnf ("addServiceBinding %s possible transient state ok:%t entries:%d set:%t %s" , eID , ok , entries , b , setStr [:maxSetStringLen ])
290+ if len (setStr ) > maxSetStringLen {
291+ setStr = setStr [:maxSetStringLen ]
292+ }
293+ logrus .Warnf ("addServiceBinding %s possible transient state ok:%t entries:%d set:%t %s" , eID , ok , entries , b , setStr )
291294 }
292295
293296 // Add loadbalancer service and backend in all sandboxes in
@@ -355,7 +358,10 @@ func (c *controller) rmServiceBinding(svcName, svcID, nID, eID, containerName st
355358 ok , entries := s .removeIPToEndpoint (ip .String (), eID )
356359 if ! ok || entries > 0 {
357360 setStr , b := s .printIPToEndpoint (ip .String ())
358- logrus .Warnf ("rmServiceBinding %s possible transient state ok:%t entries:%d set:%t %s" , eID , ok , entries , b , setStr [:maxSetStringLen ])
361+ if len (setStr ) > maxSetStringLen {
362+ setStr = setStr [:maxSetStringLen ]
363+ }
364+ logrus .Warnf ("rmServiceBinding %s possible transient state ok:%t entries:%d set:%t %s" , eID , ok , entries , b , setStr )
359365 }
360366
361367 // Remove loadbalancer service(if needed) and backend in all
0 commit comments