2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 10:32:31 +00:00

Track client address on checkin

When doing DHCP deployment in particular, it's good to track what the actual ip was.
This commit is contained in:
Jarrod Johnson
2025-10-21 13:04:30 -04:00
parent 36687069aa
commit 762adb882a
2 changed files with 6 additions and 0 deletions

View File

@@ -215,6 +215,9 @@ node = {
'Using this requires that collective members be '
'defined as nodes for noderange expansion')
},
'deployment.client_ip': {
'description': ('Client IP used when most recently reporting state.')
},
'deployment.lock': {
'description': ('Indicates whether deployment actions should be impeded. '
'If locked, it indicates that a pending profile should not be applied. '

View File

@@ -466,6 +466,9 @@ def handle_request(env, start_response):
statusstr = update.get('state', None)
statusdetail = update.get('state_detail', None)
didstateupdate = False
if statusstr or 'status' in update:
cfg.set_node_attributes({nodename: {
'deployment.client_ip': {'value': clientip}}})
if statusstr:
cfg.set_node_attributes({nodename: {'deployment.state': statusstr}})
didstateupdate = True