Should check cinder-backup service before changing to "backing-up"

Bug #1221012 reported by Ken'ichi Ohmichi on 2013-09-05
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Medium
Ken'ichi Ohmichi

Bug Description

If cinder-backup service is not enabled, "cinder backup-create" command fails
like the following. As the result, the volume status has been changed to
"backing-up" in spite of not backing-up.

$ cinder backup-create vol-test
ERROR: Service cinder-backup could not be found.
$ cinder list
+--------------------------------------+------------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+------------+--------------+------+-------------+----------+-------------+
| f48aa6ae-4c35-4a6a-a393-5a5cf610945a | backing-up | vol-test | 1 | None | False | |
+--------------------------------------+------------+--------------+------+-------------+----------+-------------+
$

On default policy, a volume status can be changed by admin only.
So it is better to check the cinder-backup existence before changing a volume status.

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

Changed in cinder:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
status: New → In Progress
Changed in cinder:
status: In Progress → Triaged
importance: Undecided → Medium
milestone: none → havana-rc1
Changed in cinder:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/45169
Committed: http://github.com/openstack/cinder/commit/d6dc5cdfa40c3a3aff9bca601968e1fb717c8b2b
Submitter: Jenkins
Branch: master

commit d6dc5cdfa40c3a3aff9bca601968e1fb717c8b2b
Author: Ken'ichi Ohmichi <email address hidden>
Date: Thu Sep 5 13:12:38 2013 +0900

    Check cinder-backup service before "backing-up"

    If cinder-backup service is not enabled, "cinder backup-create"
    command fails like the following. As the result, the volume status
    has been changed to "backing-up" in spite of not backing-up.

    $ cinder backup-create f48aa6ae-4c35-4a6a-a393-5a5cf610945a
    ERROR: Service cinder-backup could not be found.
    $ cinder list
    +--+------------+--------------+------+-------------+----------+-------------+
    |ID| Status | Display Name | Size | Volume Type | Bootable | Attached to |
    +--+------------+--------------+------+-------------+----------+-------------+
    |..| backing-up | vol-test | 1 | None | False | |
    +--+------------+--------------+------+-------------+----------+-------------+
    $

    To avoid this situation, this patch moves the cinder-backup check
    before changing a volume status to "backing-up".

    Fixes bug #1221012

    Change-Id: I42ad41e1cfb6fdb7feebe39a9a5f0356a41d7838

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-10-04
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers