Bug 1636641
| Summary: | Failed introspection in OC returns 0 | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Alexander Chuzhoy <sasha> |
| Component: | python-ironic-inspector-client | Assignee: | Iury Gregory Melo Ferreira <imelofer> |
| Status: | CLOSED ERRATA | QA Contact: | Alistair Tonner <atonner> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 14.0 (Rocky) | CC: | atonner, bfournie, jjoyce, jschluet, mburns, sasha, slinaber, tvignaud |
| Target Milestone: | Upstream M2 | Keywords: | Triaged, ZStream |
| Target Release: | 15.0 (Stein) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-ironic-inspector-client-3.5.0-0.20190423211427.9bb1150.el8ost | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-09-21 11:19:11 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Alexander Chuzhoy
2018-10-06 05:40:44 UTC
So, I have realized it's a bit less straightforward than I thought.. As you see, the command return the result of introspection(s), and cliff (the CLI library we use) cannot return non-zero code at the same time. What I suggest is a flag similar to 'grep -q' that will not output anything, but will output the correct error code. WDYT? If we could use it in automation - good enough for me. Thanks. (undercloud) [stack@undercloud-0 ~]$ openstack baremetal introspection start --wait compute-1 Invalid provision state for introspection: "active", valid states are "['inspecting', 'inspect wait', 'inspect failed', 'manageable', 'enroll']" (undercloud) [stack@undercloud-0 ~]$ echo $? 1 (undercloud) [stack@undercloud-0 ~]$ (undercloud) [stack@undercloud-0 ~]$ openstack baremetal introspection start --wait ironic-1 Node ironic-1 was not found in Ironic (undercloud) [stack@undercloud-0 ~]$ echo $? Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:2811 |