https://blueprints.launchpad.net/cinder/+spec/private-volume-types
Cinder volume types are visible to all users, regardless of their project.
This blueprint suggests the introduction of private volume types.
Some volume types should only be restricted. Examples are test volume types where a new technology is being tried out or ultra high performance volumes for special needs where most users should not be able to select these volumes.
Similar approaches are taken with the is_public flag on flavors in Nova. We should leverage the work done in Nova and port it for Cinder volume types.
Volume types currently do not have an owner associated to them. This feature does not suggest the introduction of an owner for various reasons, one being that it is impossible to find the original owner of an existing volume type.
The proposed approach is the one already in place in Nova:
There is no known alternative ways to restrict access to a volume type.
Database schema changes:
mysql> DESC volume_types;
+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| deleted | tinyint(1) | YES | | NULL | |
| id | varchar(36) | NO | PRI | NULL | |
| name | varchar(255) | YES | | NULL | |
| qos_specs_id | varchar(36) | YES | MUL | NULL | |
| is_public | tinyint(1) | YES | | NULL | |
+--------------+--------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
mysql> DESC volume_type_projects;
+----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| volume_type_id | varchar(36) | YES | MUL | NULL | |
| project_id | varchar(255) | YES | | NULL | |
| deleted | tinyint(1) | YES | | NULL | |
+----------------+--------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)
Database data migration:
This change introduces the concept of private volume types.
None
Proposed python-cinderclient shell interface:
type-access-add --volume-type <type> --project-id <project_id>
Add type access for the given project.
type-access-list --volume-type <type>
Print access information about the given type.
type-access-remove --volume-type <type> --project-id <project_id>
Remove type access for the given project.
The extension adds an is_public field to all returned volumes.
Special care should be taken to not generate N requests per volume list. This can easily be addressed by a caching mechanism at the API layer.
None
None
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.