diff options
| author | Dmitry Tantsur <dtantsur@redhat.com> | 2016-05-19 17:21:28 +0200 |
|---|---|---|
| committer | Dmitry Tantsur <dtantsur@redhat.com> | 2016-05-24 10:39:52 +0200 |
| commit | c09753bb60be1819ef102ba8a86b534bba146ccb (patch) | |
| tree | 0e554d1c96ae704ffd09d648428e6c962b03e3fa /ironic_python_agent/cmd | |
| parent | 015fad6054d0572daadd193b68ba17c9de0ae8e0 (diff) | |
| download | ironic-python-agent-c09753bb60be1819ef102ba8a86b534bba146ccb.tar.gz | |
Add a configurable sleep before IPA starts working
Some kernel modules take substantial time to initialize. For example,
with mpt2sas RAID driver inspection and deployment randomly fail
due to IPA starting before the driver finishes initialization.
As much as I hate it, the only way to guarantee that the hardware is
truely initalized is to wait for it. Apparently all hardware in Linux
is treated as hotplugged, so there is no such thing as "hardware
initialization is finished". Operators can add a sleep based on their
knowledge of their hardware.
The default behaviour remains the same.
Change-Id: I0446ae81d760dacaf31eea6ad9f9eaa098cf5e93
Partial-Bug: #1582797
Diffstat (limited to 'ironic_python_agent/cmd')
| -rw-r--r-- | ironic_python_agent/cmd/agent.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ironic_python_agent/cmd/agent.py b/ironic_python_agent/cmd/agent.py index 8cec4999..705bf587 100644 --- a/ironic_python_agent/cmd/agent.py +++ b/ironic_python_agent/cmd/agent.py @@ -129,6 +129,11 @@ cli_opts = [ help='Whether to wait for all interfaces to get their IP ' 'addresses before inspection. If set to false ' '(the default), only waits for the PXE interface.'), + + cfg.IntOpt('hardware_initialization_delay', + default=APARAMS.get('ipa-hardware-initialization-delay', 0), + help='How much time (in seconds) to wait for hardware to ' + 'initialize before proceeding with any actions.'), ] CONF.register_cli_opts(cli_opts) @@ -153,4 +158,5 @@ def run(): CONF.lookup_timeout, CONF.lookup_interval, CONF.driver_name, - CONF.standalone).run() + CONF.standalone, + CONF.hardware_initialization_delay).run() |
