From 762adb882a486e6b9687cf46d418d1a930f9b4a7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 21 Oct 2025 13:04:30 -0400 Subject: [PATCH] Track client address on checkin When doing DHCP deployment in particular, it's good to track what the actual ip was. --- confluent_server/confluent/config/attributes.py | 3 +++ confluent_server/confluent/selfservice.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/confluent_server/confluent/config/attributes.py b/confluent_server/confluent/config/attributes.py index 5e0e97e7..72518ab2 100644 --- a/confluent_server/confluent/config/attributes.py +++ b/confluent_server/confluent/config/attributes.py @@ -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. ' diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index c0b185af..72ffb765 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -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