StarlingX 1.0 - Save image to local storage

Bug #1844642 reported by Volker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Invalid
High
Austin Sun

Bug Description

i try to create an backup image from an VM, it ends always in an zero byte image file.

Severity
--------
Major: System/Feature is usable but degraded

Steps to Reproduce
------------------
$ openstack server image create 284fa6e5-093e-41d9-89ec-112017d3ca37 --name test-01
$ openstack image save --file snapshot.raw 3dfa78d9-5c57-4a4a-9291-22de406e3017
$ ll
-rw-r--r-- 1 wrsroot wrs 0 Sep 19 08:49 snapshot.raw

Expected Behavior
------------------
I want to get an image to pass to another stack to run it again.

Actual Behavior
----------------
the "image save" command will always ends in an empty file

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Multi-node system, Dedicated storage
2x controller
2x compute
3x storage

Branch/Pull Time/Commit
-----------------------
StarlingX 2018.10 stable

Last Pass
---------
personality never test it before

Timestamp/Logs
--------------
see attachment

Revision history for this message
Volker (skydiablo) wrote :
Austin Sun (sunausti)
Changed in starlingx:
assignee: nobody → Austin Sun (sunausti)
Revision history for this message
Volker (skydiablo) wrote :

so, this is my workaround to handle the given problem:

# create snapshot (use "--force" if volume is currently in use)
$ openstack volume snapshot create --volume <VOLUME-UID> --force "test - snap"

# list new snapshot
$ openstack volume snapshot list
+--------------------------------------+-------------+-------------+-----------+------+
| ID | Name | Description | Status | Size |
+--------------------------------------+-------------+-------------+-----------+------+
| a940f54f-920c-4f00-8207-5992f290c185 | test - snap | None | available | 20 |
+--------------------------------------+-------------+-------------+-----------+------+

# create new volume from snapshot
$ openstack volume create --snapshot a940f54f-920c-4f00-8207-5992f290c185 "test - snap - vol"

# list new volume
$ openstack volume list
+--------------------------------------+-------------------+-----------+------+-------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+-------------------+-----------+------+-------------+
| 3c9414bb-98bd-45d4-9b38-2b073e958f81 | test - snap - vol | available | 20 | |
+--------------------------------------+-------------------+-----------+------+-------------+

# create image from volume (this will run a longe runing task -> gemu-img)
$ openstack image create --volume 3c9414bb-98bd-45d4-9b38-2b073e958f81 --disk-format qcow2 "test - snap - vol - img"

# list images
$ openstack image list
+--------------------------------------+-------------------------+--------+
| ID | Name | Status |
+--------------------------------------+-------------------------+--------+
| 5394ce72-5bb5-49e7-8bf3-7e3ae472b1da | test - snap - vol - img | saving |
+--------------------------------------+-------------------------+--------+

# wait until "status" is "active"
#----
# save new created image to local disk
$ openstack image save --file "/opt/img-conversions/export/test.qcow2.img" 5394ce72-5bb5-49e7-8bf3-7e3ae472b1da

# check output
$ ll /opt/img-conversions/export/test.qcow2.img
-rw-r--r-- 1 wrsroot wrs 7959085056 Sep 20 12:17 /opt/img-conversions/export/test.qcow2.img

maybe this will help some one else...

greez, volker...

Revision history for this message
Volker (skydiablo) wrote :

it is not realy fixed for me. maybe not the identical scope but i hope for help:

the describe way up to this will work but if i try to backup a 2TB volume and convert to an image, cinder will crash.

command:
$ openstack image create --volume 3c9414bb-98bd-45d4-9b38-2b073e958f81 --disk-format qcow2 "test - snap - vol - img"

$ tail /var/log/cinder/cinder-volume.log
2019-09-20 14:30:35.202 26339 WARNING oslo.service.loopingcall [req-4435ac18-f021-4784-8fcd-b73d257636a7 - - - - -] Function 'cinder.service.Service.report_state' run outlasted interval by 2.95 sec
2019-09-20 14:30:45.595 22211 INFO oslo_service.service [req-962ea9a1-97c7-48b0-99a4-b1651b8c2cac - - - - -] Caught SIGTERM, stopping children
2019-09-20 14:30:45.596 22211 INFO oslo_service.service [req-962ea9a1-97c7-48b0-99a4-b1651b8c2cac - - - - -] Waiting on 1 children to exit

in the same way, the complete controller will unavailable and it will switch to the other one ... this is not so good :( i realy need this volume/image ...

greez & thx, volker...

Ghada Khalil (gkhalil)
tags: added: stx.distro.openstack stx.storage
Changed in starlingx:
status: New → In Progress
importance: Undecided → High
tags: added: stx.1.0
Revision history for this message
Austin Sun (sunausti) wrote :

Hi Volker:
    Thanks your find WA. about cinder crash , would you like to provide new log on both (controller and compute) ? and as email discussed , would you like try WA back-up directly from Ceph.
https://blog.headup.ws/node/34

Revision history for this message
Volker (skydiablo) wrote :

ok, cool & thx! direct-download from ceph seems to work. because of the huge 2TB raw image, i have to convert and compress the image to qcow2. the good news, QEMU can access an image as a virtual block device directly via librbd:

qemu-img convert -c -f raw -O qcow2 rbd:cinder-volumes/volume-5074b5e1-8c4b-4275-a380-74fe4a5482b6 /opt/img-conversions/export/sci-vdb.qcow2.img

i takes hours, but it works ;)

it is nessesary to export a complete log to further research the cinder problem or will it obsolate because of deprecated staringX version?

Revision history for this message
Austin Sun (sunausti) wrote :

Hi Volker:
    It's glad to hear your problem have been fixed. yes, would you like close this bug for cinder issue ?
 because it is pike version , in stx.2.0 the openstack have been upgraded to stein.

Thanks.
BR
Austin Sun.

Revision history for this message
Austin Sun (sunausti) wrote :

change it to incomplete now, if Volker agree , then we can close this .

Changed in starlingx:
status: In Progress → Incomplete
Austin Sun (sunausti)
Changed in starlingx:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers