Merge "Move ipmi logging to a separate option" into stable/stein
This commit is contained in:
commit
f1b2cb7454
|
@ -49,6 +49,12 @@ opts = [
|
||||||
'that command, the default value is True. It may be '
|
'that command, the default value is True. It may be '
|
||||||
'overridden by per-node \'ipmi_disable_boot_timeout\' '
|
'overridden by per-node \'ipmi_disable_boot_timeout\' '
|
||||||
'option in node\'s \'driver_info\' field.')),
|
'option in node\'s \'driver_info\' field.')),
|
||||||
|
cfg.BoolOpt('debug',
|
||||||
|
default=False,
|
||||||
|
help=_('Enables all ipmi commands to be executed with an '
|
||||||
|
'additional debugging output. This is a separate '
|
||||||
|
'option as ipmitool can log a substantial amount '
|
||||||
|
'of misleading text when in this mode.')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -445,7 +445,7 @@ def _get_ipmitool_args(driver_info, pw_file=None):
|
||||||
args.append('-f')
|
args.append('-f')
|
||||||
args.append(pw_file)
|
args.append(pw_file)
|
||||||
|
|
||||||
if CONF.debug:
|
if CONF.ipmi.debug:
|
||||||
args.append('-v')
|
args.append('-v')
|
||||||
|
|
||||||
# ensure all arguments are strings
|
# ensure all arguments are strings
|
||||||
|
|
|
@ -454,6 +454,7 @@ class Base(db_base.DbTestCase):
|
||||||
enabled_console_interfaces=['fake', 'ipmitool-socat',
|
enabled_console_interfaces=['fake', 'ipmitool-socat',
|
||||||
'ipmitool-shellinabox',
|
'ipmitool-shellinabox',
|
||||||
'no-console'])
|
'no-console'])
|
||||||
|
self.config(debug=True, group="ipmi")
|
||||||
self.node = obj_utils.create_test_node(
|
self.node = obj_utils.create_test_node(
|
||||||
self.context,
|
self.context,
|
||||||
console_interface='ipmitool-socat',
|
console_interface='ipmitool-socat',
|
||||||
|
@ -2569,7 +2570,7 @@ class IPMIToolShellinaboxTestCase(db_base.DbTestCase):
|
||||||
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
||||||
expected_ipmi_cmd = ("/:%(uid)s:%(gid)s:HOME:ipmitool "
|
expected_ipmi_cmd = ("/:%(uid)s:%(gid)s:HOME:ipmitool "
|
||||||
"-I lanplus -H %(address)s -L ADMINISTRATOR "
|
"-I lanplus -H %(address)s -L ADMINISTRATOR "
|
||||||
"-U %(user)s -f pw_file -v" %
|
"-U %(user)s -f pw_file" %
|
||||||
{'uid': os.getuid(), 'gid': os.getgid(),
|
{'uid': os.getuid(), 'gid': os.getgid(),
|
||||||
'address': driver_info['address'],
|
'address': driver_info['address'],
|
||||||
'user': driver_info['username']})
|
'user': driver_info['username']})
|
||||||
|
@ -2583,7 +2584,7 @@ class IPMIToolShellinaboxTestCase(db_base.DbTestCase):
|
||||||
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
||||||
expected_ipmi_cmd = ("/:%(uid)s:%(gid)s:HOME:ipmitool "
|
expected_ipmi_cmd = ("/:%(uid)s:%(gid)s:HOME:ipmitool "
|
||||||
"-I lanplus -H %(address)s -L ADMINISTRATOR "
|
"-I lanplus -H %(address)s -L ADMINISTRATOR "
|
||||||
"-f pw_file -v" %
|
"-f pw_file" %
|
||||||
{'uid': os.getuid(), 'gid': os.getgid(),
|
{'uid': os.getuid(), 'gid': os.getgid(),
|
||||||
'address': driver_info['address']})
|
'address': driver_info['address']})
|
||||||
self.assertEqual(expected_ipmi_cmd, ipmi_cmd)
|
self.assertEqual(expected_ipmi_cmd, ipmi_cmd)
|
||||||
|
@ -2717,7 +2718,7 @@ class IPMIToolSocatDriverTestCase(IPMIToolShellinaboxTestCase):
|
||||||
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
||||||
expected_ipmi_cmd = ("ipmitool -I lanplus -H %(address)s "
|
expected_ipmi_cmd = ("ipmitool -I lanplus -H %(address)s "
|
||||||
"-L ADMINISTRATOR -U %(user)s "
|
"-L ADMINISTRATOR -U %(user)s "
|
||||||
"-f pw_file -v" %
|
"-f pw_file" %
|
||||||
{'address': driver_info['address'],
|
{'address': driver_info['address'],
|
||||||
'user': driver_info['username']})
|
'user': driver_info['username']})
|
||||||
self.assertEqual(expected_ipmi_cmd, ipmi_cmd)
|
self.assertEqual(expected_ipmi_cmd, ipmi_cmd)
|
||||||
|
@ -2730,7 +2731,7 @@ class IPMIToolSocatDriverTestCase(IPMIToolShellinaboxTestCase):
|
||||||
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
ipmi_cmd = self.console._get_ipmi_cmd(driver_info, 'pw_file')
|
||||||
expected_ipmi_cmd = ("ipmitool -I lanplus -H %(address)s "
|
expected_ipmi_cmd = ("ipmitool -I lanplus -H %(address)s "
|
||||||
"-L ADMINISTRATOR "
|
"-L ADMINISTRATOR "
|
||||||
"-f pw_file -v" %
|
"-f pw_file" %
|
||||||
{'address': driver_info['address']})
|
{'address': driver_info['address']})
|
||||||
self.assertEqual(expected_ipmi_cmd, ipmi_cmd)
|
self.assertEqual(expected_ipmi_cmd, ipmi_cmd)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds a new ``[ipmi]debug`` option that allows users to explicitly turn
|
||||||
|
IPMI command debugging on, as opposed to relying upon the system debug
|
||||||
|
setting ``[DEFAULT]debug``. Users wishing to continue to log this output
|
||||||
|
should set ``[ipmi]debug`` to ``True`` in their ironic.conf.
|
||||||
|
upgrade:
|
||||||
|
- Debug logging control has been moved to the ``[ipmi]debug`` configuration
|
||||||
|
setting as opposed to the "conductor" ``[DEFAULT]debug`` setting as
|
||||||
|
the existing ``ipmitool`` output can be extremely misleading for users.
|
||||||
|
Operators who wish to continue to log ``ipmitool`` verbose output in their
|
||||||
|
logs should explicitly set the ``[ipmi]debug`` command to True.
|
Loading…
Reference in New Issue