Mask passwords with iscsiadm commands
This patch adds the fix that exists in the nova libvirt volume code to use oslo_utils strutils to mask passwords that might show up in debug log messages. Change-Id: I632eb4d71588736ab21327824d0506c13f3933ae Closes-Bug: 1445137
This commit is contained in:
parent
a1a4c7e644
commit
7ee5a43a75
@ -30,6 +30,7 @@ import time
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_concurrency import processutils as putils
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import strutils
|
||||
import six
|
||||
|
||||
S390X = "s390x"
|
||||
@ -451,8 +452,11 @@ class ISCSIConnector(InitiatorConnector):
|
||||
*iscsi_command, run_as_root=True,
|
||||
root_helper=self._root_helper,
|
||||
check_exit_code=check_exit_code)
|
||||
LOG.debug("iscsiadm %(iscsi_command)s: stdout=%(out)s stderr=%(err)s",
|
||||
msg = ("iscsiadm %(iscsi_command)s: stdout=%(out)s stderr=%(err)s",
|
||||
{'iscsi_command': iscsi_command, 'out': out, 'err': err})
|
||||
# don't let passwords be shown in log output
|
||||
LOG.debug(strutils.mask_password(msg))
|
||||
|
||||
return (out, err)
|
||||
|
||||
def _iscsiadm_update(self, connection_properties, property_key,
|
||||
|
@ -10,4 +10,5 @@ oslo.log>=1.0.0,<1.1.0
|
||||
oslo.rootwrap>=1.3.0
|
||||
oslo.serialization>=1.2.0
|
||||
oslo.i18n>=1.0.0
|
||||
oslo.utils>=1.4.0,<1.5.0
|
||||
six>=1.7.0
|
||||
|
Loading…
Reference in New Issue
Block a user