Bug 1321165

Summary: [RFE] Add feature to delete compute services from the service-list using the python-openstackclient
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: python-openstackclientAssignee: Julie Pichon <jpichon>
Status: CLOSED CURRENTRELEASE QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0 (Kilo)CC: apevec, lhh, lyarwood, mwitt, srevivo, stephenfin
Target Milestone: ---Keywords: FutureFeature, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-openstackclient-2.3.1-1.el7ost Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-05 14:26:41 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:

Description Andreas Karis 2016-03-24 20:09:41 UTC
Description of problem:
One currently cannot delete nova services with keystone v3. Using keystone v2, this can easily be done via python-novaclient:

[root@rhel7 ~(keystone_admin)]# nova service-list
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host                   | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-consoleauth | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:03.000000 | -               |
| 2  | nova-scheduler   | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:03.000000 | -               |
| 3  | nova-conductor   | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:02.000000 | -               |
| 4  | nova-compute     | rhel7.0-packstack-osp6 | nova     | enabled | up    | 2016-03-17T01:52:05.000000 | -               |
| 5  | nova-cert        | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:03.000000 | -               |
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+

[root@rhel7 ~(keystone_admin)]# nova service-delete 4
[root@rhel7 ~(keystone_admin)]# nova service-list
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host                   | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-consoleauth | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:43.000000 | -               |
| 2  | nova-scheduler   | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:43.000000 | -               |
| 3  | nova-conductor   | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:42.000000 | -               |
| 5  | nova-cert        | rhel7.0-packstack-osp6 | internal | enabled | up    | 2016-03-17T01:52:43.000000 | -               |
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+

However, when setting keystone v3 and when trying with openstack command, there seems to be no delete option:
[root@rhel7 ~(keystone_admin)]# openstack -h | grep 'compute service'
  compute service list  List service command
  compute service set  Set service command

Version-Release number of selected component (if applicable):
OSP 7.3

How reproducible:
all the time

Steps to Reproduce:
 see above

Actual results:
 see above

Expected results:
Would like to be able to delete a compute service when keystonev3 is enabled; 

Additional info:
python-nova does not support keystonev3

Comment 3 melanie witt 2019-04-05 05:16:07 UTC
The 'openstack service delete' command was added to python-openstackclient in version 1.9.0. [1][2]

[1] https://docs.openstack.org/releasenotes/python-openstackclient/pre_20_releases.html#nov-2015
[2] https://github.com/openstack/python-openstackclient/commit/d1bc15f498da1a4d5f1c865d5eb6a151f472be9c

Comment 4 Lee Yarwood 2019-04-05 14:26:41 UTC
Given #3 I'm closing this out as CURRENTRELEASE for OSP 9 as OSP 7 is now EOL.