Adding functionality to openstack client to list volumes that reference no project id, or an invalid project id.

Registered by Tim Pownall on 2017-02-06

While reviewing the osops tools repo I came across this script https://github.com/openstack/osops-tools-generic/blob/master/cinder/orphaned_volumes.sh which I thought should be a function within openstack client. I believe it would be beneficial to openstack operators to be able to list volumes that do not have a project id or have a project id that is non existent in keystone. While I'm not entirely sure how volumes can get into this state, there seems to be a need for such functions if someone wrote a script to find them.

The following flags for the volumes command will be added.

openstack volume list --no-project-id

This command will show any volume where the project id is length of 0 (No project id) associated with the volume.

openstack volume list --orphaned-project-id

This command will show any volume where the project does not exist as a project in keystone. This will query identity and grab all project id's then compare to the volume list that was pulled.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Tim Pownall
Direction:
Needs approval
Assignee:
Tim Pownall
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/openstackclient-orphan-volumes-list,n,z

Addressed by: https://review.openstack.org/429789
    Adding functionality in openstack client to list volumes associated with no project or an invalid project id that no longer exists.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.