HTTP 500 when trying to restore instance from failed backup

Bug #1338996 reported by Denis M.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Low
Denis M.

Bug Description

Trove-API throughs exception and do not return any valid message to client side when trying to restore instance from failed backup.

--------------------------+-----------+-----------+---------------------+
| ID | Instance ID | Name | Status | Parent ID | Updated |
+--------------------------------------+--------------------------------------+--------------------------------------+-----------+-----------+---------------------+
| 5846ea43-a794-454a-9bf5-0fca27d73062 | 2d85d6b3-d465-4f47-8d29-1d34ba72fa42 | 2d85d6b3-d465-4f47-8d29-1d34ba72fa42 | FAILED | None | 2014-07-08T11:18:57 |
| d31e956c-af0a-4688-a751-52deec236a3c | 2d85d6b3-d465-4f47-8d29-1d34ba72fa42 | 2d85d6b3-d465-4f47-8d29-1d34ba72fa42 | COMPLETED | None | 2014-07-08T11:33:36 |
+--------------------------------------+--------------------------------------+--------------------------------------+-----------+-----------+---------------------+
ubuntu@ubuntu:~/trove-integration/scripts$ trove create mysql_failed 2 --size 2 --backup 5846ea43-a794-454a-9bf5-0fca27d73062
ERROR: Internal Server Error. Please keep this ID to help us figure out what went wrong: (f0990d12-1b9a-45ef-8a97-cd874279445f) (HTTP 500)
ubuntu@ubuntu:~/trove-integration/scripts$ tail ../report/logs/trove-api.log
2014-07-08 04:34:11.600 TRACE trove.common.wsgi return method(*args, **kwargs)
2014-07-08 04:34:11.600 TRACE trove.common.wsgi File "/opt/stack/trove/trove/instance/service.py", line 234, in create
2014-07-08 04:34:11.600 TRACE trove.common.wsgi configuration, slave_of_id)
2014-07-08 04:34:11.600 TRACE trove.common.wsgi File "/opt/stack/trove/trove/instance/models.py", line 633, in create
2014-07-08 04:34:11.600 TRACE trove.common.wsgi verify_checksum=CONF.verify_swift_checksum_on_restore):
2014-07-08 04:34:11.600 TRACE trove.common.wsgi File "/opt/stack/trove/trove/backup/models.py", line 305, in check_swift_object_exist
2014-07-08 04:34:11.600 TRACE trove.common.wsgi parts = self.location.split('/')
2014-07-08 04:34:11.600 TRACE trove.common.wsgi AttributeError: 'NoneType' object has no attribute 'split'
2014-07-08 04:34:11.600 TRACE trove.common.wsgi
2014-07-08 04:34:11.610 INFO eventlet.wsgi [req-b8cc99c2-65cf-46ac-b43b-324e73c73104 dab43ff12e4b4d44bce16a70f5309b84 5fa8973313a247f8b0e79317e8f8ad10] 172.18.196.54 - - [08/Jul/2014 04:34:11] "POST /v1.0/5fa8973313a247f8b0e79317e8f8ad10/instances HTTP/1.1" 500 310 0.188134
ubuntu@ubuntu:~/trove-integration/scripts$ trove create mysql_failed 2 --size 2 --backup 5846ea43-a794-454a-9bf5-0fca27d73062

Denis M. (dmakogon)
Changed in trove:
assignee: nobody → Denis M. (dmakogon)
status: New → Confirmed
description: updated
Changed in trove:
importance: Undecided → Medium
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
status: Confirmed → In Progress
summary: - HTTP 500 when tryint to restore instance from failed backup
+ HTTP 500 when trying to restore instance from failed backup
Changed in trove:
milestone: juno-2 → juno-3
Changed in trove:
milestone: juno-3 → juno-rc1
Revision history for this message
Nikhil Manchanda (slicknik) wrote :

Issue is not release critical to hold juno-rc1 for. Moving to kilo-1.

Changed in trove:
milestone: juno-rc1 → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Denis M. (<email address hidden>) on branch: master
Review: https://review.openstack.org/106042

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Revision history for this message
Amrith Kumar (amrith) wrote :

Updating importance to "Low" (bugscrub, 2014-10-23)

Changed in trove:
importance: Medium → Low
Changed in trove:
milestone: kilo-1 → ongoing
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/130220
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=451c4748fa07332f32ce9dc9f887b2c36d4c834c
Submitter: Jenkins
Branch: master

commit 451c4748fa07332f32ce9dc9f887b2c36d4c834c
Author: Denis Makogon <email address hidden>
Date: Wed Oct 22 16:42:47 2014 +0300

    Fix backup state check while restoring an instance

    Reasons:
     - Trove API service checks backup only for NEW/BUILDING state,
       FAILED state also significant since users are not able to
       restore an instance from FAILED backup.

    Changes:
     - adding 'is_done_successfuly' property to DBBackup object;
     - adding status validation at restoring;
     - fake int-tests proposed.

    Behaviour:
     - server side raises HTTP Conflict(409) when attempting
       to restore an instance from backup that is still running or failed.

    Change-Id: Ide9d0e6f67adaea0c6d99679eba73cebb01c807f
    Closes-Bug: #1338996

Changed in trove:
status: In Progress → Fix Committed
Changed in trove:
milestone: ongoing → kilo-3
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: kilo-3 → 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.