cephadm: make host add failure message more friendly#38667
Merged
sebastian-philipp merged 1 commit intoceph:masterfrom Jan 8, 2021
pcuzner:fix-cephadm-stdout
Merged
cephadm: make host add failure message more friendly#38667sebastian-philipp merged 1 commit intoceph:masterfrom pcuzner:fix-cephadm-stdout
sebastian-philipp merged 1 commit intoceph:masterfrom
pcuzner:fix-cephadm-stdout
Conversation
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>
Contributor
Author
|
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"'] |
jmolmo
approved these changes
Dec 21, 2020
Contributor
sebastian-philipp
left a comment
There was a problem hiding this comment.
which problem do you try to circumvent here? If I read this right, you need to actually print structured output?
Contributor
Author
|
@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. |
Daniel-Pivonka
approved these changes
Jan 6, 2021
Contributor
|
whoops. misclick on the merge button without the reviewed-by lines. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox