Skip to content

baremetal list: point --details help at full error - #2904

Draft
ideaship wants to merge 1 commit into
mainfrom
baremetal-list-error-hint
Draft

ideaship wants to merge 1 commit into
mainfrom
baremetal-list-error-hint

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

osism baremetal list --details cuts the Last Error column to 80 characters, but the part of an Ironic error that explains the failure often comes after that. This PR leaves the table as it is and makes the --details help text say where the full text is:

  • openstack baremetal node show NODE -c last_error: the node's current error, in full.
  • openstack baremetal node history list NODE --long: earlier errors, also in full. Without --long, Ironic's API shortens each history event to 255 characters. Ironic clears last_error once a later operation succeeds; the history keeps older errors.

The 80 in the help text is taken from LIST_LAST_ERROR_WIDTH, so the help stays correct if the width changes.

We considered a --format json option that would print the full text and left it out. Apart from the NetBox device role, openstack baremetal node list --fields … -f json already returns the same raw fields.

Only the help text changes, so there are no test changes.

🤖 Generated with Claude Code

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 <luethi@osism.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant