Bug 2270751

Summary: "openstack compute service list --long" output doesn't contain information about forced_down flag of service
Product: Red Hat OpenStack Reporter: Alex Stupnikov <astupnik>
Component: python-openstackclientAssignee: melanie witt <mwitt>
Status: CLOSED ERRATA QA Contact: Nobody <nobody>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.1 (Wallaby)CC: alifshit, apevec, jhakimra, jjoyce, jpichon, jslagle, lhh, mariel, mwitt
Target Milestone: z4Keywords: Patch, Triaged
Target Release: 17.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: python-openstackclient-5.5.2-17.1.20240819153742.42d9b6e.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-21 09:31:20 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 Alex Stupnikov 2024-03-21 17:53:18 UTC
Description of problem:
It is possible to set forced_down state for service using openstackclient:
openstack compute service set --down <host> <service>

But it is impossible to get information about this flag using "openstack compute service list --long", which could be quite misleading and block troubleshooting in some cases. It worth mentioning that information about forced_down flag is included in API response from Nova service.

Version-Release number of selected component (if applicable):
RHOSP 17.1

How reproducible:

export OS_COMPUTE_API_VERSION=2.latest
openstack compute service list --long -vvv
....
RESP BODY: {"services": [{"binary": "nova-conductor", "host": "overcloud-controller0.localdomain", "id": "5a6fa3a2-260e-4596-b31e-e6ad343c3314", "zone": "internal", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:06.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-scheduler", "host": "overcloud-controller0.localdomain", "id": "b2b31c9e-e1fc-44d6-bdf5-799a651af15f", "zone": "internal", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:06.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-conductor", "host": "overcloud-controller1.localdomain", "id": "0becea97-256a-44c7-a39e-693e8c46b1fb", "zone": "internal", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:11.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-scheduler", "host": "overcloud-controller1.localdomain", "id": "b219bebb-4a66-48cd-815b-c7d50e47a917", "zone": "internal", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:08.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-scheduler", "host": "overcloud-controller2.localdomain", "id": "c96a343e-f4b5-484f-b449-88c5f6c00301", "zone": "internal", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:08.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-conductor", "host": "overcloud-controller2.localdomain", "id": "70f31dd0-0fb5-4f16-8f31-7cbbb1aba725", "zone": "internal", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:09.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-compute", "host": "overcloud-compute0.localdomain", "id": "e5d1f111-48ec-4206-b6c3-393c16d57959", "zone": "nova", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:11.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-compute", "host": "overcloud-compute1.localdomain", "id": "5fbdf28f-af55-4e3f-b3b7-94b6069ee4f4", "zone": "nova", "status": "enabled", "state": "up", "updated_at": "2024-03-21T17:45:06.000000", "disabled_reason": null, "forced_down": false}]}
GET call to compute for http://10.1.0.254:8774/v2.1/os-services used request id req-2f964291-75af-4e74-aeec-98648b077922
+--------------------------------------+----------------+-----------------------------------+----------+---------+-------+----------------------------+-----------------+
| ID                                   | Binary         | Host                              | Zone     | Status  | State | Updated At                 | Disabled Reason |
+--------------------------------------+----------------+-----------------------------------+----------+---------+-------+----------------------------+-----------------+
| 5a6fa3a2-260e-4596-b31e-e6ad343c3314 | nova-conductor | overcloud-controller0.localdomain | internal | enabled | up    | 2024-03-21T17:45:06.000000 | None            |
| b2b31c9e-e1fc-44d6-bdf5-799a651af15f | nova-scheduler | overcloud-controller0.localdomain | internal | enabled | up    | 2024-03-21T17:45:06.000000 | None            |
| 0becea97-256a-44c7-a39e-693e8c46b1fb | nova-conductor | overcloud-controller1.localdomain | internal | enabled | up    | 2024-03-21T17:45:11.000000 | None            |
| b219bebb-4a66-48cd-815b-c7d50e47a917 | nova-scheduler | overcloud-controller1.localdomain | internal | enabled | up    | 2024-03-21T17:45:08.000000 | None            |
| c96a343e-f4b5-484f-b449-88c5f6c00301 | nova-scheduler | overcloud-controller2.localdomain | internal | enabled | up    | 2024-03-21T17:45:08.000000 | None            |
| 70f31dd0-0fb5-4f16-8f31-7cbbb1aba725 | nova-conductor | overcloud-controller2.localdomain | internal | enabled | up    | 2024-03-21T17:45:09.000000 | None            |
| e5d1f111-48ec-4206-b6c3-393c16d57959 | nova-compute   | overcloud-compute0.localdomain    | nova     | enabled | up    | 2024-03-21T17:45:11.000000 | None            |
| 5fbdf28f-af55-4e3f-b3b7-94b6069ee4f4 | nova-compute   | overcloud-compute1.localdomain    | nova     | enabled | up    | 2024-03-21T17:45:06.000000 | None            |
+--------------------------------------+----------------+-----------------------------------+----------+---------+-------+----------------------------+-----------------+

Comment 1 melanie witt 2024-03-27 03:28:15 UTC
What version of openstackclient is this?

The 'Forced Down' column should be available starting in version 5.6.0:

https://review.opendev.org/c/openstack/python-openstackclient/+/804465

Comment 19 errata-xmlrpc 2024-11-21 09:31:20 UTC
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 (RHOSP 17.1.4 bug fix and enhancement 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/RHBA-2024:9973