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: I5c321d6b2627f186ff3dfe64ee7ad71f27a95cf0 Closes-Bug: 1445137
This commit is contained in:
parent
e7fdd10da6
commit
64d7923f36
|
@ -23,6 +23,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
|
||||
|
||||
from cinder.brick import exception
|
||||
|
@ -451,8 +452,10 @@ class ISCSIConnector(InitiatorConnector):
|
|||
*iscsi_command, run_as_root=True,
|
||||
root_helper=self._root_helper,
|
||||
check_exit_code=check_exit_code)
|
||||
LOG.debug("iscsiadm %(cmd)s: stdout=%(out)s stderr=%(err)s",
|
||||
{'cmd': iscsi_command, 'out': out, 'err': err})
|
||||
msg = ("iscsiadm %(cmd)s: stdout=%(out)s stderr=%(err)s",
|
||||
{'cmd': iscsi_command, 'out': out, 'err': err})
|
||||
LOG.debug(strutils.mask_password(msg))
|
||||
|
||||
return (out, err)
|
||||
|
||||
def _iscsiadm_update(self, connection_properties, property_key,
|
||||
|
|
Loading…
Reference in New Issue