[glalnce][ceph] delete snapshot after creating instance
Folks, I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B. 1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use) Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots. What is the alternative here? I can try qcow2 if that is the final solution to make it clean. # rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
You can just flatten the image to make it independent from the parent image. After flattening (rbd flatten) you could sparsify it to get some storage capacity back. Zitat von Satish Patel <satish.txt@gmail.com>:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Hi Abhishek, I am running version 2023.1 openstack with Quincy ceph release. On Wed, Jan 24, 2024 at 1:06 PM Eugen Block <eblock@nde.ag> wrote:
You can just flatten the image to make it independent from the parent image. After flattening (rbd flatten) you could sparsify it to get some storage capacity back.
Zitat von Satish Patel <satish.txt@gmail.com>:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Hi Eugen, Could you give me example commands and processes to flatten? Do I need to flatten from ceph storage and how does glance understand that image is flatten and how to delete it from glance? On Wed, Jan 24, 2024 at 1:06 PM Eugen Block <eblock@nde.ag> wrote:
You can just flatten the image to make it independent from the parent image. After flattening (rbd flatten) you could sparsify it to get some storage capacity back.
Zitat von Satish Patel <satish.txt@gmail.com>:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
If I understand your workflow correctly you just need to import the snapshot to cluster B, on cluster B you then flatten the base (glance) image: rbd flatten glance/<SOME_UUID> This should remove all references from the parent image from cluster A. Glance doesn't really care about that (as far as I know). You can then create a new snapshot (and protect it) for that image so glance on cluster B can create children: rbd snap create glance/<SOME_UUID>@snap rbd snap protect glance/<SOME_UUID>@snap That should basically be it, now you can launch instances on site B from that imported image. What I don't understand yet is this part: "and how does glance understand [...] and how to delete it from glance?" I thought you wanted a new base image on site B, why deleting it from glance? Or are you referring to the snapshot on site A? If that's the case then you don't need to worry about that after the image has been flattened, it removes all references to site A, you should be able to delete the snapshot on site A. Zitat von Satish Patel <satish.txt@gmail.com>:
Hi Eugen,
Could you give me example commands and processes to flatten? Do I need to flatten from ceph storage and how does glance understand that image is flatten and how to delete it from glance?
On Wed, Jan 24, 2024 at 1:06 PM Eugen Block <eblock@nde.ag> wrote:
You can just flatten the image to make it independent from the parent image. After flattening (rbd flatten) you could sparsify it to get some storage capacity back.
Zitat von Satish Patel <satish.txt@gmail.com>:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Thanks for the explanation. Openstack A is very old and at the end of life.. I am going to burn it to the ground. I just want to move some instances from Openstack A to Openstack B (This is all legacy applications and hard to rebuild). Once I move the snapshot to Openstack B and spin up the vm after that I don't need that snapshot hanging around. I can just delete it and make the glance registry neat and clean. Do I need to flatten the image in Openstack A (old) ? On Wed, Jan 24, 2024 at 1:41 PM Eugen Block <eblock@nde.ag> wrote:
If I understand your workflow correctly you just need to import the snapshot to cluster B, on cluster B you then flatten the base (glance) image:
rbd flatten glance/<SOME_UUID>
This should remove all references from the parent image from cluster A. Glance doesn't really care about that (as far as I know). You can then create a new snapshot (and protect it) for that image so glance on cluster B can create children:
rbd snap create glance/<SOME_UUID>@snap rbd snap protect glance/<SOME_UUID>@snap
That should basically be it, now you can launch instances on site B from that imported image. What I don't understand yet is this part: "and how does glance understand [...] and how to delete it from glance?" I thought you wanted a new base image on site B, why deleting it from glance? Or are you referring to the snapshot on site A? If that's the case then you don't need to worry about that after the image has been flattened, it removes all references to site A, you should be able to delete the snapshot on site A.
Zitat von Satish Patel <satish.txt@gmail.com>:
Hi Eugen,
Could you give me example commands and processes to flatten? Do I need to flatten from ceph storage and how does glance understand that image is flatten and how to delete it from glance?
On Wed, Jan 24, 2024 at 1:06 PM Eugen Block <eblock@nde.ag> wrote:
You can just flatten the image to make it independent from the parent image. After flattening (rbd flatten) you could sparsify it to get some storage capacity back.
Zitat von Satish Patel <satish.txt@gmail.com>:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Just to prevent misunderstandings, can you clarify how exactly you create the snapshots? Are we talking about nova snapshots (for example from the dashboard) or rbd snapshots? Nova snaps result in new glance images. Before I make too many assumptions, maybe you could clarify what exactly you're trying to do (commands, results etc.). I would do it on rbd side: - Stop VM - Create rbd snapshot on cluster A - Export/Import rbd snap into ceph cluster B --> You could import it directly into the cinder pool on site B and "cinder manage" it. Then launch an instance from that volume. - Flatten rbd image on cluster B to make it independent of snap on site A - Remove snap no site A - Delete image on site A This is written up by heart, so it might be incomplete or not fully applicable to your case. So please clarify if I make wrong assumptions. Zitat von Satish Patel <satish.txt@gmail.com>:
Thanks for the explanation.
Openstack A is very old and at the end of life.. I am going to burn it to the ground. I just want to move some instances from Openstack A to Openstack B (This is all legacy applications and hard to rebuild). Once I move the snapshot to Openstack B and spin up the vm after that I don't need that snapshot hanging around. I can just delete it and make the glance registry neat and clean.
Do I need to flatten the image in Openstack A (old) ?
On Wed, Jan 24, 2024 at 1:41 PM Eugen Block <eblock@nde.ag> wrote:
If I understand your workflow correctly you just need to import the snapshot to cluster B, on cluster B you then flatten the base (glance) image:
rbd flatten glance/<SOME_UUID>
This should remove all references from the parent image from cluster A. Glance doesn't really care about that (as far as I know). You can then create a new snapshot (and protect it) for that image so glance on cluster B can create children:
rbd snap create glance/<SOME_UUID>@snap rbd snap protect glance/<SOME_UUID>@snap
That should basically be it, now you can launch instances on site B from that imported image. What I don't understand yet is this part: "and how does glance understand [...] and how to delete it from glance?" I thought you wanted a new base image on site B, why deleting it from glance? Or are you referring to the snapshot on site A? If that's the case then you don't need to worry about that after the image has been flattened, it removes all references to site A, you should be able to delete the snapshot on site A.
Zitat von Satish Patel <satish.txt@gmail.com>:
Hi Eugen,
Could you give me example commands and processes to flatten? Do I need to flatten from ceph storage and how does glance understand that image is flatten and how to delete it from glance?
On Wed, Jan 24, 2024 at 1:06 PM Eugen Block <eblock@nde.ag> wrote:
You can just flatten the image to make it independent from the parent image. After flattening (rbd flatten) you could sparsify it to get some storage capacity back.
Zitat von Satish Patel <satish.txt@gmail.com>:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
I am using openstack horizon to create a snapshot of an instance and then download that snapshot using glance image-download command and just import to Openstack B cloud. good to know that I can use ceph rbd to take a snapshot and import directly to ceph clusterB. (I will run this experiment) Last question importing directly from rbd command how does cinder service know and DB will understand there is a volume available. (As you mentioned I need to use the cinder manager command to add entries in DB) I will google and see if I can find some help there. On Wed, Jan 24, 2024 at 1:57 PM Eugen Block <eblock@nde.ag> wrote:
Just to prevent misunderstandings, can you clarify how exactly you create the snapshots? Are we talking about nova snapshots (for example from the dashboard) or rbd snapshots? Nova snaps result in new glance images. Before I make too many assumptions, maybe you could clarify what exactly you're trying to do (commands, results etc.).
I would do it on rbd side: - Stop VM - Create rbd snapshot on cluster A - Export/Import rbd snap into ceph cluster B --> You could import it directly into the cinder pool on site B and "cinder manage" it. Then launch an instance from that volume. - Flatten rbd image on cluster B to make it independent of snap on site A - Remove snap no site A - Delete image on site A
This is written up by heart, so it might be incomplete or not fully applicable to your case. So please clarify if I make wrong assumptions.
Zitat von Satish Patel <satish.txt@gmail.com>:
Thanks for the explanation.
Openstack A is very old and at the end of life.. I am going to burn it to the ground. I just want to move some instances from Openstack A to Openstack B (This is all legacy applications and hard to rebuild). Once I move the snapshot to Openstack B and spin up the vm after that I don't need that snapshot hanging around. I can just delete it and make the glance registry neat and clean.
Do I need to flatten the image in Openstack A (old) ?
On Wed, Jan 24, 2024 at 1:41 PM Eugen Block <eblock@nde.ag> wrote:
If I understand your workflow correctly you just need to import the snapshot to cluster B, on cluster B you then flatten the base (glance) image:
rbd flatten glance/<SOME_UUID>
This should remove all references from the parent image from cluster A. Glance doesn't really care about that (as far as I know). You can then create a new snapshot (and protect it) for that image so glance on cluster B can create children:
rbd snap create glance/<SOME_UUID>@snap rbd snap protect glance/<SOME_UUID>@snap
That should basically be it, now you can launch instances on site B from that imported image. What I don't understand yet is this part: "and how does glance understand [...] and how to delete it from glance?" I thought you wanted a new base image on site B, why deleting it from glance? Or are you referring to the snapshot on site A? If that's the case then you don't need to worry about that after the image has been flattened, it removes all references to site A, you should be able to delete the snapshot on site A.
Zitat von Satish Patel <satish.txt@gmail.com>:
Hi Eugen,
Could you give me example commands and processes to flatten? Do I need to flatten from ceph storage and how does glance understand that image is flatten and how to delete it from glance?
On Wed, Jan 24, 2024 at 1:06 PM Eugen Block <eblock@nde.ag> wrote:
You can just flatten the image to make it independent from the parent image. After flattening (rbd flatten) you could sparsify it to get some storage capacity back.
Zitat von Satish Patel <satish.txt@gmail.com>:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Hi Satish, Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described. Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described. [1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-... Thanks & Best Regards, Abhishek Kekane On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Do you have a patch link which I can just apply patch to glance and move on instead of upgrading the entire openstack? On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described.
Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described.
[1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-...
Thanks & Best Regards,
Abhishek Kekane
On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Hi Abhishek, I found a patch here - https://review.opendev.org/c/openstack/glance_store/+/896447 Can I just simplay apply this patch on existing glance and see if it works or not? On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described.
Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described.
[1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-...
Thanks & Best Regards,
Abhishek Kekane
On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Hi Satish, This needs to be applied on glance_store and not glance. Thanks & Best Regards, Abhishek Kekane On Thu, Jan 25, 2024 at 12:18 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
I found a patch here - https://review.opendev.org/c/openstack/glance_store/+/896447 Can I just simplay apply this patch on existing glance and see if it works or not?
On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described.
Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described.
[1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-...
Thanks & Best Regards,
Abhishek Kekane
On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
I did apply this patch by patch command (manually) - https://review.opendev.org/c/openstack/glance_store/+/896447 Still getting errors. Do I need to do anything else like recreate instance or snapshot etc. 2024-01-24 19:03:53.165 47 WARNING glance_store._drivers.rbd [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Snap Operating Exception [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') Snapshot is in use.: rbd.ImageBusy: [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') 2024-01-24 19:03:53.171 47 WARNING glance.api.v2.images [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Image 3708f961-fb74-49f1-ab9b-40cf7954abed could not be deleted because it is in use: The image cannot be deleted because it is in use through the backend store outside of Glance.: glance_store.exceptions.InUseByStore: The image cannot be deleted because it is in use through the backend store outside of Glance. On Wed, Jan 24, 2024 at 1:54 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
This needs to be applied on glance_store and not glance.
Thanks & Best Regards,
Abhishek Kekane
On Thu, Jan 25, 2024 at 12:18 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
I found a patch here - https://review.opendev.org/c/openstack/glance_store/+/896447 Can I just simplay apply this patch on existing glance and see if it works or not?
On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described.
Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described.
[1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-...
Thanks & Best Regards,
Abhishek Kekane
On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Hi Abhishek, Do you think this error means I have a protected snapshot? # rbd snap ls images/3708f961-fb74-49f1-ab9b-40cf7954abed SNAPID NAME SIZE PROTECTED TIMESTAMP 55 snap 40 GiB yes Wed Jan 17 13:41:35 2024 On Wed, Jan 24, 2024 at 2:05 PM Satish Patel <satish.txt@gmail.com> wrote:
I did apply this patch by patch command (manually) - https://review.opendev.org/c/openstack/glance_store/+/896447
Still getting errors. Do I need to do anything else like recreate instance or snapshot etc.
2024-01-24 19:03:53.165 47 WARNING glance_store._drivers.rbd [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Snap Operating Exception [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') Snapshot is in use.: rbd.ImageBusy: [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') 2024-01-24 19:03:53.171 47 WARNING glance.api.v2.images [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Image 3708f961-fb74-49f1-ab9b-40cf7954abed could not be deleted because it is in use: The image cannot be deleted because it is in use through the backend store outside of Glance.: glance_store.exceptions.InUseByStore: The image cannot be deleted because it is in use through the backend store outside of Glance.
On Wed, Jan 24, 2024 at 1:54 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
This needs to be applied on glance_store and not glance.
Thanks & Best Regards,
Abhishek Kekane
On Thu, Jan 25, 2024 at 12:18 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
I found a patch here - https://review.opendev.org/c/openstack/glance_store/+/896447 Can I just simplay apply this patch on existing glance and see if it works or not?
On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described.
Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described.
[1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-...
Thanks & Best Regards,
Abhishek Kekane
On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
Hi Abhishek/Eugen, I found this solution and it works with patches or anything. Just flatten the image as Eugen mentioned without doing any hassle. Just find children and flatten it and delete the image from glance. I wish glance api had a flag to pass --flatten flag to make it work. @Abhishek Kekane <akekane@redhat.com> I would like to follow up with you about your patch. Why is it not working for me? # rbd children images/3708f961-fb74-49f1-ab9b-40cf7954abed volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a # rbd du volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a NAME PROVISIONED USED volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a 40 GiB 8.1 GiB <-- 8.1 GB # rbd flatten volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a Image flatten: 100% complete...done. # rbd du volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a NAME PROVISIONED USED volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a 40 GiB 8.5 GiB <-- 8.5 GB # openstack image delete 3708f961-fb74-49f1-ab9b-40cf7954abed # On Wed, Jan 24, 2024 at 2:39 PM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
Do you think this error means I have a protected snapshot?
# rbd snap ls images/3708f961-fb74-49f1-ab9b-40cf7954abed SNAPID NAME SIZE PROTECTED TIMESTAMP 55 snap 40 GiB yes Wed Jan 17 13:41:35 2024
On Wed, Jan 24, 2024 at 2:05 PM Satish Patel <satish.txt@gmail.com> wrote:
I did apply this patch by patch command (manually) - https://review.opendev.org/c/openstack/glance_store/+/896447
Still getting errors. Do I need to do anything else like recreate instance or snapshot etc.
2024-01-24 19:03:53.165 47 WARNING glance_store._drivers.rbd [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Snap Operating Exception [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') Snapshot is in use.: rbd.ImageBusy: [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') 2024-01-24 19:03:53.171 47 WARNING glance.api.v2.images [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Image 3708f961-fb74-49f1-ab9b-40cf7954abed could not be deleted because it is in use: The image cannot be deleted because it is in use through the backend store outside of Glance.: glance_store.exceptions.InUseByStore: The image cannot be deleted because it is in use through the backend store outside of Glance.
On Wed, Jan 24, 2024 at 1:54 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
This needs to be applied on glance_store and not glance.
Thanks & Best Regards,
Abhishek Kekane
On Thu, Jan 25, 2024 at 12:18 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
I found a patch here - https://review.opendev.org/c/openstack/glance_store/+/896447 Can I just simplay apply this patch on existing glance and see if it works or not?
On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described.
Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described.
[1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-...
Thanks & Best Regards,
Abhishek Kekane
On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,
I have two openstack clouds and both have their own Ceph backend storage.I am trying to migrate instances from openstack A to openstack B.
1. Take a snapshot from A 2. Export snapshot and import to B 3. Create instance on B 4. Delete snapshot - (I am getting error because its in-use)
Because it has a parent reference to that volume. How do I remove the reference so it will let me delete a snapshot. Reason I am asking is because I have so many VMs to migrate and don't want glance to have 100s of entities in those snapshots.
What is the alternative here? I can try qcow2 if that is the final solution to make it clean.
# rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': size 40 GiB in 5120 objects order 23 (8 MiB objects) snapshot_count: 0 id: 5473c827864fed block_name_prefix: rbd_data.5473c827864fed format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten op_features: flags: create_timestamp: Fri Jan 19 19:03:25 2024 access_timestamp: Wed Jan 24 15:51:04 2024 modify_timestamp: Wed Jan 24 15:52:40 2024 parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap overlap: 40 GiB
On Thu, Jan 25, 2024 at 2:05 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek/Eugen,
I found this solution and it works with patches or anything. Just flatten the image as Eugen mentioned without doing any hassle. Just find children and flatten it and delete the image from glance. I wish glance api had a flag to pass --flatten flag to make it work.
@Abhishek Kekane <akekane@redhat.com> I would like to follow up with you about your patch. Why is it not working for me?
I am not sure where and how you applied the patch and what steps you taken after applying the patch. - Abhishek
# rbd children images/3708f961-fb74-49f1-ab9b-40cf7954abed volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a
# rbd du volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a NAME PROVISIONED USED volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a 40 GiB 8.1 GiB <-- 8.1 GB
# rbd flatten volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a Image flatten: 100% complete...done.
# rbd du volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a NAME PROVISIONED USED volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a 40 GiB 8.5 GiB <-- 8.5 GB
# openstack image delete 3708f961-fb74-49f1-ab9b-40cf7954abed #
On Wed, Jan 24, 2024 at 2:39 PM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
Do you think this error means I have a protected snapshot?
# rbd snap ls images/3708f961-fb74-49f1-ab9b-40cf7954abed SNAPID NAME SIZE PROTECTED TIMESTAMP 55 snap 40 GiB yes Wed Jan 17 13:41:35 2024
On Wed, Jan 24, 2024 at 2:05 PM Satish Patel <satish.txt@gmail.com> wrote:
I did apply this patch by patch command (manually) - https://review.opendev.org/c/openstack/glance_store/+/896447
Still getting errors. Do I need to do anything else like recreate instance or snapshot etc.
2024-01-24 19:03:53.165 47 WARNING glance_store._drivers.rbd [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Snap Operating Exception [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') Snapshot is in use.: rbd.ImageBusy: [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') 2024-01-24 19:03:53.171 47 WARNING glance.api.v2.images [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Image 3708f961-fb74-49f1-ab9b-40cf7954abed could not be deleted because it is in use: The image cannot be deleted because it is in use through the backend store outside of Glance.: glance_store.exceptions.InUseByStore: The image cannot be deleted because it is in use through the backend store outside of Glance.
On Wed, Jan 24, 2024 at 1:54 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
This needs to be applied on glance_store and not glance.
Thanks & Best Regards,
Abhishek Kekane
On Thu, Jan 25, 2024 at 12:18 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
I found a patch here - https://review.opendev.org/c/openstack/glance_store/+/896447 Can I just simplay apply this patch on existing glance and see if it works or not?
On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
Which version of openstack are you using? In bobcat (glance_store version 4.6.0) we have added a feature [1] RBD Trash to cover the issue you described.
Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will fail with the issue you described.
[1] https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-...
Thanks & Best Regards,
Abhishek Kekane
On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> wrote:
> Folks, > > I have two openstack clouds and both have their own Ceph backend > storage.I am trying to migrate instances from openstack A to openstack B. > > 1. Take a snapshot from A > 2. Export snapshot and import to B > 3. Create instance on B > 4. Delete snapshot - (I am getting error because its in-use) > > Because it has a parent reference to that volume. How do I remove > the reference so it will let me delete a snapshot. Reason I am asking is > because I have so many VMs to migrate and don't want glance to have 100s of > entities in those snapshots. > > What is the alternative here? I can try qcow2 if that is the final > solution to make it clean. > > # rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a > rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': > size 40 GiB in 5120 objects > order 23 (8 MiB objects) > snapshot_count: 0 > id: 5473c827864fed > block_name_prefix: rbd_data.5473c827864fed > format: 2 > features: layering, exclusive-lock, object-map, fast-diff, deep-flatten > op_features: > flags: > create_timestamp: Fri Jan 19 19:03:25 2024 > access_timestamp: Wed Jan 24 15:51:04 2024 > modify_timestamp: Wed Jan 24 15:52:40 2024 > parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap > overlap: 40 GiB > >
I just downloaded a patch [1] file and applied to glance_store using patch -p1 command and I have verified it properly patch rbd.py driver file as per original patch. Next question is do I need to re-upload the snapshot in order to test this patch or will it work with the existing snapshot. [1] https://review.opendev.org/c/openstack/glance_store/+/896447 On Thu, Jan 25, 2024 at 12:38 AM Abhishek Kekane <akekane@redhat.com> wrote:
On Thu, Jan 25, 2024 at 2:05 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek/Eugen,
I found this solution and it works with patches or anything. Just flatten the image as Eugen mentioned without doing any hassle. Just find children and flatten it and delete the image from glance. I wish glance api had a flag to pass --flatten flag to make it work.
@Abhishek Kekane <akekane@redhat.com> I would like to follow up with you about your patch. Why is it not working for me?
I am not sure where and how you applied the patch and what steps you taken after applying the patch.
- Abhishek
# rbd children images/3708f961-fb74-49f1-ab9b-40cf7954abed volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a
# rbd du volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a NAME PROVISIONED USED volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a 40 GiB 8.1 GiB <-- 8.1 GB
# rbd flatten volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a Image flatten: 100% complete...done.
# rbd du volumes/volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a NAME PROVISIONED USED volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a 40 GiB 8.5 GiB <-- 8.5 GB
# openstack image delete 3708f961-fb74-49f1-ab9b-40cf7954abed #
On Wed, Jan 24, 2024 at 2:39 PM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
Do you think this error means I have a protected snapshot?
# rbd snap ls images/3708f961-fb74-49f1-ab9b-40cf7954abed SNAPID NAME SIZE PROTECTED TIMESTAMP 55 snap 40 GiB yes Wed Jan 17 13:41:35 2024
On Wed, Jan 24, 2024 at 2:05 PM Satish Patel <satish.txt@gmail.com> wrote:
I did apply this patch by patch command (manually) - https://review.opendev.org/c/openstack/glance_store/+/896447
Still getting errors. Do I need to do anything else like recreate instance or snapshot etc.
2024-01-24 19:03:53.165 47 WARNING glance_store._drivers.rbd [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Snap Operating Exception [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') Snapshot is in use.: rbd.ImageBusy: [errno 16] RBD image is busy (error unprotecting snapshot b'3708f961-fb74-49f1-ab9b-40cf7954abed'@b'snap') 2024-01-24 19:03:53.171 47 WARNING glance.api.v2.images [None req-c4d10e8a-1bc3-496c-8df1-6156582d760f 93e2d918bc7a4d92a93df927743d00ff 08cae850a5bb47d998da180a7f0e2660 - - default default] Image 3708f961-fb74-49f1-ab9b-40cf7954abed could not be deleted because it is in use: The image cannot be deleted because it is in use through the backend store outside of Glance.: glance_store.exceptions.InUseByStore: The image cannot be deleted because it is in use through the backend store outside of Glance.
On Wed, Jan 24, 2024 at 1:54 PM Abhishek Kekane <akekane@redhat.com> wrote:
Hi Satish,
This needs to be applied on glance_store and not glance.
Thanks & Best Regards,
Abhishek Kekane
On Thu, Jan 25, 2024 at 12:18 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Abhishek,
I found a patch here - https://review.opendev.org/c/openstack/glance_store/+/896447 Can I just simplay apply this patch on existing glance and see if it works or not?
On Wed, Jan 24, 2024 at 12:07 PM Abhishek Kekane <akekane@redhat.com> wrote:
> Hi Satish, > > Which version of openstack are you using? > In bobcat (glance_store version 4.6.0) we have added a feature [1] > RBD Trash to cover the issue you described. > > Pre bobcat (glance_store version < 4.6.0), deletion of snapshot will > fail with the issue you described. > > [1] > https://docs.openstack.org/releasenotes/glance_store/2023.2.html#relnotes-4-... > > > Thanks & Best Regards, > > Abhishek Kekane > > > > On Wed, Jan 24, 2024 at 10:26 PM Satish Patel <satish.txt@gmail.com> > wrote: > >> Folks, >> >> I have two openstack clouds and both have their own Ceph backend >> storage.I am trying to migrate instances from openstack A to openstack B. >> >> 1. Take a snapshot from A >> 2. Export snapshot and import to B >> 3. Create instance on B >> 4. Delete snapshot - (I am getting error because its in-use) >> >> Because it has a parent reference to that volume. How do I remove >> the reference so it will let me delete a snapshot. Reason I am asking is >> because I have so many VMs to migrate and don't want glance to have 100s of >> entities in those snapshots. >> >> What is the alternative here? I can try qcow2 if that is the final >> solution to make it clean. >> >> # rbd -p volumes info volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a >> rbd image 'volume-f2b2aec2-cc57-49e5-aca1-54b5a7ee9f3a': >> size 40 GiB in 5120 objects >> order 23 (8 MiB objects) >> snapshot_count: 0 >> id: 5473c827864fed >> block_name_prefix: rbd_data.5473c827864fed >> format: 2 >> features: layering, exclusive-lock, object-map, fast-diff, deep-flatten >> op_features: >> flags: >> create_timestamp: Fri Jan 19 19:03:25 2024 >> access_timestamp: Wed Jan 24 15:51:04 2024 >> modify_timestamp: Wed Jan 24 15:52:40 2024 >> parent: images/3708f961-fb74-49f1-ab9b-40cf7954abed@snap >> overlap: 40 GiB >> >>
participants (3)
-
Abhishek Kekane
-
Eugen Block
-
Satish Patel