From 93de7f8daa3f000bfac31c348232ad69c55d272c Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Thu, 19 Nov 2026 15:43:51 +0100 Subject: [PATCH] baremetal list: point --details help at full error Extend the --details help text of osism baremetal list: it now says that the Last Error column is cut to 80 characters and names the openstack commands that show the full text. Ironic's last_error is often longer than 80 characters, and the part that explains the failure tends to come late in the message, past the cut. The table keeps the cut so it stays readable on a terminal, so operators need to know where to find the rest: - openstack baremetal node show NODE -c last_error shows the node's current error in full. - openstack baremetal node history list NODE --long shows earlier errors in full as well. Without --long, Ironic's API shortens each history event to 255 characters. Ironic clears last_error once a later operation succeeds, while the history keeps older errors. The width in the help text is taken from LIST_LAST_ERROR_WIDTH, so the two cannot drift apart. A --format json option that would print the full text was considered and left out. Apart from the NetBox device role, openstack baremetal node list --fields ... -f json already returns the same raw fields. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Roger Luethi --- osism/commands/baremetal.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osism/commands/baremetal.py b/osism/commands/baremetal.py index 1ae8e4c8e..6bfdba028 100644 --- a/osism/commands/baremetal.py +++ b/osism/commands/baremetal.py @@ -216,7 +216,11 @@ def get_parser(self, prog_name): help=( "Also show when each node entered its provision state (UTC), " "the target state, automated clean, the maintenance reason " - "and the last error" + "and the last error. The last error is cut to " + f"{LIST_LAST_ERROR_WIDTH} characters; for the full text use " + "'openstack baremetal node show NODE -c last_error', for " + "earlier errors 'openstack baremetal node history list NODE " + "--long'" ), ) return parser