@@ -130,7 +130,7 @@ func (p *pipelineImpl) Run(ctx context.Context, clusterID string, msg *central.M
130130 if p .rateLimiter == nil {
131131 log .Warnf ("No rate limiter found for %s. Dropping VM index report %s from cluster %s" , rateLimiterWorkload , index .GetId (), clusterID )
132132 if conn != nil && conn .HasCapability (centralsensor .SensorACKSupport ) {
133- sendVMIndexReportResponse (ctx , index .GetId (), central .SensorACK_NACK , "nil rate limiter" , injector )
133+ sendVMIndexReportResponse (ctx , clusterID , index .GetId (), central .SensorACK_NACK , "nil rate limiter" , injector )
134134 }
135135 return nil // Don't return error - would cause pipeline retry
136136 }
@@ -139,7 +139,7 @@ func (p *pipelineImpl) Run(ctx context.Context, clusterID string, msg *central.M
139139 if ! allowed {
140140 log .Infof ("Dropping VM index report %s from cluster %s: %s" , index .GetId (), clusterID , reason )
141141 if conn != nil && conn .HasCapability (centralsensor .SensorACKSupport ) {
142- sendVMIndexReportResponse (ctx , index .GetId (), central .SensorACK_NACK , reason , injector )
142+ sendVMIndexReportResponse (ctx , clusterID , index .GetId (), central .SensorACK_NACK , reason , injector )
143143 }
144144 return nil // Don't return error - would cause pipeline retry
145145 }
@@ -169,15 +169,15 @@ func (p *pipelineImpl) Run(ctx context.Context, clusterID string, msg *central.M
169169
170170 // Send ACK to Sensor if Sensor supports it
171171 if conn != nil && conn .HasCapability (centralsensor .SensorACKSupport ) {
172- sendVMIndexReportResponse (ctx , index .GetId (), central .SensorACK_ACK , "" , injector )
172+ sendVMIndexReportResponse (ctx , clusterID , index .GetId (), central .SensorACK_ACK , "" , injector )
173173 }
174174 return nil
175175}
176176
177177// sendVMIndexReportResponse sends an ACK or NACK for a VM index report.
178- func sendVMIndexReportResponse (ctx context.Context , vmID string , action central.SensorACK_Action , reason string , injector common.MessageInjector ) {
178+ func sendVMIndexReportResponse (ctx context.Context , clusterID , vmID string , action central.SensorACK_Action , reason string , injector common.MessageInjector ) {
179179 if injector == nil {
180- log .Debugf ("Cannot send %s to Sensor - no injector" , action .String ())
180+ log .Debugf ("Cannot send %s to Sensor for cluster %s - no injector" , action .String (), clusterID )
181181 return
182182 }
183183 msg := & central.MsgToSensor {
@@ -191,8 +191,8 @@ func sendVMIndexReportResponse(ctx context.Context, vmID string, action central.
191191 },
192192 }
193193 if err := injector .InjectMessage (ctx , msg ); err != nil {
194- log .Warnf ("Failed sending VM index report %s for %s : %v" , action .String (), vmID , err )
194+ log .Warnf ("Failed sending VM index report %s for VM %s in cluster %s : %v" , action .String (), vmID , clusterID , err )
195195 } else {
196- log .Debugf ("Sent VM index report %s for %s (reason=%q)" , action .String (), vmID , reason )
196+ log .Debugf ("Sent VM index report %s for VM %s in cluster %s (reason=%q)" , action .String (), vmID , clusterID , reason )
197197 }
198198}
0 commit comments