'control_location' required for 'encryption-type-create'

Bug #1267168 reported by Peter Hamilton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
Avishay Traeger

Bug Description

Location: cinderclient.v1.shell and cinderclient.v2.shell
Method: do_encryption_type_create

Bug:
Omitting the optional parameter 'control_location' when issuing an 'encryption-type-create' call causes the command to fail.

Example:
$ cinder encryption-type-create --cipher aes-xts-plain64 --key_size 512 LUKS nova.volume.encryptors.luks.LuksEncryptor
ERROR: Invalid input received: Valid control location are: ['front-end', 'back-end'] (HTTP 400) (Request-ID: req-94162e5a-80e3-4a3b-8617-d7f0c77f8131)

Proposed Fix:
Checking the corresponding cinder extension shows that the 'control_location' parameter is actually a required parameter when issuing an 'encryption-type-create' call. The fix should simply change the optional 'control_location' parameter into a required one, matching the cinder extension.

Tags: encryption
Changed in python-cinderclient:
assignee: nobody → Peter Hamilton (peter-hamilton)
Changed in python-cinderclient:
status: New → In Progress
Changed in python-cinderclient:
assignee: Peter Hamilton (peter-hamilton) → Avishay Traeger (avishay-il)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/59813
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=6fd8d8e12e7788e7f5b85bc3b8ef2f6ee2eb7714
Submitter: Jenkins
Branch: master

commit 6fd8d8e12e7788e7f5b85bc3b8ef2f6ee2eb7714
Author: Peter Hamilton <email address hidden>
Date: Tue Feb 11 08:36:41 2014 -0500

    Require ctrl_location for encryption-type-create

    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

Changed in python-cinderclient:
status: In Progress → Fix Committed
Changed in python-cinderclient:
milestone: none → 1.3.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.