From 3b6b88c6fd4ad8b20a9ccac71546388f27c2c4f6 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 23 Nov 2026 02:59:12 +0100 Subject: [PATCH 1/6] Document -e and -x options in nodeshell man page --- confluent_client/doc/man/nodeshell.ronn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/confluent_client/doc/man/nodeshell.ronn b/confluent_client/doc/man/nodeshell.ronn index b29e6d97..59199640 100644 --- a/confluent_client/doc/man/nodeshell.ronn +++ b/confluent_client/doc/man/nodeshell.ronn @@ -17,6 +17,9 @@ as stderr, unlike psh which combines all stdout and stderr into stdout. * `-c COUNT`, `-f COUNT`, `--count=COUNT` Specify the maximum number of instances to run concurrently +* `-e ENVVAR`, `--environmentpassword=ENVVAR` + Environment variable containing the password to use for ssh + * `-l LOGINNAME`, `--loginname=LOGINNAME` Username to use when connecting, defaults to current user. @@ -40,6 +43,9 @@ as stderr, unlike psh which combines all stdout and stderr into stdout. * `-t TIMEOUT`, `--timeout=TIMEOUT` Timeout in seconds for each node ssh connection attempt +* `-x`, `--noexpression` + Suppress confluent attribute expression expansion of the command + ## EXAMPLES * Running `echo hi` on for nodes: From 4c12fb85fcae30d26a9d33c30155836c0f95fdb7 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 23 Nov 2026 03:25:34 +0100 Subject: [PATCH 2/6] Document attribute aliases in nodeattrib man page --- confluent_client/doc/man/nodeattrib.ronn.tmpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/confluent_client/doc/man/nodeattrib.ronn.tmpl b/confluent_client/doc/man/nodeattrib.ronn.tmpl index cbe91380..6ab50c60 100644 --- a/confluent_client/doc/man/nodeattrib.ronn.tmpl +++ b/confluent_client/doc/man/nodeattrib.ronn.tmpl @@ -54,6 +54,14 @@ Additionally, if wanting to change from a node level attribute value to inherit member group, it is required to use '-c' to clear the attribute. Conversely, assigning to a blank value will allow masking a group defined attribute with an empty value. +## ALIASES + +The following short names expand to their full attribute names: + +* `bmc` expands to `hardwaremanagement.manager` +* `bmcuser` and `switchuser` expand to `secret.hardwaremanagementuser` +* `bmcpass` and `switchpass` expand to `secret.hardwaremanagementpassword` + ## OPTIONS * `-b`, `--blame`: From 44f7b3497ef4fa68de241f66d458bf7561c99336 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 23 Nov 2026 19:47:45 +0100 Subject: [PATCH 3/6] List outlets for geist PDUs instead of crashing Retrieving the power/outlets/ collection of a geist PDU passed the literal 'outlets' to get_outlet, which failed with ValueError: invalid literal for int() with base 10: 'outlets'. Enumerate the outlets from /api/dev like the raritan plugin does. --- .../plugins/hardwaremanagement/geist.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/geist.py b/confluent_server/confluent/plugins/hardwaremanagement/geist.py index cb7bea1e..da9a546d 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/geist.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/geist.py @@ -107,6 +107,16 @@ class GeistClient(object): ) self._token = None + async def get_outlet_ids(self): + rsp = await self.wc.grab_json_response('/api/dev') + dbt = data_by_type(rsp['data']) + if 't3hd' in dbt: + del dbt['t3hd'] + if len(dbt) != 1: + raise Exception('Multiple PDUs not supported per pdu') + pdutype = list(dbt)[0] + return sorted(int(idx) + 1 for idx in dbt[pdutype].get('outlet', {})) + async def get_outlet(self, outlet): rsp = await self.wc.grab_json_response('/api/dev') rsp = rsp['data'] @@ -238,6 +248,12 @@ async def read_sensors(element, node, configmanager): return msg.SensorReadings(readings, name=node) +async def list_outlets(node, configmanager): + gc = GeistClient(node, configmanager) + for idx in await gc.get_outlet_ids(): + yield msg.ChildCollection(str(idx)) + + async def get_outlet(element, node, configmanager): gc = GeistClient(node, configmanager) state = await gc.get_outlet(element[-1]) @@ -302,6 +318,11 @@ async def read_inventory(element, node, configmanager): async def retrieve(nodes, element, configmanager, inputdata): if 'outlets' in element: + if element[-1] == 'outlets': + for node in nodes: + async for res in list_outlets(node, configmanager): + yield res + return gp = tasks.TaskPile(pdupool) for node in nodes: gp.spawn(get_outlet, element, node, configmanager) From 71b8198cb9cf7b6cd6fdc82a3f83ac82d716b965 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 23 Nov 2026 19:47:45 +0100 Subject: [PATCH 4/6] Report TargetResourceUnavailable as 503 with its reason The attribute was misspelled apierrocode, so the exception fell back to 500 and every occurrence was logged as a stack trace. strip_node also dropped the error text, so a single node request such as starting a console on a PDU reported no reason. --- confluent_server/confluent/exceptions.py | 2 +- confluent_server/confluent/messages.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/exceptions.py b/confluent_server/confluent/exceptions.py index c359e40d..2bb60654 100644 --- a/confluent_server/confluent/exceptions.py +++ b/confluent_server/confluent/exceptions.py @@ -122,7 +122,7 @@ class GlobalConfigError(ConfluentException): class TargetResourceUnavailable(ConfluentException): # This is meant for scenarios like asking to read a sensor that is # currently unavailable. This may be a persistent or transient state - apierrocode = 503 + apierrorcode = 503 _apierrorstr = 'Target Resource Unavailable' class PubkeyInvalid(ConfluentException): diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index c86df63a..ef8912e0 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -296,7 +296,7 @@ class ConfluentResourceUnavailable(ConfluentNodeError): defaulterror = 'Unavailable' def strip_node(self, node): - raise exc.TargetResourceUnavailable() + raise exc.TargetResourceUnavailable(self.error) class ConfluentTargetTimeout(ConfluentNodeError): From 1cf4225d97e323957a33fe348db4901c596ccecf Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 23 Nov 2026 19:47:45 +0100 Subject: [PATCH 5/6] Iterate over a snapshot of pending_nodes during recheck _recheck_nodes_backend yields with asyncio.sleep(0) inside the loop, so other coroutines can add or remove pending nodes meanwhile and the loop fails with 'dictionary changed size during iteration'. --- confluent_server/confluent/discovery/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index 8b69f218..ea9e2436 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -776,9 +776,11 @@ async def _recheck_nodes_backend(nodeattribs, configmanager): continue # now we go through ones that were identified, but could not pass # policy or hadn't been able to verify key - for nodename in pending_nodes: + for nodename in list(pending_nodes): await asyncio.sleep(0) - info = pending_nodes[nodename] + info = pending_nodes.get(nodename, None) + if info is None: + continue try: if info['handler'] is None: continue From 8e8933b7f6339a267e753a4a22fb0c30c9784911 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 23 Nov 2026 19:47:45 +0100 Subject: [PATCH 6/6] Strip prefix length from the BMC address in vinzmanager hardwaremanagement.manager may carry a prefix length such as 10.0.0.1/22. Passing that to WebConnection built the base URL https://10.0.0.1/22:443, which aiohttp rejects with "base_url must have a trailing '/'", so remote video for openbmc nodes failed. Other consumers of the attribute already strip it. --- confluent_server/confluent/vinzmanager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/vinzmanager.py b/confluent_server/confluent/vinzmanager.py index 769d3e8a..ed7fb97f 100644 --- a/confluent_server/confluent/vinzmanager.py +++ b/confluent_server/confluent/vinzmanager.py @@ -142,6 +142,8 @@ async def send_grant(conn, nodename, rqtype): 'secret.hardwaremanagementpassword', {}).get('value', None) host = c.get(nodename, {}).get( 'hardwaremanagement.manager', {}).get('value', None) + if host: + host = host.split('/', 1)[0] if bmcuser and bmcpass and host: kv = util.TLSCertVerifier(cfg, nodename, 'pubkeys.tls_hardwaremanager').verify_cert