On further inspection, iscsiadm is actually returning 0 (success) - it's just the stderr output that's tripping up os-brick, at:
https://github.com/openstack/os-brick/blob/master/os_brick/initiator/connectors/iscsi.py#L120-L123
which produces:
Sep 24 10:55:26.759691 ubuntu-xenial-rax-ord-0002235107 nova-compute[15157]: WARNING os_brick.initiator.connectors.iscsi [req-eb1112fc-2010-4878-b6ed-7bd6d5c65b82 req-118f3f55-90c0-47b4-98c9-9b8069625dce service nova] Couldn't find iscsi sessions because iscsiadm err: iscsiadm: could not read session targetname: 5
Maybe it should be looking at the exit code instead of the stderr text (maybe just log it as a warning and move on?)...
On further inspection, iscsiadm is actually returning 0 (success) - it's just the stderr output that's tripping up os-brick, at:
https:/ /github. com/openstack/ os-brick/ blob/master/ os_brick/ initiator/ connectors/ iscsi.py# L120-L123
which produces:
Sep 24 10:55:26.759691 ubuntu- xenial- rax-ord- 0002235107 nova-compute[ 15157]: WARNING os_brick. initiator. connectors. iscsi [req-eb1112fc- 2010-4878- b6ed-7bd6d5c65b 82 req-118f3f55- 90c0-47b4- 98c9-9b8069625d ce service nova] Couldn't find iscsi sessions because iscsiadm err: iscsiadm: could not read session targetname: 5
Maybe it should be looking at the exit code instead of the stderr text (maybe just log it as a warning and move on?)...