Attempting to delete an image from Glance that is in use breaks subsequent usage of that image

Bug #1951433 reported by Giulio Fidente
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cinder-tempest-plugin
New
Medium
Sofia Enriquez
tripleo
In Progress
High
Giulio Fidente

Bug Description

Steps to Reproduce:
1.Upload the image to Glance:

$ glance image-create-via-import --disk-format qcow2 --container-format bare --name centos7-base-116-ec8e22-thin --visibility public --import-method web-download --uri https://internal/centos7-base-116-ec8e22.qcow2 --property hw_scsi_model=virtio-scsi --property hw_disk_bus=scsi

2. Create a volume from this image:

$ openstack volume create --image centos7-base-116-ec8e22-thin --size 20 --type tripleo testvolume

3. Attempt to delete the image while it is in use:

$ openstack image delete centos7-base-116-ec8e22-thin
Failed to delete image with name or ID 'centos7-base-116-ec8e22-thin': HTTP 409 Conflict: The image cannot be deleted because it has snapshot(s).
Failed to delete 1 of 1 images.

4. Attempt to create another image from:

$ openstack volume create --image centos7-base-116-ec8e22-thin --size 20 --type tripleo testvolume2

5. Review volume status:

$ openstack volume list
+--------------------------------------+-------------+-----------+------+-------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+-------------+-----------+------+-------------+
| 72b54a39-f087-49ec-ab8c-89a4be342720 | testvolume2 | error | 20 | |
| 497ddbb2-994b-4021-8068-ec1e6fed4c6d | testvolume | available | 20 | |
+--------------------------------------+-------------+-----------+------+-------------+

Actual results:
Image is not deleted, still present in Ceph/Glance. But all future use of the image is not possible.
$ openstack image list
+--------------------------------------+------------------------------+--------+
| ID | Name | Status |
+--------------------------------------+------------------------------+--------+
| 8d7e12cb-e778-4430-bcfe-1ae35e1f431f | centos7-base-116-ec8e22-thin | active |
+--------------------------------------+------------------------------+--------+

$ rbd ls -p images
8d7e12cb-e778-4430-bcfe-1ae35e1f431f
$ rbd ls -p volumes
volume-497ddbb2-994b-4021-8068-ec1e6fed4c6d
$ ceph df
...
POOLS:
    POOL ID STORED OBJECTS USED %USED MAX AVAIL
    images 1 2.3 GiB 296 6.8 GiB 0 22 TiB
    volumes 2 1.3 KiB 6 36 KiB 0 22 TiB
...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818320

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/train)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/ussuri)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818393

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (master)

Change abandoned by "Giulio Fidente <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818323
Reason: We removed ceph-ansible support after wallaby, the correct revert for this is hence submitted against stable/wallaby via https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818393

Changed in tripleo:
assignee: nobody → Giulio Fidente (gfidente)
Revision history for this message
Luigi Toscano (ltoscano) wrote :

The proposed fix breaks a cinder feature, and this is a cinder issue. Please don't revert those changes.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818322
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/614e8078faf0f519a0f611213a541aa4b32d0fd0
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 614e8078faf0f519a0f611213a541aa4b32d0fd0
Author: Giulio Fidente <email address hidden>
Date: Thu Nov 18 14:28:56 2021 +0000

    Revert "Enforces minimum Ceph client version to Mimic"

    This reverts commit 4b8a18069fc832bf11a8889777b6422e0dc2ea1c.

    There is additional work to be done in Glance/Cinder to handle correctly images moved to 'trash'

    Change-Id: I52d4e06d7c335709fc0dab990462d9f3ea230c5d
    Closes-Bug: 1951433

tags: added: in-stable-ussuri
tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/train)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818321
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/8885ceed1943ec66e2e65bd404e9fd6e6d7a5cf1
Submitter: "Zuul (22348)"
Branch: stable/train

commit 8885ceed1943ec66e2e65bd404e9fd6e6d7a5cf1
Author: Giulio Fidente <email address hidden>
Date: Thu Nov 18 14:28:50 2021 +0000

    Revert "Enforces minimum Ceph client version to Mimic"

    This reverts commit 43b352e9aa0c981f5b9bcbc4f2c40c21aa25c969.

    There is additional work to be done in Glance/Cinder to handle correctly images moved to 'trash'

    Change-Id: I1dd20cc34294865f20b6f8b84d0402f0ed0708e2
    Closes-Bug: 1951433

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818320
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/2d891e17899f4983d197e0166c21b005bbb149e4
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 2d891e17899f4983d197e0166c21b005bbb149e4
Author: Giulio Fidente <email address hidden>
Date: Thu Nov 18 14:28:25 2021 +0000

    Revert "Enforces minimum Ceph client version to Mimic"

    This reverts commit fd58e99deca5efc10c30e9e62605bc9e1e0ec5e4.

    There is additional work to be done in Glance/Cinder to handle correctly images moved to 'trash'

    Change-Id: I5ce9085172a5ed2f1f5caeeed6dfbe30e58b4fdc
    Closes-Bug: 1951433

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/818393
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/871bcde98a725fbe4521fd9afa7366ce1a50ad4e
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 871bcde98a725fbe4521fd9afa7366ce1a50ad4e
Author: Giulio Fidente <email address hidden>
Date: Thu Nov 18 14:29:03 2021 +0000

    Revert "Enforces minimum Ceph client version to Mimic"

    This reverts commit 8d962f136275d8f73f559a0bbfa99b5b2160c886.

    There is additional work to be done in Glance/Cinder to handle correctly images moved to 'trash'

    Change-Id: Id3d1f23f8a1b393db587d4dcc4cffc3bd09e3935
    Closes-Bug: 1951433

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/821999

Revision history for this message
John Fulton (jfulton-org) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/821999
Committed: https://opendev.org/openstack/tripleo-ansible/commit/657a18b67c89d38a11bdc0d92f9a85c6367f0247
Submitter: "Zuul (22348)"
Branch: master

commit 657a18b67c89d38a11bdc0d92f9a85c6367f0247
Author: John Fulton <email address hidden>
Date: Thu Dec 16 16:03:03 2021 +0000

    Do not set-require-min-compat-client for Ceph by default

    Our default was to 'osd set-require-min-compat-client mimic'
    but this has implications for the related bug. Keep the ability
    to set any version but don't set it by default.

    Related-Bug: 1951433
    Change-Id: Ifeef5d6b36648fdb12fda4f75c81079691434fff

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/wallaby)

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/822114

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/822114
Committed: https://opendev.org/openstack/tripleo-ansible/commit/4a3cfc0bf69ac13bebc4eb886e4e5182c2056db7
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 4a3cfc0bf69ac13bebc4eb886e4e5182c2056db7
Author: John Fulton <email address hidden>
Date: Thu Dec 16 16:03:03 2021 +0000

    Do not set-require-min-compat-client for Ceph by default

    Our default was to 'osd set-require-min-compat-client mimic'
    but this has implications for the related bug. Keep the ability
    to set any version but don't set it by default.

    Related-Bug: 1951433
    Change-Id: Ifeef5d6b36648fdb12fda4f75c81079691434fff
    (cherry picked from commit 657a18b67c89d38a11bdc0d92f9a85c6367f0247)

Changed in cinder-tempest-plugin:
importance: Undecided → Medium
assignee: nobody → Sofia Enriquez (lsofia-enriquez)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 12.4.6

This issue was fixed in the openstack/tripleo-heat-templates 12.4.6 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 13.6.0

This issue was fixed in the openstack/tripleo-heat-templates 13.6.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates train-eol

This issue was fixed in the openstack/tripleo-heat-templates train-eol release.

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.