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