Skip to content

cephadm: make host add failure message more friendly#38667

Merged
sebastian-philipp merged 1 commit intoceph:masterfrom
pcuzner:fix-cephadm-stdout
Jan 8, 2021
Merged

cephadm: make host add failure message more friendly#38667
sebastian-philipp merged 1 commit intoceph:masterfrom
pcuzner:fix-cephadm-stdout

Conversation

@pcuzner
Copy link
Contributor

@pcuzner pcuzner commented Dec 21, 2020

When a host add fails, the output was showing passed
and failed checks. This patch uses an ERROR prefix for
all failed checks, and then filters on them when showing
the result, so the admin sees only the failed items. The
text has also been tidied up to remove the [] within a
[] syntax

Signed-off-by: Paul Cuzner pcuzner@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

When a host add fails, the output was showing passed
and failed checks. This patch uses an ERROR prefix for
all failed checks, and then filters on them when showing
the result, so the admin sees only the failed items. The
text has also been tidied up to remove the [] within a
[] syntax

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
@pcuzner pcuzner requested a review from a team as a code owner December 21, 2020 04:40
@pcuzner
Copy link
Contributor Author

pcuzner commented Dec 21, 2020

This PR changes the failure out from

[ceph: root@maint-1 /]# ceph orch host add maint-4                                                                                      
Error EINVAL: New host maint-4 (maint-4) failed check: ['systemctl is present', 'Unit chronyd.service is enabled and running', 'Hostname "maint-4" matches what is expected.', "ERROR: Unable to locate any of ['podman', 'docker']", 'lvcreate binary does not appear to be ins
talled', 'hostname "maint-4.storage.lab" does not match expected hostname "maint-4"'] 

to

[ceph: root@maint-1 /]# ceph orch host add maint-4
Error EINVAL: New host maint-4 (maint-4) failed check(s): ['Unable to locate a supported container engine (podman or docker)', 'lvcreate binary does not appear to be installed', 'hostname "maint-4.storage.lab" does not match expected hostname "maint-4"']

@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label Dec 22, 2020
Copy link
Contributor

@sebastian-philipp sebastian-philipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which problem do you try to circumvent here? If I read this right, you need to actually print structured output?

@sebastian-philipp sebastian-philipp removed the wip-swagner-testing My Teuthology tests label Dec 26, 2020
@pcuzner
Copy link
Contributor Author

pcuzner commented Jan 6, 2021

@sebastian-philipp the problem I'm trying to fix is to remove the output in the error message from tests that passed - since we were saiying the add host failed, then supplied a list that starts with non-errors - which to my mind is pointless.
I've provided before and after examples above - if we have an error we should be clear what the errors are and not mix them in with success messages.

@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label Jan 7, 2021
@sebastian-philipp sebastian-philipp merged commit 9432027 into ceph:master Jan 8, 2021
@sebastian-philipp
Copy link
Contributor

whoops. misclick on the merge button without the reviewed-by lines.

@pcuzner pcuzner deleted the fix-cephadm-stdout branch January 13, 2021 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants