Bug 978539

Summary: [RFE] Provide a way to log a reason when a service has been disabled
Product: Red Hat OpenStack Reporter: Russell Bryant <rbryant>
Component: openstack-novaAssignee: David Ripton <dripton>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 4.0CC: ajeain, dallan, dripton, jkt, mlopes, ndipanov, nobody, xqueralt
Target Milestone: Upstream M2Keywords: FutureFeature
Target Release: 4.0Flags: nmagnezi: needinfo-
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/record-reason-for-disabling-service
Whiteboard:
Fixed In Version: openstack-nova-2013.2-0.23.rc1.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-20 00:11:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 989721    
Bug Blocks: 975499    

Comment 1 Nir Magnezi 2013-07-03 12:12:15 UTC
This one looks quite straightforward, few questions due:
1. Is this going to be exposed only by API? or CLI as well?
2. I see the work on nova client marked as INPROGRESS, any implications regarding QE tests in your opinion?
3. I noticed they talk about a new services table, Is this a db table under nova db?

Any additional information is welcomed.

Comment 2 Russell Bryant 2013-07-03 13:56:57 UTC
(In reply to Nir Magnezi from comment #1)
> This one looks quite straightforward, few questions due:
> 1. Is this going to be exposed only by API? or CLI as well?

Ideally anything supported by the API should be supported in the CLI, as well.

> 2. I see the work on nova client marked as INPROGRESS, any implications
> regarding QE tests in your opinion?

You're right.  It's not in the client yet.  I need to follow up on that.

> 3. I noticed they talk about a new services table, Is this a db table under
> nova db?

It's not a new table.  It's just a new column, disabled_reason, in the existing services table.

Comment 3 Russell Bryant 2013-07-03 14:15:02 UTC
client support is in progress here: https://review.openstack.org/#/c/34964/

Comment 4 Nir Magnezi 2013-07-15 09:09:25 UTC
(In reply to Russell Bryant from comment #3)
> client support is in progress here: https://review.openstack.org/#/c/34964/

Russell,
I'm looking to the exact syntax of those new CLI commands.

Looking here: https://review.openstack.org/#/c/34964/5/novaclient/tests/v1_1/fakes.py

I get the impression that it will look something like:

service <host> <service-name> <text entered by the user as a reason>

I'm I correct?

Comment 5 Russell Bryant 2013-07-15 16:36:48 UTC
(In reply to Nir Magnezi from comment #4)
> (In reply to Russell Bryant from comment #3)
> > client support is in progress here: https://review.openstack.org/#/c/34964/
> 
> Russell,
> I'm looking to the exact syntax of those new CLI commands.
> 
> Looking here:
> https://review.openstack.org/#/c/34964/5/novaclient/tests/v1_1/fakes.py
> 
> I get the impression that it will look something like:
> 
> service <host> <service-name> <text entered by the user as a reason>
> 
> I'm I correct?

[rbryant@devstack python-novaclient]$ nova service-list
nova+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Binary           | Host     | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| nova-conductor   | devstack | internal | enabled | up    | 2013-07-15T16:35:01.000000 | None            |
| nova-cert        | devstack | internal | enabled | up    | 2013-07-15T16:34:58.000000 | None            |
| nova-compute     | devstack | nova     | enabled | up    | 2013-07-15T16:34:55.000000 | None            |
| nova-network     | devstack | internal | enabled | up    | 2013-07-15T16:34:53.000000 | None            |
| nova-scheduler   | devstack | internal | enabled | up    | 2013-07-15T16:35:03.000000 | None            |
| nova-consoleauth | devstack | internal | enabled | up    | 2013-07-15T16:34:57.000000 | None            |
+------------------+----------+----------+---------+-------+----------------------------+-----------------+
 [rbryant@devstack python-novaclient]$ nova service-disable devstack nova-compute --reason 'because i said s' 
+----------+--------------+----------+-------------------+
| Host     | Binary       | Status   | Disabled Reason   |
+----------+--------------+----------+-------------------+
| devstack | nova-compute | disabled | because i said so |
+----------+--------------+----------+-------------------+
[rbryant@devstack python-novaclient]$ nova service-list
+------------------+----------+----------+----------+-------+----------------------------+-------------------+
| Binary           | Host     | Zone     | Status   | State | Updated_at                 | Disabled Reason   |
+------------------+----------+----------+----------+-------+----------------------------+-------------------+
| nova-conductor   | devstack | internal | enabled  | up    | 2013-07-15T16:35:21.000000 | None              |
| nova-cert        | devstack | internal | enabled  | up    | 2013-07-15T16:35:18.000000 | None              |
| nova-compute     | devstack | nova     | disabled | up    | 2013-07-15T16:35:20.000000 | because i said so |
| nova-network     | devstack | internal | enabled  | up    | 2013-07-15T16:35:23.000000 | None              |
| nova-scheduler   | devstack | internal | enabled  | up    | 2013-07-15T16:35:23.000000 | None              |
| nova-consoleauth | devstack | internal | enabled  | up    | 2013-07-15T16:35:17.000000 | None              |
+------------------+----------+----------+----------+-------+----------------------------+-------------------+
[rbryant@devstack python-novaclient]$ nova service-enable devstack nova-compute
+----------+--------------+---------+
| Host     | Binary       | Status  |
+----------+--------------+---------+
| devstack | nova-compute | enabled |
+----------+--------------+---------+
[rbryant@devstack python-novaclient]$ nova service-list
+------------------+----------+----------+---------+-------+----------------------------+-------------------+
| Binary           | Host     | Zone     | Status  | State | Updated_at                 | Disabled Reason   |
+------------------+----------+----------+---------+-------+----------------------------+-------------------+
| nova-conductor   | devstack | internal | enabled | up    | 2013-07-15T16:35:41.000000 | None              |
| nova-cert        | devstack | internal | enabled | up    | 2013-07-15T16:35:38.000000 | None              |
| nova-compute     | devstack | nova     | enabled | up    | 2013-07-15T16:35:38.000000 | because i said so |
| nova-network     | devstack | internal | enabled | up    | 2013-07-15T16:35:33.000000 | None              |
| nova-scheduler   | devstack | internal | enabled | up    | 2013-07-15T16:35:33.000000 | None              |
| nova-consoleauth | devstack | internal | enabled | up    | 2013-07-15T16:35:37.000000 | None              |
+------------------+----------+----------+---------+-------+----------------------------+-------------------+


Minor bug here at the end.  The reason didn't get cleared out on enable.  The version I'm running is just a little old.  It was fixed here:

https://review.openstack.org/#q,I78c9e40c65e96fbc6eff0e3426cfd87b0810cd69,n,z

Comment 9 David Ripton 2013-08-13 15:53:12 UTC
Nir, your test plan looks great to me.  The upstream unit tests should cover proving that the migration that adds the column works.

Comment 10 Nir Magnezi 2013-08-14 06:57:05 UTC
(In reply to David Ripton from comment #9)
> Nir, your test plan looks great to me.  The upstream unit tests should cover
> proving that the migration that adds the column works.

Thank you for the feedback David.

Comment 14 Nir Magnezi 2013-11-12 09:47:35 UTC
Verified NVR:
# rpm -qa | grep openstack-nova
openstack-nova-conductor-2013.2-4.el6ost.noarch
openstack-nova-cert-2013.2-4.el6ost.noarch
openstack-nova-common-2013.2-4.el6ost.noarch
openstack-nova-console-2013.2-4.el6ost.noarch
openstack-nova-compute-2013.2-4.el6ost.noarch
openstack-nova-scheduler-2013.2-4.el6ost.noarch
openstack-nova-api-2013.2-4.el6ost.noarch
openstack-nova-novncproxy-2013.2-4.el6ost.noarch


Passed all OE Sanity tests.

Comment 17 errata-xmlrpc 2013-12-20 00:11:29 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1859.html

Comment 18 Red Hat Bugzilla 2023-09-14 01:47:11 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days