Merge "Fail IPA startup if no protocol prefix in ironic api address"

This commit is contained in:
Jenkins 2016-12-29 23:33:21 +00:00 committed by Gerrit Code Review
commit dbc647ceff
2 changed files with 11 additions and 1 deletions

@ -25,8 +25,10 @@ cli_opts = [
cfg.StrOpt('api_url',
default=APARAMS.get('ipa-api-url'),
deprecated_name='api-url',
regex='^http(s?):\/\/.+',
help='URL of the Ironic API. '
'Can be supplied as "ipa-api-url" kernel parameter.'),
'Can be supplied as "ipa-api-url" kernel parameter.'
'The value must start with either http:// or https://.'),
cfg.StrOpt('listen_host',
default=APARAMS.get('ipa-listen-host', '0.0.0.0'),

@ -0,0 +1,8 @@
---
fixes:
- Accepting ``ipa-api-url`` value specified in the configuration
file that does not start with either ``https://`` or ``http://``.
Such value leads failure while contacting ironic-api.
This misconfiguration will be detected on ironic-python-agent start.
An exception will be raised and an error about the invalid value
will be logged.