@@ -1024,7 +1024,10 @@ func (a *Allocator) allocateNode(ctx context.Context, node *api.Node, existingAd
1024
1024
1025
1025
lbAttachment .Network = network .Copy ()
1026
1026
if err := a .netCtx .nwkAllocator .AllocateAttachment (node , lbAttachment ); err != nil {
1027
- log .G (ctx ).WithError (err ).Errorf ("Failed to allocate network resources for node %s" , node .ID )
1027
+ log .G (ctx ).WithError (err ).WithField ("network.id" , lbAttachment .Network .ID ).Errorf (
1028
+ "failed to allocate network resources for node %s" ,
1029
+ node .ID ,
1030
+ )
1028
1031
// TODO: Should we add a unallocatedNode and retry allocating resources like we do for network, tasks, services?
1029
1032
// right now, we will only retry allocating network resources for the node when the node is updated.
1030
1033
continue
@@ -1057,9 +1060,9 @@ func (a *Allocator) allocateNode(ctx context.Context, node *api.Node, existingAd
1057
1060
1058
1061
if err := a .netCtx .nwkAllocator .DeallocateAttachment (node , na ); err != nil {
1059
1062
// failed to deallocate; there's nothing we can do besides log an error and keep going
1060
- log .G (ctx ).WithError (err ).Errorf (
1061
- "error deallocating attachment for network %v on node %v " ,
1062
- na . Network . ID , node .ID ,
1063
+ log .G (ctx ).WithError (err ).WithField ( "network.id" , na . Network . ID ). Errorf (
1064
+ "failed to deallocate network resources on node %s " ,
1065
+ node .ID ,
1063
1066
)
1064
1067
}
1065
1068
// strictly speaking, nothing was allocated, but something was
0 commit comments