Include backing node request id in metastatic log

When we are satisfying a metastatic request by creating a new backing
node, we can end up logging the message:

  Assigned node 001 to backing node None slot 0

Which is not helpful when trying to find out which backing node 001
was assigned to.  We don't know the node id yet since it hasn't been
created, but in this case we can log the request id.  That can then
be associated with the actual node id in later log entries.

Change-Id: I409917319ab592c997f47e7f69636860fad8c2c9
This commit is contained in:
James E. Blair 2022-06-30 16:05:21 -07:00
parent eb9121a733
commit 86e5ff9ed6
1 changed files with 3 additions and 1 deletions

View File

@ -388,9 +388,11 @@ class MetastaticAdapter(statemachine.Adapter):
label.name, label.max_parallel_jobs)
backing_node_record.request_id = req.id
self._addBackingNode(label.name, backing_node_record)
backing_node_log = (backing_node_record.node_id or
f'request {backing_node_record.request_id}')
slot = backing_node_record.allocateSlot(node_id)
self.log.info("Assigned node %s to backing node %s slot %s",
node_id, backing_node_record.node_id, slot)
node_id, backing_node_log, slot)
return backing_node_record, slot
def _addBackingNode(self, label_name, backing_node_record):