RBD disconnect fails with AttributeError for startswith

Bug #1981455 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
High
Gorka Eguileor

Bug Description

After change Ie373ab050dcc0a35c749d9a53b6cf5ca060bcb58 closing bugs #1964379 and #1967790 was merged the `disconnect_volume` in the RBD connector was broken for encrypted volumes:

2022-07-12 11:12:52.468 13 DEBUG os_brick.initiator.connectors.rbd [req-b6ca5b27-e351-475c-b744-70b24f90ffc3 32fbace38bb44ef2b10d637cbcc96985 c94c3887b70d4721a11be22c540925a0 - - -] <== disconnect_volume: exception (0ms) AttributeError("'RBDVolumeIOWrapper' object has no attribute 'startswith'") trace_logging_wrapper /usr/lib/python3.9/site-packages/os_brick/utils.py:162

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/os-brick/+/849542

Changed in os-brick:
status: New → In Progress
Eric Harney (eharney)
Changed in os-brick:
importance: Undecided → High
assignee: nobody → Gorka Eguileor (gorka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/os-brick/+/849718

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

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/849542
Committed: https://opendev.org/openstack/os-brick/commit/dde8f102b714e2e4001a3fe82f975cd9978ac1c5
Submitter: "Zuul (22348)"
Branch: master

commit dde8f102b714e2e4001a3fe82f975cd9978ac1c5
Author: Gorka Eguileor <email address hidden>
Date: Tue Jul 12 16:31:43 2022 +0200

    RBD: Fix disconnect_volume for encrypted volumes

    After change Ie373ab050dcc0a35c749d9a53b6cf5ca060bcb58 closing bugs
    connector was broken for encrypted volumes:

    <== disconnect_volume:
       exception (0ms) AttributeError("'RBDVolumeIOWrapper' object has
       no attribute 'startswith'") trace_logging_wrapper
       /usr/lib/python3.9/site-packages/os_brick/utils.py:162

    This hapens because "_device_path_from_symlink" doesn't take into
    account of the file handle, and we were missing a unit test for this
    case.

    Closes-Bug: #1981455
    Change-Id: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad

Changed in os-brick:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/os-brick/+/849805

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/849718
Committed: https://opendev.org/openstack/os-brick/commit/743002cc269ac1e91d8df2eee5f4fdad3d14c365
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 743002cc269ac1e91d8df2eee5f4fdad3d14c365
Author: Gorka Eguileor <email address hidden>
Date: Tue Jul 12 16:31:43 2022 +0200

    RBD: Fix disconnect_volume for encrypted volumes

    After change Ie373ab050dcc0a35c749d9a53b6cf5ca060bcb58 closing bugs
    connector was broken for encrypted volumes:

    <== disconnect_volume:
       exception (0ms) AttributeError("'RBDVolumeIOWrapper' object has
       no attribute 'startswith'") trace_logging_wrapper
       /usr/lib/python3.9/site-packages/os_brick/utils.py:162

    This hapens because "_device_path_from_symlink" doesn't take into
    account of the file handle, and we were missing a unit test for this
    case.

    Closes-Bug: #1981455
    Change-Id: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad
    (cherry picked from commit dde8f102b714e2e4001a3fe82f975cd9978ac1c5)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/849805
Committed: https://opendev.org/openstack/os-brick/commit/3aa5d295821d6bb39a24f465b740f9ac4fb884d1
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 3aa5d295821d6bb39a24f465b740f9ac4fb884d1
Author: Gorka Eguileor <email address hidden>
Date: Tue Jul 12 16:31:43 2022 +0200

    RBD: Fix disconnect_volume for encrypted volumes

    After change Ie373ab050dcc0a35c749d9a53b6cf5ca060bcb58 closing bugs
    connector was broken for encrypted volumes:

    <== disconnect_volume:
       exception (0ms) AttributeError("'RBDVolumeIOWrapper' object has
       no attribute 'startswith'") trace_logging_wrapper
       /usr/lib/python3.9/site-packages/os_brick/utils.py:162

    This hapens because "_device_path_from_symlink" doesn't take into
    account of the file handle, and we were missing a unit test for this
    case.

    Closes-Bug: #1981455
    Change-Id: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad
    (cherry picked from commit dde8f102b714e2e4001a3fe82f975cd9978ac1c5)
    (cherry picked from commit 743002cc269ac1e91d8df2eee5f4fdad3d14c365)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 6.0.0

This issue was fixed in the openstack/os-brick 6.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 5.2.2

This issue was fixed in the openstack/os-brick 5.2.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 5.0.3

This issue was fixed in the openstack/os-brick 5.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/os-brick/+/864479

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/864479
Committed: https://opendev.org/openstack/os-brick/commit/129da87d968d454ac578d411d97f6e2ad9fc47f8
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 129da87d968d454ac578d411d97f6e2ad9fc47f8
Author: Gorka Eguileor <email address hidden>
Date: Tue Jul 12 16:31:43 2022 +0200

    RBD: Fix disconnect_volume for encrypted volumes

    After change Ie373ab050dcc0a35c749d9a53b6cf5ca060bcb58 closing bugs
    connector was broken for encrypted volumes:

    <== disconnect_volume:
       exception (0ms) AttributeError("'RBDVolumeIOWrapper' object has
       no attribute 'startswith'") trace_logging_wrapper
       /usr/lib/python3.9/site-packages/os_brick/utils.py:162

    This hapens because "_device_path_from_symlink" doesn't take into
    account of the file handle, and we were missing a unit test for this
    case.

    Closes-Bug: #1981455
    Change-Id: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad
    (cherry picked from commit dde8f102b714e2e4001a3fe82f975cd9978ac1c5)
    (cherry picked from commit 743002cc269ac1e91d8df2eee5f4fdad3d14c365)
    (cherry picked from commit 3aa5d295821d6bb39a24f465b740f9ac4fb884d1)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/os-brick/+/864617

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on os-brick (stable/victoria)

Change abandoned by "Masayuki Igawa <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/os-brick/+/864617
Reason: We don't need to backport this patch to victoria or earlier branches because there's no decorators in the code.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick wallaby-eom

This issue was fixed in the openstack/os-brick wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on os-brick (stable/victoria)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/os-brick/+/866461
Reason: stable/victoria branch of openstack/os-brick is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/victoria if you want to further work on this patch.

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.