Import existing volume failed due to missing 'optional_args' arguments

Bug #1334086 reported by Tina Tang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Jeegn Chen

Bug Description

Import existing volume failed with below ERROR:
2014-06-24 13:04:54.407 110362 ERROR oslo.messaging.rpc.dispatcher [req-7aff78e5-92c2-4864-8388-7884068e3360 86341fc3271b4e2da241dd3b603c52f5 0807a39b955048ed88c123c9b3a0485b - - -] Exception during message handling: taskflow.patterns.linear_flow.Flow: volume_manage_existing_manager; 7 requires ['optional_args'] but no other entity produces said requirements

Commit 971a63bd9cf675a00bce1244ec101577b5c17cac has added a new parameter 'optional_args' to execute method of QuotaReserveTask and QuotaCommitTask. So where those Task used need change to provide the new parameter.

This commit has changed volume create task flow as below to provide the new parameter. We need the samiliar change to get_flow method in cinder\volume\flows\manager\manage_existing.py

diff --git a/cinder/volume/api.py b/cinder/volume/api.py
index 2fd65bf..8e4201c 100644
--- a/cinder/volume/api.py
+++ b/cinder/volume/api.py
@@ -174,6 +174,7 @@ class API(base.Base):
             'scheduler_hints': scheduler_hints,
             'key_manager': self.key_manager,
             'backup_source_volume': backup_source_volume,
+ 'optional_args': {'is_quota_committed': False}
         }

Commit comment of b5c17cac for reference:
     Made provision for providing optional arguments

    The 'quota_committed' attribute of 'RequestContext' object is
    a transient property, so it will not be saved in the taskflow
    persistent storage. The updated value of 'quota_committed'
    attribute will not be available while resuming/reverting the
    flow, if cinder api-service is down/stopped after committing
    the quota.

    Since this 'quota_committed' attribute is not used anywhere
    in cinder project other than in create-volume taskflow api, so
    removed 'quota_committed' from RequestContext and made
    provision to pass it as an optional argument which will be
    passed to api-flow via create_what dictionary, in order to
    make it persistent and use it as and when needed.

Jeegn Chen (jeegn-chen)
Changed in cinder:
assignee: nobody → Jeegn Chen (jeegn-chen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/103710

Changed in cinder:
status: New → In Progress
Changed in cinder:
importance: Undecided → High
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/103710
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=8d6e9cf0fc564942dce14ce8f133c5d0ee06c4f4
Submitter: Jenkins
Branch: master

commit 8d6e9cf0fc564942dce14ce8f133c5d0ee06c4f4
Author: Jeegn Chen <email address hidden>
Date: Tue Jul 1 11:31:19 2014 +0800

    Add optional_args to fix Volume Import failure

    Commit 971a63bd9cf675a00bce1244ec101577b5c17cac added a new
    parameter 'optional_args' to execute method of QuotaReserveTask
    and QuotaCommitTask. So the new parameter should be needed where
    those Tasks are used. This changed volume create task flow to
    provide the new parameter. We need the samiliar change to get_flow
    method in cinder/volume/flows/manager/manage_existing.py

    Trigger EMC VNX CI

    Change-Id: Ifed7bd146eec82ba35c2b2c19e9bacd2259ae3ed
    Closes-Bug: #1334086

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-2 → 2014.2
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.