diff --git a/ironic_python_agent/config.py b/ironic_python_agent/config.py index 482174a52..6c7db5d13 100644 --- a/ironic_python_agent/config.py +++ b/ironic_python_agent/config.py @@ -58,7 +58,7 @@ cli_opts = [ cfg.IntOpt('ip_lookup_sleep', default=int(APARAMS.get('ipa-ip-lookup-timeout', 10)), deprecated_name='ip-lookup-sleep', - help='The amaount of time to sleep between attempts' + help='The amount of time to sleep between attempts' 'to determine IP address.'), cfg.StrOpt('network_interface', @@ -88,7 +88,8 @@ cli_opts = [ help='The Ironic driver in use for this node'), cfg.FloatOpt('lldp_timeout', - default=APARAMS.get('lldp-timeout', 30.0), + default=APARAMS.get('ipa-lldp-timeout', + APARAMS.get('lldp-timeout', 30.0)), help='The amount of seconds to wait for LLDP packets.'), cfg.BoolOpt('standalone', diff --git a/ironic_python_agent/utils.py b/ironic_python_agent/utils.py index 87e8fac66..a5d0798b2 100644 --- a/ironic_python_agent/utils.py +++ b/ironic_python_agent/utils.py @@ -217,6 +217,13 @@ def get_agent_params(): # Cache the parameters so that it can be used later on. _set_cached_params(params) + # Check to see if any deprecated parameters have been used + deprecated_params = {'lldp-timeout': 'ipa-lldp-timeout'} + for old_param, new_param in deprecated_params.items(): + if params.get(old_param) is not None: + LOG.warning("The parameter '%s' has been deprecated. Please " + "use %s instead.", old_param, new_param) + return copy.deepcopy(params) diff --git a/releasenotes/notes/prefix-lldp-timeout-50acc656313d8dd2.yaml b/releasenotes/notes/prefix-lldp-timeout-50acc656313d8dd2.yaml new file mode 100644 index 000000000..44f0177c4 --- /dev/null +++ b/releasenotes/notes/prefix-lldp-timeout-50acc656313d8dd2.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Every other Ironic python agent kernel parameter is prefixed with "ipa-". + This patch allows users to use the old "lldp-timeout" parameter or the + new "ipa-lldp-timeout" parameter.