Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1649256

Summary: [RFE] Add an option to rebuild root cinder volume that was created from image during instance's rebuild
Product: Red Hat OpenStack Reporter: Alex Stupnikov <astupnik>
Component: openstack-cinderAssignee: Rajat Dhasmana <rdhasman>
Status: CLOSED MIGRATED QA Contact: Yosi Ben Shimon <ybenshim>
Severity: medium Docs Contact: RHOS Documentation Team <rhos-docs>
Priority: high    
Version: 18.0 (Zed)CC: astupnik, dasmith, eglynn, eharney, gcharot, jhakimra, kchamart, ltoscano, lyarwood, sbauza, sgordon, udesale, vromanso, yocha, yrabl
Target Milestone: AlphaKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-05 11:29:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1657696, 1657697, 1847516, 2070445    

Description Alex Stupnikov 2018-11-13 09:23:51 UTC
Description of problem:

There is upstream bug [1] that describes the following issue:

"When rebuild an volume-backed instance using normal images from glance, nothing will be changed for the instance after rebuild except the image name will be added to the instance, the instance is actually again built using the same volume."

Upstream developers treat this bug as a "known limitaion" [2] that will be addressed at some point.

I would like to use this bug to request an RFE implementation and track this issue internally.


[1] https://bugs.launchpad.net/nova/+bug/1482040
[2] https://review.openstack.org/#/c/509282/1

Comment 1 Alex Stupnikov 2018-11-13 09:47:18 UTC
I would like to clarify description a bit, sorry about ambiguous description. There are two scenarios when we may want to rebuild a root cinder volume:

- instance is rebuilt;
- instance is rebuilt with new source image.

I believe that both should be addressed.

BR, Alex.

Comment 2 Alex Stupnikov 2018-11-30 09:40:57 UTC
May I ask you about possible workarounds for this issue? Is it possible to re-build cinder volume  that is used as instance's root volume somehow?

Comment 3 Matthew Booth 2018-11-30 12:22:41 UTC
(In reply to Alex Stupnikov from comment #2)
> May I ask you about possible workarounds for this issue? Is it possible to
> re-build cinder volume  that is used as instance's root volume somehow?

No it isn't, which is the principal limitation here. We need cinder to expose an api to re-image an existing volume. We've had discussions about this in the past, and the objections I recall have been:

* maintaining driver-specific optimisations
* driver-specific limitations wrt snapshots

It's possible that in certain cases the only practical way to re-image a cinder volume may be to mount it and copy the image data back over it, which would obviously be slow. However, cinder would still need to be the service to do this, not least because it's the only service which knows if there's a faster option.

If we had this api, enabling it in Nova would be relatively simple.

Comment 4 Eric Harney 2018-11-30 12:30:41 UTC
(In reply to Matthew Booth from comment #3)
> (In reply to Alex Stupnikov from comment #2)
> > May I ask you about possible workarounds for this issue? Is it possible to
> > re-build cinder volume  that is used as instance's root volume somehow?
> 
> No it isn't, which is the principal limitation here. We need cinder to
> expose an api to re-image an existing volume. We've had discussions about
> this in the past, and the objections I recall have been:
> 
> * maintaining driver-specific optimisations
> * driver-specific limitations wrt snapshots
> 
> It's possible that in certain cases the only practical way to re-image a
> cinder volume may be to mount it and copy the image data back over it, which
> would obviously be slow. However, cinder would still need to be the service
> to do this, not least because it's the only service which knows if there's a
> faster option.
> 
> If we had this api, enabling it in Nova would be relatively simple.

There is currently work underway to add a re-image API to Cinder:

https://git.openstack.org/cgit/openstack/cinder-specs/tree/specs/stein/add-volume-re-image-api.rst

https://review.openstack.org/#/q/topic:bp/add-volume-re-image-api