Locking/Unlocking server support

Registered by Zhenguo Niu on 2013-06-06

Horizon should provide functionality to lock/unlock a server for admin.

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Undefined
Drafter:
Zhenguo Niu
Direction:
Needs approval
Assignee:
Ana Krivokapić
Definition:
Drafting
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Ana Krivokapić on 2014-11-12
Completed by
Rob Cresswell on 2016-03-30

Related branches

Sprints

Whiteboard

[lblanchard] Is there a use case written up around who, when, and why they would perform this action? Based on the description I'm thinking this would only be on the Admin Instances page.

This additional state could be added to the State field for Instances. So they could read "Active - Locked" or "Active - Unlocked". The user would additionally gain the option to Lock/Unlock an instance. I'd also think that certain actions wouldn't be available for Instances that are Locked within the Project Instances section. One idea on how this might look from an Admin point of view:
http://people.redhat.com/~lsurette/OpenStack/Lock%20Instances.png

Questions:
-Would an instance be unlocked upon creation?

[akrivoka] Some more background around this feature:
* The purpose of locking is to prevent accidental changes to instances (termination, etc)
* Instances can be locked/unlocked by both admins and regular users
* Admins can still make changes to locked instances. E.g. an admin can terminate a locked instance.
* There is currently *no way to see to lock status of an instance* - this change is pending in nova:
    * bp - https://blueprints.launchpad.net/nova/+spec/get-lock-status-of-instance
    * patch - https://review.openstack.org/#/c/131094
* We can add the basic lock/unlock functionality to Horizon today. After the get lock status functionality is added to Nova, we can subsequently add it to Horizon.
* Personally I think it makes sense that the statuses should be:
    Active (for unlocked active instances) and
    Locked (for locked instances)

Gerrit topic: https://review.openstack.org/#q,topic:bp/lock-unlock-server,n,z

Addressed by: https://review.openstack.org/133992
    Add support for locking and unlocking servers

[2016-03-30 robcresswell] Marked implemented. There are bugs out (https://bugs.launchpad.net/horizon/+bug/1505845) to track implementation of the Locked/Unlocked status. I don't think we need to carry this content as Blocked, when the functionality exists but is simply missing a status string.

(?)

Work Items

Work items:
Add lock/unlock functionality: DONE
Display lock status: POSTPONED

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.