iSCSI connections are not reinitiated after host reboot

Bug #1944474 reported by Sophie Huang
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
Medium
Sophie Huang

Bug Description

In an iSCSI/multipath environment, a Cinder volume is attached to a tenant server (VM) on a compute host. After the compute host is rebooted, some of the connection(s) to the iSCSI portal(s) are not reinitiated, because of this, missing iSCSI device(s) are observed. This issue is observed for both stable Train and Ussuri releases.

When PS https://review.opendev.org/c/openstack/os-brick/+/796671 is not applied, below stack trace is captured.

Exception in thread Thread-39:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/var/lib/openstack/lib/python3.6/site-packages/os_brick/executor.py", line 84, in run
    super(Thread, self).run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/var/lib/openstack/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py", line 626, in _connect_vol
    session, manual_scan = self._connect_to_iscsi_portal(props)
  File "/var/lib/openstack/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py", line 1042, in _connect_to_iscsi_portal
    '--op', 'new'))
  File "/var/lib/openstack/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py", line 995, in _run_iscsiadm
    delay_on_retry=delay_on_retry)
  File "/var/lib/openstack/lib/python3.6/site-packages/os_brick/executor.py", line 52, in _execute
    result = self.__execute(*args, **kwargs)
  File "/var/lib/openstack/lib/python3.6/site-packages/os_brick/privileged/rootwrap.py", line 169, in execute
    return execute_root(*cmd, **kwargs)
  File "/var/lib/openstack/lib/python3.6/site-packages/oslo_privsep/priv_context.py", line 245, in _wrap
    return self.channel.remote_call(name, args, kwargs)
  File "/var/lib/openstack/lib/python3.6/site-packages/oslo_privsep/daemon.py", line 224, in remote_call
    raise exc_type(*result[2])
oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
Command: iscsiadm -m node -T iqn.xxxxxxxxxxxx -p xxx.xxx.xxx.xxx:3260 --interface default --op new
Exit code: 6
Stdout: ''
Stderr: 'iscsiadm: Could not make /etc/iscsi/nodes/iqn.xxxxxxxxxxxxxxx: File exists\niscsiadm: Error while adding record: encountered iSCSI database failure\n'

After the above PS is applied, the exception is handled, however the underline issue is still exist and missing iSCSI device(s) are observed.

Suggestion:
Is it possible to add some retries to _connect_to_iscsi_portal of class ISCSIConnector in iscsi.py if the second iscsiadm command has a return code of 6?

Revision history for this message
Sophie Huang (sh879n) wrote :

Please refer to this patchset for a potential fix:
https://review.opendev.org/c/openstack/os-brick/+/810331

Changed in os-brick:
assignee: nobody → Sophie Huang (sh879n)
importance: Undecided → Low
importance: Low → Medium
Changed in os-brick:
status: New → In Progress
tags: added: iscsi multipath reboot
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/+/810331
Committed: https://opendev.org/openstack/os-brick/commit/8832c5389964973084cd0f80a2d8f7f24255ea3f
Submitter: "Zuul (22348)"
Branch: master

commit 8832c5389964973084cd0f80a2d8f7f24255ea3f
Author: Sophie Huang <email address hidden>
Date: Tue Sep 21 23:05:44 2021 +0000

    multipath/iscsi: iSCSI connections are not reinitiated after reboot

    After compute host reboot, in an iSCSI/multipath environment, some
    of the connections to the iSCSI portal are not reinitiated and missing
    iSCSI devices are observed. This patchset introduced retries for this
    particular scenario.

    Closes-Bug: #1944474
    Change-Id: I60ee7421f7b792e8324286908a9fdd8fb53e433e

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/+/813091

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/+/813091
Committed: https://opendev.org/openstack/os-brick/commit/4d116483aff6efa425cd1b7b00e87f6385a9a725
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 4d116483aff6efa425cd1b7b00e87f6385a9a725
Author: Sophie Huang <email address hidden>
Date: Tue Sep 21 23:05:44 2021 +0000

    multipath/iscsi: iSCSI connections are not reinitiated after reboot

    After compute host reboot, in an iSCSI/multipath environment, some
    of the connections to the iSCSI portal are not reinitiated and missing
    iSCSI devices are observed. This patchset introduced retries for this
    particular scenario.

    Closes-Bug: #1944474
    Change-Id: I60ee7421f7b792e8324286908a9fdd8fb53e433e
    (cherry picked from commit 8832c5389964973084cd0f80a2d8f7f24255ea3f)

tags: added: in-stable-xena
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/+/814754

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/+/814754
Committed: https://opendev.org/openstack/os-brick/commit/779d1e48c79a7e47dd49ef8acaeeb61e99c253f0
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 779d1e48c79a7e47dd49ef8acaeeb61e99c253f0
Author: Sophie Huang <email address hidden>
Date: Tue Sep 21 23:05:44 2021 +0000

    multipath/iscsi: iSCSI connections are not reinitiated after reboot

    After compute host reboot, in an iSCSI/multipath environment, some
    of the connections to the iSCSI portal are not reinitiated and missing
    iSCSI devices are observed. This patchset introduced retries for this
    particular scenario.

    Closes-Bug: #1944474
    Change-Id: I60ee7421f7b792e8324286908a9fdd8fb53e433e
    (cherry picked from commit 8832c5389964973084cd0f80a2d8f7f24255ea3f)
    (cherry picked from commit 4d116483aff6efa425cd1b7b00e87f6385a9a725)

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/+/815641

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

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/815641
Committed: https://opendev.org/openstack/os-brick/commit/7c7650b4de9fa319c8c42423502ccd55a510a417
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 7c7650b4de9fa319c8c42423502ccd55a510a417
Author: Sophie Huang <email address hidden>
Date: Tue Sep 21 23:05:44 2021 +0000

    multipath/iscsi: iSCSI connections are not reinitiated after reboot

    After compute host reboot, in an iSCSI/multipath environment, some
    of the connections to the iSCSI portal are not reinitiated and missing
    iSCSI devices are observed. This patchset introduced retries for this
    particular scenario.

    Closes-Bug: #1944474
    Change-Id: I60ee7421f7b792e8324286908a9fdd8fb53e433e
    (cherry picked from commit 8832c5389964973084cd0f80a2d8f7f24255ea3f)
    (cherry picked from commit 4d116483aff6efa425cd1b7b00e87f6385a9a725)
    (cherry picked from commit 779d1e48c79a7e47dd49ef8acaeeb61e99c253f0)

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

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

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

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/815648
Committed: https://opendev.org/openstack/os-brick/commit/d0eea8a6eb5a620d405dc819eb2285a9e242f4a3
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit d0eea8a6eb5a620d405dc819eb2285a9e242f4a3
Author: Sophie Huang <email address hidden>
Date: Tue Sep 21 23:05:44 2021 +0000

    multipath/iscsi: iSCSI connections are not reinitiated after reboot

    After compute host reboot, in an iSCSI/multipath environment, some
    of the connections to the iSCSI portal are not reinitiated and missing
    iSCSI devices are observed. This patchset introduced retries for this
    particular scenario.

    Closes-Bug: #1944474
    Change-Id: I60ee7421f7b792e8324286908a9fdd8fb53e433e
    (cherry picked from commit 8832c5389964973084cd0f80a2d8f7f24255ea3f)
    (cherry picked from commit 4d116483aff6efa425cd1b7b00e87f6385a9a725)
    (cherry picked from commit 779d1e48c79a7e47dd49ef8acaeeb61e99c253f0)
    (cherry picked from commit 7c7650b4de9fa319c8c42423502ccd55a510a417)

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/829047
Committed: https://opendev.org/openstack/os-brick/commit/c25405ff533e01cd5b248f093b7341e3c162add2
Submitter: "Zuul (22348)"
Branch: stable/train

commit c25405ff533e01cd5b248f093b7341e3c162add2
Author: Sophie Huang <email address hidden>
Date: Tue Sep 21 23:05:44 2021 +0000

    multipath/iscsi: iSCSI connections are not reinitiated after reboot

    After compute host reboot, in an iSCSI/multipath environment, some
    of the connections to the iSCSI portal are not reinitiated and missing
    iSCSI devices are observed. This patchset introduced retries for this
    particular scenario.

    Closes-Bug: #1944474
    Change-Id: I60ee7421f7b792e8324286908a9fdd8fb53e433e
    (cherry picked from commit 8832c5389964973084cd0f80a2d8f7f24255ea3f)
    (cherry picked from commit 4d116483aff6efa425cd1b7b00e87f6385a9a725)
    (cherry picked from commit 779d1e48c79a7e47dd49ef8acaeeb61e99c253f0)
    (cherry picked from commit 7c7650b4de9fa319c8c42423502ccd55a510a417)
    (cherry picked from commit d0eea8a6eb5a620d405dc819eb2285a9e242f4a3)

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

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