Provide a way to log a reason when a service has been disabled

Registered by Andrea Rosa

I'd like to be able to define a way to log a reason when I disable a service.
This is really usefull on large deployment when you need to deal with a lot of nodes and you need a way to track why a specific service has been disabled (for example, maintenance, hw failures, and so on).

The idea is to add a column (String 255) in the services table to store a reason field.
Then we will add a new API extension to disable a service indicating a reason for that.
Then we are going to change the nova client to support the new feature.

Blueprint information

Russell Bryant
Andrea Rosa
Andrea Rosa
Series goal:
Accepted for havana
Milestone target:
milestone icon 2013.2
Started by
Andrea Rosa
Completed by
Russell Bryant

Related branches



The idea is to add a new extensions, when this extension is loaded the behaviour of the os-services is going to change.
There will be a new PUT method for the existing os-services API extension:
PUT /v2/{tenant_id}/os-services/disable-log-reason
when this API is used to disable a service it's mandatory to specify a reason. That value will be saved in the table services.
If a service is already disabled and another call PUT /v2/{tenant_id}/os-services/disable-log-reason is done, the content of the the reason field will be overwritten.
When the new extension is loaded the GET /v2/{tenant_id}/os-services will return the content of the reason field.

Gerrit topic:,topic:bp/record-reason-for-disabling-service,n,z

Addressed by:
    Give a way to save why a service has been disabled.


Work Items

Work items:
[andrea-rosa-m] New field in services table: DONE
[andrea-rosa-m] Modify os-services API extensions: DONE
[andrea-rosa-m] Add nova client support for the new extension: DONE

This blueprint contains Public information 
Everyone can see this information.