This bug fix addresses bug #1267168, adding a default value to the
optional control_location parameter for the encryption-type-create
command. Prior to this fix, any invocation of encryption-type-create
that omitted the control_location parameter would fail. The failure
arose from the expectations of the cinder volume encryption type
API extension, which expects to always receive a value for the
control_location on encryption type creation.
control_location indicates which service will conduct the volume
encryption for the encryption-type under consideration; valid options
are 'front-end' (i.e., nova) and 'back-end' (i.e., cinder). The new
default value is 'front-end' and is used whenever control_location
is omitted from encryption-type-create invocation. For prior
discussion and information, see the abandoned patch below:
https://review.openstack.org/#/c/58303/
blueprint encrypt-cinder-volumes
https://blueprints.launchpad.net/nova/+spec/encrypt-cinder-volumes
Change-Id: I8db80929adbf5a3d818b9d3a8115067ae8e7d9e2
Closes-Bug: #1267168
DocImpact
This fix addresses an issue where the variable name for image_name
was incorrect, causing the image_name parameter to be sent as null
when using "cinder upload-to-image" from cli with v2 of the API
Change-Id: I62f8bbb4397526fb291a46777d9025318da8e5b3
Closes-Bug: 1274552
When disable/enable a cinder service, there is no output, this
caused end user does not know if the service was disabled/enabled
successfully.
It is better add some output for the command just like nova to tell
end user the service status.
Change-Id: I9d440ab7437c268b17627e255f152db0b3bf4f53
Closes-Bug: #1261120
When executing 'encryption-type-create' command using resource
name, it will use the findall() in base.py, then error will
occur because list() in findall() used 'search_opts' argument
which list() in VolumeEncryptionTypeManager did not have. Some
other command like 'transfer-delete' met same issue.
This patch will add 'search_opts' argument in list() function
in child class to avoid the bug.
Closes-Bug: #1248519
Related-Bug: #1252665
Change-Id: If1cd8b812af21335e5d4351766539a927a8fbdf4
With change https://review.openstack.org/64945 cinder V2 API now
returns volume details. Updated do_create in cinderclient
to remove additional GET call.
Change-Id: I2a36f2fa865b52f228bad44e0a9c67d49228321e
Partial-Bug: #1265893
The new_size attribute was misspelled, causing the volume extend
operation to fail with:
ERROR: 'Namespace' object has no attribute 'new_size'
This happens only with the v2 API, v1 works fine.
Change-Id: Icb6b5008dad229f21e7906d9b5342d41f5e760cd
Closes-Bug: #1259552
This allows a user to call reset-state or snapshot-reset-state on a
list of objects. The behavior is modeled after a similar change to
delete multiple volumes.
$ cinder reset-state good_volume good_volume_2
<no output>
Error behavior is as follows:
One success/one failure:
$ cinder reset-state good_volume asdf
Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.
One failure:
$ cinder reset-state asdf
ERROR: Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.
Two failures:
$ cinder reset-state asdf qwert
Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.
Reset state for volume qwert failed: No volume with a name or ID of 'qwert' exists.
ERROR: Unable to reset the state for any of the specified volumes.
Related-Bug: 1241941
Closes-Bug: 1256069
Change-Id: Id0a36fb7de0d69be0dac98ea04e4708775250b7a
Since the method base.ManagerWithFind.findall has been modified by
adding the search_opts for all tenants support, the parameter
search_opts should also be added to all the manager classes, which
can be called whithin this method. volumetypemanager does not have
this parameter for its method list(). Adding search_opts will resolve
this issue.
Closes-Bug: #1252665
Change-Id: I526500625f1b5483cb5d88ea15e6ac8485a66ae3
Make sure calls are made to delete both volumes. Also removed redundant
fields in v1 fake volume.
Closes-Bug: #1253142
Change-Id: I51078041c6d765f28edb155d44928286ee2b0dd6
Change string representation of VolumeBackupsRestore to use
volume_id rather than non-existent VolumeBackupsRestore id.
Change-Id: I7b585d0de9b3b0511e7fd1a70b214090a17dfa93
Closes-Bug: #1255488
This modification adds support for deleting volume encryption types.
The encryption-type-delete command accepts a single argument, the
name or ID of the volume type whose associated encryption type should
be deleted. The encryption type may only be deleted if the associated
volume type is unused.
blueprint encrypt-cinder-volumes
Change-Id: Ie189e7ec91f5a8adc9d3496911de2811ad40f282
Currently, due to the way that resources are being retrieved by the
findall() function, an administrator can do a list, snapshot-list, etc.
with the --all_tenants option and see other tenants' resources. If the
admin then tries to delete the another tenants' resource by name, it fails
with a 'No <resource> with a name or ID of <name> exists.' error.
The solution to this is to change the call to the list() function in
findall() to set the all_tenants search option to 1. This causes the
admin to get a list of all the resources that they have access to back
when the search is done instead of just a list of their resources. The
delete by name is then possible. The server takes care of ensuring that
only resources that the user has access to are returned.
This will enable delete by name for all resources that use the find_resource
function.
Closes-bug: 1241682
Change-Id: I4e9957b66c11b7e1081f066d189cedc5a3cb2a6c
Adding volume readonly-mode-update interface to shell and client object
(v1 and v2) to allow end user update volume read-only access mode flag.
blueprint read-only-volumes
Related-Id: I4c84614d6541d5f7c358abadb957da7b8c3d9c48
Change-Id: I2d587f301a21c0d42b8940465862da25a70ed5a8
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
"nova delete" can delete multiple servers in one request but
"cinder delete" can only delete one volume in one request, it is
better to enhance cinder client to support remove multiple volumes
in one request.
Change-Id: I6a63aa3d7e4c152ae5e45bf2b36d862bdcd6df33
Closes-Bug: #1241941
Adding mode argument to volume manager attach function.
Allow Nova using read-write or read-only mode to attach a volume to an
instance.
blueprint read-only-volumes
Change-Id: Ib20c7802304d83f4aafef522171ebd47f672d883
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
This patch deprecates the --volume-id arg of backup-restore
when using the v2 api and adds (preferred) --volume arg.
Both args are still usable but the former is now listed as
"Deprecated" in the help message.
Change-Id: I2575d93041b26f971c59bc04828b356556617b62
Fixes: bug 1242816
get_volume_api_version_from_endpoint currently assumes that the
management_url will always be in the format of
http://<ip>:<port>/vX/<tenant_id>. Customers using a gateway, however,
can get a mangement_url in a different form like
https://<ip>:<port>/<resource>/vX/<tenant_id>. This causes the
get_volume_api_version_from_endpoint to find the resource portion of the
url when looking for the Volume API version which makes the
cinder client unusable.
To resolve this I have implemented an exception handler in the case that
get_volume_api_version_from_endpoint fails. If the exception is thrown, I
check for OS_VOLUME_API_VERSION in the environment and use the value of that
environment variable, if it is set, to determine the API version to use.
There are proposals to fix this via changes to keystone in future releases,
but this provides a way for IaaS Gateway users to proceed with Havana.
Change-Id: I8b978a6ecd87b81c6ae34938e37623ad1cc33994
Closes-Bug: 1233311