Signal after bmc configuration
Instead of having Heat fire-and-forget the bmc deployment, have the bmc explicitly signal back to Heat. This way bmc failures can be caught at env deployment time instead of the first time the undercloud tries to make an IPMI call.
This commit is contained in:
parent
6581fcf01a
commit
a36b6b722f
|
@ -136,6 +136,21 @@ do
|
|||
unit="openstack-bmc-$bm_port.service"
|
||||
systemctl enable $unit
|
||||
systemctl start $unit
|
||||
systemctl status $unit
|
||||
done
|
||||
|
||||
sleep 5
|
||||
|
||||
for i in $(seq 1 $bm_node_count)
|
||||
do
|
||||
bm_port="$bm_prefix_$(($i-1))"
|
||||
unit="openstack-bmc-$bm_port.service"
|
||||
if ! systemctl status $unit
|
||||
then
|
||||
$signal_command --data-binary '{"status": "FAILURE"}'
|
||||
echo "********** $unit failed to start **********"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
$signal_command --data-binary '{"status": "SUCCESS"}'
|
||||
|
||||
|
|
|
@ -163,6 +163,15 @@ resources:
|
|||
- _%index%
|
||||
network: {get_param: private_net}
|
||||
|
||||
bmc_handle:
|
||||
type: OS::Heat::WaitConditionHandle
|
||||
|
||||
bmc_wait_condition:
|
||||
type: OS::Heat::WaitCondition
|
||||
properties:
|
||||
handle: {get_resource: bmc_handle}
|
||||
timeout: 600
|
||||
|
||||
bmc_server:
|
||||
type: OS::Nova::Server
|
||||
depends_on: [openstack_baremetal_servers, bmc_other_ports, bmc_port]
|
||||
|
@ -191,6 +200,7 @@ resources:
|
|||
$private_net: {get_param: private_net}
|
||||
$openstackbmc_script: {get_file: ../bin/openstackbmc}
|
||||
$cloud_data: {get_param: cloud_data}
|
||||
$signal_command: {get_attr: [bmc_handle, curl_cli]}
|
||||
template: {get_file: ../bin/install_openstackbmc.sh}
|
||||
|
||||
baremetal_networks:
|
||||
|
|
Loading…
Reference in New Issue