From de726d4acf149903f6b7ca4c93e18a76604c403f Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Wed, 24 Mar 2021 14:28:36 -0700 Subject: [PATCH] Do not permit IPA standalone to be enabled by conf IPA standalone mode is a developer-only option, and if enabled accidentally on a production agent could cause undesired behavior. Developers who need this behavior should build a purpose-built agent, with standalone hardcoded to True in cmd/agent.py. Change-Id: Icc67dbe15acbbf6fee886f274d2169a0769a5053 --- doc/source/install/index.rst | 7 ------- ironic_python_agent/cmd/agent.py | 2 +- ironic_python_agent/config.py | 6 ------ releasenotes/notes/no-standalone-bb34eae2cc468837.yaml | 8 ++++++++ 4 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/no-standalone-bb34eae2cc468837.yaml diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index 375802e70..cce3bd311 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -25,13 +25,6 @@ IPA Flags You can pass a variety of flags to IPA on start up to change its behavior. -* ``--standalone``: This disables the initial lookup and heartbeats to Ironic. - Lookup sends some information to Ironic in order to determine Ironic's node - UUID for the node. Heartbeat sends periodic pings to Ironic to tell Ironic - the node is still running. These heartbeats also trigger parts of the deploy - and cleaning cycles. This flag is useful for debugging IPA without an Ironic - installation. - * ``--debug``: Enables debug logging. diff --git a/ironic_python_agent/cmd/agent.py b/ironic_python_agent/cmd/agent.py index 794f5d83e..925303479 100644 --- a/ironic_python_agent/cmd/agent.py +++ b/ironic_python_agent/cmd/agent.py @@ -57,7 +57,7 @@ def run(): CONF.network_interface, CONF.lookup_timeout, CONF.lookup_interval, - CONF.standalone, + False, CONF.agent_token, CONF.hardware_initialization_delay, CONF.advertise_protocol).run() diff --git a/ironic_python_agent/config.py b/ironic_python_agent/config.py index 8cfe0d58c..8901c45a2 100644 --- a/ironic_python_agent/config.py +++ b/ironic_python_agent/config.py @@ -151,12 +151,6 @@ cli_opts = [ 'Can be supplied as "ipa-collect-lldp" ' 'kernel parameter.'), - cfg.BoolOpt('standalone', - default=APARAMS.get('ipa-standalone', False), - help='Start the Agent but suppress any calls to Ironic API, ' - 'the agent runs on this mode for poll mode deployment. ' - 'Can be supplied as "ipa-standalone" kernel parameter.'), - cfg.StrOpt('inspection_callback_url', default=APARAMS.get('ipa-inspection-callback-url'), help='Endpoint of ironic-inspector. If set, hardware inventory ' diff --git a/releasenotes/notes/no-standalone-bb34eae2cc468837.yaml b/releasenotes/notes/no-standalone-bb34eae2cc468837.yaml new file mode 100644 index 000000000..fb6dfaf58 --- /dev/null +++ b/releasenotes/notes/no-standalone-bb34eae2cc468837.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + It is no longer possible to enable the so called *standalone mode*, in + which the agent does not communicate with ironic. This mode is only + useful for local testing, enabling it on production is always wrong. + The ironic team does not support using ironic-python-agent as a standalone + application outside of the normal workflow.