Partial cleanup when some rbd operations fail

Bug #1873738 reported by Rajat Dhasmana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Rajat Dhasmana

Bug Description

When we perform copy image to encrypted volume operation and any failure occurs during image conversion, we get a remaining '.luks' file in the image conversion dir.

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

Fix proposed to branch: master
Review: https://review.opendev.org/721206

Changed in cinder:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
status: New → In Progress
description: updated
Changed in cinder:
assignee: Rajat Dhasmana (whoami-rajat) → Eric Harney (eharney)
Eric Harney (eharney)
Changed in cinder:
assignee: Eric Harney (eharney) → Rajat Dhasmana (whoami-rajat)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/738543

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/738586

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/train)

Change abandoned by zhen (<email address hidden>) on branch: stable/train
Review: https://review.opendev.org/738586

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

Reviewed: https://review.opendev.org/721206
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7c95f3969f4c0df5f818f96cb662dddc17a8dd6f
Submitter: Zuul
Branch: master

commit 7c95f3969f4c0df5f818f96cb662dddc17a8dd6f
Author: Rajat Dhasmana <email address hidden>
Date: Mon Apr 20 09:00:39 2020 +0000

    RBD: Cleanup temporary file during exception

    During copy image to encrypted volume operation, we create a
    temporary image file to convert source image into an encrypted
    image and rename it to source image name.
    If any error occurs during this process, there is no code to
    cleanup the temporary '.luks' file.
    This patch adds the following cleanup.

    Change-Id: I05dfc996a635299990fdafba841ab6c4fd7d32c7
    Closes-Bug: 1873738

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/ussuri)

Reviewed: https://review.opendev.org/738543
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=02de7897d4e4ec3be6c4684a2e73a054956d1a00
Submitter: Zuul
Branch: stable/ussuri

commit 02de7897d4e4ec3be6c4684a2e73a054956d1a00
Author: Rajat Dhasmana <email address hidden>
Date: Mon Apr 20 09:00:39 2020 +0000

    RBD: Cleanup temporary file during exception

    During copy image to encrypted volume operation, we create a
    temporary image file to convert source image into an encrypted
    image and rename it to source image name.
    If any error occurs during this process, there is no code to
    cleanup the temporary '.luks' file.
    This patch adds the following cleanup.

    Change-Id: I05dfc996a635299990fdafba841ab6c4fd7d32c7
    Closes-Bug: 1873738
    (cherry picked from commit 7c95f3969f4c0df5f818f96cb662dddc17a8dd6f)

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

Reviewed: https://review.opendev.org/738586
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=48774c89abe6f9770a55a4f8be9f682b22b900d1
Submitter: Zuul
Branch: stable/train

commit 48774c89abe6f9770a55a4f8be9f682b22b900d1
Author: Rajat Dhasmana <email address hidden>
Date: Mon Apr 20 09:00:39 2020 +0000

    RBD: Cleanup temporary file during exception

    During copy image to encrypted volume operation, we create a
    temporary image file to convert source image into an encrypted
    image and rename it to source image name.
    If any error occurs during this process, there is no code to
    cleanup the temporary '.luks' file.
    This patch adds the following cleanup.

    Change-Id: I05dfc996a635299990fdafba841ab6c4fd7d32c7
    Closes-Bug: 1873738
    (cherry picked from commit 7c95f3969f4c0df5f818f96cb662dddc17a8dd6f)
    (cherry picked from commit 02de7897d4e4ec3be6c4684a2e73a054956d1a00)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/746041

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/stein)

Reviewed: https://review.opendev.org/746041
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=175eb628135ecd828a9636952f0dcf95b6a76fed
Submitter: Zuul
Branch: stable/stein

commit 175eb628135ecd828a9636952f0dcf95b6a76fed
Author: Rajat Dhasmana <email address hidden>
Date: Mon Apr 20 09:00:39 2020 +0000

    RBD: Cleanup temporary file during exception

    During copy image to encrypted volume operation, we create a
    temporary image file to convert source image into an encrypted
    image and rename it to source image name.
    If any error occurs during this process, there is no code to
    cleanup the temporary '.luks' file.
    This patch adds the following cleanup.

    Conflicts:
        cinder/image/image_utils.py
        cinder/tests/unit/volume/drivers/test_rbd.py

    Change-Id: I05dfc996a635299990fdafba841ab6c4fd7d32c7
    Closes-Bug: 1873738
    (cherry picked from commit 7c95f3969f4c0df5f818f96cb662dddc17a8dd6f)
    (cherry picked from commit 02de7897d4e4ec3be6c4684a2e73a054956d1a00)
    (cherry picked from commit 48774c89abe6f9770a55a4f8be9f682b22b900d1)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/746619

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/rocky)

Reviewed: https://review.opendev.org/746619
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=5b38df60b191230cd9e75eca9603f3a1c15f646e
Submitter: Zuul
Branch: stable/rocky

commit 5b38df60b191230cd9e75eca9603f3a1c15f646e
Author: Rajat Dhasmana <email address hidden>
Date: Mon Apr 20 09:00:39 2020 +0000

    RBD: Cleanup temporary file during exception

    During copy image to encrypted volume operation, we create a
    temporary image file to convert source image into an encrypted
    image and rename it to source image name.
    If any error occurs during this process, there is no code to
    cleanup the temporary '.luks' file.
    This patch adds the following cleanup.

    Change-Id: I05dfc996a635299990fdafba841ab6c4fd7d32c7
    Closes-Bug: 1873738
    (cherry picked from commit 7c95f3969f4c0df5f818f96cb662dddc17a8dd6f)
    (cherry picked from commit 02de7897d4e4ec3be6c4684a2e73a054956d1a00)
    (cherry picked from commit 48774c89abe6f9770a55a4f8be9f682b22b900d1)
    (cherry picked from commit 175eb628135ecd828a9636952f0dcf95b6a76fed)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder rocky-eol

This issue was fixed in the openstack/cinder rocky-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.