cinder backup service should change backup & volume status in absence of swift service

Bug #1376199 reported by satyadev svn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Vipin Balachandran
Juno
Fix Released
Medium
Vipin Balachandran

Bug Description

stopped one of swift service [s-object]
Take back up of any existing volume
observed exception in c-bak service logs however status of backup remains in 'creating' only

commands :
stop s-object service

ssatya@autojuno:~/juno/devstack$ cinder backup-create b7d8b000-d69c-4411-ab00-a3911c64ecdc --name test_backup2
+-----------+--------------------------------------+
| Property | Value |
+-----------+--------------------------------------+
| id | c19ecea3-a57c-49b4-94ed-22854a031f53 |
| name | test_backup2 |
| volume_id | b7d8b000-d69c-4411-ab00-a3911c64ecdc |
+-----------+--------------------------------------+
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | None |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | volumebackups |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
ssatya@autojuno:~/juno/devstack$ cinder list
+--------------------------------------+------------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+------------+------+------+-------------+----------+-------------+
| 74c5a098-b2a8-4e80-b82d-18441396280e | available | test | 1 | None | false | |
| b7d8b000-d69c-4411-ab00-a3911c64ecdc | backing-up | test | 1 | None | false | |
+--------------------------------------+------------+------+------+-------------+----------+-------------+
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | volumebackups |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
ssatya@autojuno:~/juno/devstack$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 74c5a098-b2a8-4e80-b82d-18441396280e | available | test | 1 | None | false | |
| b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test | 1 | None | false | |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | volumebackups |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | volumebackups |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
ssatya@autojuno:~/juno/devstack$ date
Wed Oct 1 13:50:27 IST 2014
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | volumebackups |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | volumebackups |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
ssatya@autojuno:~/juno/devstack$ date
Wed Oct 1 13:55:27 IST 2014
ssatya@autojuno:~/juno/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+
| c19ecea3-a57c-49b4-94ed-22854a031f53 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | creating | test_backup2 | 1 | None | volumebackups |
| df49c43a-0ee8-43ad-8254-5c8526922d73 | b7d8b000-d69c-4411-ab00-a3911c64ecdc | available | test_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+--------------+------+--------------+---------------+

Revision history for this message
satyadev svn (svnsatya) wrote :
summary: - cinder backup service should check status of swift center then only do
- backup
+ cinder backup service should change backup & volume status in absence
+ of swift service
Revision history for this message
John Griffith (john-griffith) wrote :

Wow.. this just keeps getting worse :(

Changed in cinder:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Duncan Thomas (duncan-thomas) wrote :

Not sure that this is a bug. Backup to swift requires a working swift installation - the redundancy level of yourswift depends on how you're configured it.

Expecting cinder backup to deal with any fails in swift other than the most gross type is out of scope.

Revision history for this message
John Griffith (john-griffith) wrote :

Most certainly a bug as far as I'm concerned. No reason to sit at "creating" forever... just detect that swift isn't available, timeout or whatever and change the status to failed/error. Sitting in an active state forever is not acceptable IMO.

Revision history for this message
Duncan Thomas (duncan-thomas) wrote :

Fair point, we should time out and go to error

Mike Perez (thingee)
tags: added: backup-service
Changed in cinder:
assignee: nobody → Vipin Balachandran (vbala)
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/127261

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/127261
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=82716b4ac836024b968c76db75be8a92ede0e226
Submitter: Jenkins
Branch: master

commit 82716b4ac836024b968c76db75be8a92ede0e226
Author: Vipin Balachandran <email address hidden>
Date: Thu Oct 9 19:35:46 2014 +0530

    Truncate fail_reason to column length

    During create_backup failure handling, backup_update fails with
    DataError ("Data too long for column") if the fail_reason is
    greater than 255 characters. As a result, backup status is stuck
    in 'creating' state. This patch avoids the problem by truncating
    fail_reason to 255 characters before update.

    Closes-Bug: #1376199
    Change-Id: If0d616b81d3869f7ea110caab8cf4140cf5c5c9e

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/130211

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/juno)

Reviewed: https://review.openstack.org/130211
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=c007350c500d31a38f709f8aae719dce067ebc65
Submitter: Jenkins
Branch: stable/juno

commit c007350c500d31a38f709f8aae719dce067ebc65
Author: Vipin Balachandran <email address hidden>
Date: Thu Oct 9 19:35:46 2014 +0530

    Truncate fail_reason to column length

    During create_backup failure handling, backup_update fails with
    DataError ("Data too long for column") if the fail_reason is
    greater than 255 characters. As a result, backup status is stuck
    in 'creating' state. This patch avoids the problem by truncating
    fail_reason to 255 characters before update.

    Closes-Bug: #1376199
    Change-Id: If0d616b81d3869f7ea110caab8cf4140cf5c5c9e
    (cherry picked from commit 82716b4ac836024b968c76db75be8a92ede0e226)

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
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.