Comment 2 for bug 2035695

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/+/895193
Committed: https://opendev.org/openstack/os-brick/commit/ec22c32de6820184d7737c5af70e573c0634cd38
Submitter: "Zuul (22348)"
Branch: master

commit ec22c32de6820184d7737c5af70e573c0634cd38
Author: Gorka Eguileor <email address hidden>
Date: Thu Sep 14 12:19:26 2023 +0200

    NVMe-oF: Fix attach when reconnecting

    When an nvme subsystem has all portals in connecting state and we try
    to attach a new volume to that same subsystem it will fail.

    We can reproduce it with LVM+nvmet if we configure it to share targets
    and then:
    - Create instance
    - Attach 2 volumes
    - Delete instance (this leaves the subsystem in connecting state [1])
    - Create instance
    - Attach volume <== FAILS

    The problem comes from the '_connect_target' method that ignores
    subsystems in 'connecting' state, so if they are all in that state it
    considers it equivalent to all portals being inaccessible.

    This patch changes this behavior and if we cannot connect to a target
    but we have portals in 'connecting' state we wait for the next retry of
    the nvme linux driver. Specifically we wait 10 more seconds that the
    interval between retries.

    [1]: https://bugs.launchpad.net/nova/+bug/2035375

    Closes-Bug: #2035695
    Change-Id: Ife710f52c339d67f2dcb160c20ad0d75480a1f48