Add an option to disable a service

Bug #1048662 reported by Razique Mahroua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
Dolph Mathews
python-keystoneclient
Fix Released
Wishlist
Joseph Heck

Bug Description

It would be interesting to be able to have an extra setting for keystone in order to enable or disable a service (eg cinder, network, glance). Actually, the "type " needs to be renamed to something trivial not to have the service appear into the dashboard.

For tests/ maintenance purpose, that would made sense. Maybe something like this :
$ keystone service-disable $service_id
$ keystone service-enable $service_id

Razique

Revision history for this message
Joseph Heck (heckj) wrote :

Hey Razique -

That's appropriate as a feature request against the V3 API - https://docs.google.com/document/d/1VP-bTBbwsn6q-rDzuS9CEKb2ubE1VjbWRFd4BkkjoOY/edit.

Could you outline the use case around wanting to disable a service (or is disabling a specific endpoint?) and what you'd expect from the API if that happened?

Changed in keystone:
importance: Undecided → Wishlist
status: New → Triaged
tags: added: blueprint featurerequest
removed: feature request
Revision history for this message
Razique Mahroua (razique) wrote :

Hey Joe,
the first thing expected by disabling a service is not to have it returned - or returned with a status : disabled not to have any interaction possible with it.

Example - my nova cloud is in maintenance, and I don't want to have any instance being spawned

$ keystone service-disable $compute-service -id
    ---> Service disabled

$ nova boot [etc...]
   ----> Message : "Service compute currently disabled"

$ keystone service-disable $swift-service -id
    ---> Service disabled

$ curl -X PUT -H etc...
   ----> Message : "Service object-storage currently disabled"

$ keystone service-disable $quantum-service -id

From Horizon : tab "Network" not being displayed

Revision history for this message
Dolph Mathews (dolph) wrote :

Given that keystone maintains a list of services solely for the purpose of generating a service catalog... if a service was disabled, the only resulting behavior I would expect is that it would no longer appear in the service catalog. The same logic could applied to individual endpoints.

However, this behavior would be reflected by "nova boot" as something along the lines of "can't find a compute service."

As for a shell command, we already support the "--enable=true" and "--enable=false" pattern on *-update. If we want to change that pattern, it deserves it's own bug/blueprint to track it. However, as long as we're proposing new syntax, I'd much prefer the following:

    $ keystone service-update SERVICE_ID --disabled
    $ keystone service-update SERVICE_ID --enabled

Changed in keystone:
assignee: nobody → Dolph Mathews (dolph)
Dolph Mathews (dolph)
Changed in python-keystoneclient:
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Dolph Mathews (dolph)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (feature/keystone-v3)

Reviewed: https://review.openstack.org/14276
Committed: http://github.com/openstack/python-keystoneclient/commit/62c55bc2f0f13630db6d9962ae0edf468f495276
Submitter: Jenkins
Branch: feature/keystone-v3

commit 62c55bc2f0f13630db6d9962ae0edf468f495276
Author: Dolph Mathews <email address hidden>
Date: Wed Oct 10 07:38:27 2012 +0000

    Enable/disable services/endpoints (bug 1048662)

    Change-Id: I664b7f7dfa281a4481bfc37eab0948a901f1c0c5

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/15066

Changed in python-keystoneclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/15067

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/15176

Changed in python-keystoneclient:
assignee: Dolph Mathews (dolph) → Joseph Heck (heckj)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)
Download full text (4.5 KiB)

Reviewed: https://review.openstack.org/15066
Committed: http://github.com/openstack/python-keystoneclient/commit/1b7eca834977df970faabacde85c31f62619034b
Submitter: Jenkins
Branch: master

commit 62c55bc2f0f13630db6d9962ae0edf468f495276
Author: Dolph Mathews <email address hidden>
Date: Wed Oct 10 07:38:27 2012 +0000

    Enable/disable services/endpoints (bug 1048662)

    Change-Id: I664b7f7dfa281a4481bfc37eab0948a901f1c0c5

commit 46360085ebcbea61a04ab001e7d9597d0ed0b746
Author: Dolph Mathews <email address hidden>
Date: Thu Sep 13 07:55:26 2012 -0500

    v3 Domain/Project role grants

    Change-Id: Idbe0702b42603d6f9f133c9f1855ea9b4f222066

commit 0ee514703094e3410d71b0078bd3d27db4d790dc
Author: Dolph Mathews <email address hidden>
Date: Wed Sep 12 17:34:09 2012 -0500

    Fixed httplib2 mocking (bug 1050091, bug 1050097)

    - 204 No Content should be mocked with empty response bodies
    - Content-Type headers should not be mocked with empty response bodies
    - httplib2 would never return None as a response body
    - The Identity API never expects a req/resp body with a string value of "null"

    Change-Id: Ie22e8e5288573268165ed06049978195955f8ca6

commit dd84cdc340c782f53c79ede7ec1e196828605f96
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 15:43:47 2012 -0500

    v3 List projects for a user

    Change-Id: I4d3dfebb0bbe3799c05b9bc39fe2454ccf300873

commit 6c84d7bf8567bfa3024cd38f80c01ed84768a89c
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 15:42:38 2012 -0500

    v3 Credential CRUD

    Change-Id: I646ff7db3ccf827f912ebdb78fdf8d765d52c26c

commit 298b1c4903a87b2063772b66150af1fa344a95d4
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 15:40:37 2012 -0500

    v3 User CRUD

    Change-Id: Ieea3c474ce3795e2c97e399988228cdb2715f2ef

commit 577c78c9919478305154919e4011cc55469d7815
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 15:38:22 2012 -0500

    v3 Project CRUD

    Change-Id: I027dbba3a0573fde590295be5b31e3701d8c01f5

commit f885c0d09a6464e0d94d1c295a605877d711f88a
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 15:34:56 2012 -0500

    v3 Role CRUD

    Change-Id: Iacb6e56ef60537b7cd3a4fbe3db1f0db1604fdc2

commit ac3beb3671cdccf9a5285e8b2296e950b1a8be9b
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 12:32:01 2012 -0500

    v3 Domain CRUD

    Change-Id: I830055dc3bd079715403029a85890c40b687f632

commit 0534c02351c225412354215a1653aa755d92a6e5
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 11:44:05 2012 -0500

    v3 Policy CRUD

    Change-Id: Iaecf3427877dd1751bb546c24413bc759938922c

commit 2af709ceb6cf20f37f79baed1d93a14874b49a5b
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 11:40:25 2012 -0500

    v3 Endpoint CRUD

    Change-Id: Iff60668a80f8a6679a691a8f256652d7814f2785

commit a0ff56fea0b7dfcb21fdd5e0f81c5e937f8c2324
Author: Dolph Mathews <email address hidden>
Date: Tue Sep 11 11:22:30 2012 -0500

    v3 Service CRUD

    Change-Id: I5594ce92e99241f95775773233f09170a8a371b1

commi...

Read more...

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Revision history for this message
Dolph Mathews (dolph) wrote :

Fixed with the v3 API.

Changed in keystone:
status: Triaged → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.