trigger notifications when lock or unlock instances

Registered by suzhengwei

Watcher is a project for optimization, by migrating instances among hosts.
It builds a compute model at the begenning, and update it by notifications.
When one instance is locked by end users, it is excepted to send a regular
notification from Nova, so Watcher will update its compute model and not
migrate the locked instances.

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
Low
Drafter:
suzhengwei
Direction:
Approved
Assignee:
Yikun Jiang
Definition:
Approved
Series goal:
Accepted for rocky
Implementation:
Implemented
Milestone target:
milestone icon rocky-3
Started by
Matt Riedemann
Completed by
Matt Riedemann

Related branches

Sprints

Whiteboard

If you need notification in case the user called the API '/servers/{server_id}/action' with a lock key in the body then emit a notification from the nova.compute.api.API.lock() explicitly. I think it would be nice to have a separate instance.lock and instance.unlock notification similarly to other instance action notifications (like instance.reboot or instance.power_off, instance.power_on)
-- gibi 2018.01.08.

Nova added instance action records for lock/unlock actions in Queens, so adding versioned notifications seems like a reasonable extension of that work for Rocky. -- mriedem 20180109

This seems reasonable, just bring it up in the 'open discussion' part of the weekly nova meeting to get review on it as a specless blueprint. -- mriedem 20180206

There is a patch started here https://review.openstack.org/#/c/526251/ - link that to this blueprint. We agreed to approve this in the Feb 8, 2018 nova meeting. -- mriedem 20180208

Gerrit topic: https://review.openstack.org/#q,topic:bp/trigger-notifications-when-lock-unlock-instances,n,z

Addressed by: https://review.openstack.org/576702
    Add instance.lock notification

Addressed by: https://review.openstack.org/576703
    Add instance.unlock notification

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.