Add configuration options for DISK_WAIT

https://review.openstack.org/#/c/320295/ introduced two internal
variables: _DISK_WAIT_ATTEMPTS and _DISK_WAIT_DELAY. These values are
hardcoded. This patch adds configuration options for these so
that an operator can change them based on their own needs/fleet of
hardware.

Change-Id: I2ba97669ec710fb4a435307466cd8add9c2293ba
Closes-Bug: #1585663
This commit is contained in:
Yosef Hoffman
2016-06-02 13:34:10 -04:00
parent 90ba6452ef
commit 13a8c6321e
4 changed files with 121 additions and 12 deletions

@ -128,6 +128,18 @@ cli_opts = [
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.'),
cfg.IntOpt('disk_wait_attempts',
default=APARAMS.get('ipa-disk-wait-attempts', 10),
help='The number of times to try and check to see if '
'at least one suitable disk has appeared in inventory '
'before proceeding with any actions.'),
cfg.IntOpt('disk_wait_delay',
default=APARAMS.get('ipa-disk-wait-delay', 3),
help='How much time (in seconds) to wait between attempts '
'to check if at least one suitable disk has appeared '
'in inventory.'),
]
CONF.register_cli_opts(cli_opts)