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
This commit is contained in:
Jay Faulkner 2021-03-24 14:28:36 -07:00 committed by Dmitry Tantsur
parent 2a64413bb6
commit de726d4acf
4 changed files with 9 additions and 14 deletions

View File

@ -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.

View File

@ -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()

View File

@ -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 '

View File

@ -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.