cinder backup api can't make a back-up with attached volume

Bug #1627661 reported by mylq
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Unassigned

Bug Description

I try to use cinder backup api to backup a volume which is attached at an instance,but failed.It is ok for my environment to create a back-up with an available volume,which means that it isn't in use.My OS is ubuntu 14.04,and I installed openstack with swift component by devstack.The version of them is mitaka.
Here is the api link I used:
http://developer.openstack.org/api-ref/block-storage/v3/?expanded=list-all-back-end-storage-pools-detail,show-all-back-end-capabilities-detail,create-a-backup-detail
There is one snapshot below which could explain the bug I meet.
Here is the command I use to create a back-up of in-use volume:

stack@lq:~$ curl -s -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json" -X POST http://127.0.0.1:8776/v3/$OS_TENANT_ID/backups -d '{ "backup":{"container":"vol-9-26","description":"backuptest-description3","name":"lq9-27","force":true,"volume_id":"c2ed4817-738a-47ea-92b9-3ec4da6873f0", "incremental": false} }' | python -m json.tool
{
    "backup": {
        "id": "1f3f8b03-6130-47a5-906b-39df15d5fa98",
        "links": [
            {
                "href": "http://127.0.0.1:8776/v3/539b278df88e4b70adac5479434ab01c/backups/1f3f8b03-6130-47a5-906b-39df15d5fa98",
                "rel": "self"
            },
            {
                "href": "http://127.0.0.1:8776/539b278df88e4b70adac5479434ab01c/backups/1f3f8b03-6130-47a5-906b-39df15d5fa98",
                "rel": "bookmark"
            }
        ],
        "name": "lq9-27"
    }
}

stack@lq:~$ curl -s -H "X-Auth-Token: $OS_TOKEN" http://127.0.0.1:8776/v3/$OS_TENANT_ID/backups/1f3f8b03-6130-47a5-906b-39df15d5fa98 | python -m json.tool
{
    "backup": {
        "availability_zone": "nova",
        "container": "vol-9-26",
        "created_at": "2016-07-13T11:58:00.000000",
        "data_timestamp": "2016-07-13T11:58:00.000000",
        "description": "backuptest-description3",
        "fail_reason": "Timed out waiting for a reply to message ID 11b441e1d4834c7ea9fe47a648c429ed",
        "has_dependent_backups": false,
        "id": "1f3f8b03-6130-47a5-906b-39df15d5fa98",
        "is_incremental": false,
        "links": [
            {
                "href": "http://127.0.0.1:8776/v3/539b278df88e4b70adac5479434ab01c/backups/1f3f8b03-6130-47a5-906b-39df15d5fa98",
                "rel": "self"
            },
            {
                "href": "http://127.0.0.1:8776/539b278df88e4b70adac5479434ab01c/backups/1f3f8b03-6130-47a5-906b-39df15d5fa98",
                "rel": "bookmark"
            }
        ],
        "name": "lq9-27",
        "object_count": 0,
        "size": 1,
        "snapshot_id": null,
        "status": "error",
        "updated_at": "2016-07-13T11:59:24.000000",
        "volume_id": "c2ed4817-738a-47ea-92b9-3ec4da6873f0"
    }
}

Tags: api backup cinder
Revision history for this message
mylq (leibnizlq) wrote :
mylq (leibnizlq)
no longer affects: openstack-api-site
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

What release of Cinder are you using?

Revision history for this message
mylq (leibnizlq) wrote :

the version of cinder I use is mitaka

summary: - cinder backup api cann't make a back-up with attached volume
+ cinder backup api can't make a back-up with attached volume
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

In the latest version of Cinder API we have --force flag for it

Changed in cinder:
status: New → Incomplete
Revision history for this message
Janice Chen (chenshujuan) wrote :

I have met the same problem in mitaka version recently, even if use --force flag,it does not work for 'in-use' volume.it seems stucks while _transfer_data.But it works fine with the 'available' volume with the same configuration.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Almost a year old, so this may be asking for a lot. Please include:

* Volume backend driver being used
* Backup driver being used
* Cinder logs capturing the operation failure

han (mr-bo)
Changed in cinder:
status: Incomplete → Invalid
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.