Sometimes 'iscsiadm -m session' outputs warnings on stderr, but
still serves its purpose (usable stdout). We should not give up on
it when stderr is non-empty - instead, rely on the exit status, log
the stderr as a warning, and move on.
This change also removes 1 (ISCSI_ERR) from the list of acceptable
exit codes for the iscsiadm command, to ensure that failures get
caught.
Change-Id: Id8183cf3d8baf2f8ba6a00a47fa2ad7cc2a96aa5
Closes-Bug: #1732199
(cherry picked from commit d398fa82334bbabbc4c7d5b8f1fe5a7a4465200e)
Reviewed: https:/ /review. openstack. org/643401 /git.openstack. org/cgit/ openstack/ os-brick/ commit/ ?id=44a0486d053 b946ae0123e6ebc 22b3da68dd7510
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 44a0486d053b946 ae0123e6ebc22b3 da68dd7510
Author: imacdonn <email address hidden>
Date: Tue Sep 25 03:40:31 2018 +0000
'iscsiadm -m session' failure handling
Sometimes 'iscsiadm -m session' outputs warnings on stderr, but
still serves its purpose (usable stdout). We should not give up on
it when stderr is non-empty - instead, rely on the exit status, log
the stderr as a warning, and move on.
This change also removes 1 (ISCSI_ERR) from the list of acceptable
exit codes for the iscsiadm command, to ensure that failures get
caught.
Change-Id: Id8183cf3d8baf2 f8ba6a00a47fa2a d7cc2a96aa5 bc4c7d5b8f1fe5a 7a4465200e)
Closes-Bug: #1732199
(cherry picked from commit d398fa82334bbab