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.
Reviewed: https:/ /review. openstack. org/604961 /git.openstack. org/cgit/ openstack/ os-brick/ commit/ ?id=d398fa82334 bbabbc4c7d5b8f1 fe5a7a4465200e
Committed: https:/
Submitter: Zuul
Branch: master
commit d398fa82334bbab bc4c7d5b8f1fe5a 7a4465200e
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
Closes-Bug: #1732199