Ironic: Require number for IronicIPXEPort

This parameter determines the tcp port used by PXE server, thus its
value should be a number rather than a string.

This also fixes the issue caused by puppetlabs-apache 8.0.0 which
requires an integer value for apache::vhost::port.

The logic to generate http_url is refactored using the str_replace
template function.

Partial-Bug: #1988053
Change-Id: I2a47db5a91400d5321ad6f3750cf75281cb89d08
This commit is contained in:
Takashi Kajinami 2022-08-30 17:39:28 +09:00
parent 5775d1274e
commit 63a08d2296
2 changed files with 8 additions and 13 deletions

View File

@ -208,7 +208,7 @@ parameters:
IronicIPXEPort:
default: 8088
description: Port to use for serving images when iPXE is used.
type: string
type: number
IronicIPXETimeout:
default: 60
description: iPXE timeout in second. Set to 0 for infinite timeout.
@ -439,18 +439,13 @@ outputs:
ironic::conductor::allow_provisioning_in_maintenance: false
ironic::conductor::power_state_change_timeout: {get_param: IronicPowerStateChangeTimeout}
# We need an endpoint containing a real IP, not a VIP here
ironic_conductor_http_host:
str_replace:
template:
"%{lookup('$NETWORK_uri')}"
params:
$NETWORK: {get_param: [ServiceNetMap, IronicNetwork]}
ironic::conductor::http_url:
list_join:
- ''
- - 'http://'
- "%{lookup('ironic_conductor_http_host')}:"
- {get_param: IronicIPXEPort}
str_replace:
template:
"http://%{lookup('$NETWORK_uri')}:$PORT"
params:
$NETWORK: {get_param: [ServiceNetMap, IronicNetwork]}
$PORT: {get_param: IronicIPXEPort}
ironic::drivers::pxe::ipxe_timeout: {get_param: IronicIPXETimeout}
# NOTE: bind IP is found in hiera replacing the network name with the
# local node IP for the given network; replacement examples

View File

@ -164,7 +164,7 @@ parameters:
IronicIPXEPort:
default: 8088
description: Port to use for serving images when iPXE is used.
type: string
type: number
IronicPassword:
description: The password for the Ironic service and db account, used by the Ironic services
type: string