Move flavor create under 'VIRT_DRIVER == ironic'
We only check nova service enabled when VIRT_DRIVER set to ironic, so moving nova flavor create under the condition in case of nova disabled. Change-Id: I351c3628895d25823500d116845eff3c8b9411fe
This commit is contained in:
parent
0e3b3e8671
commit
e388c3e715
@ -1184,12 +1184,12 @@ function enroll_nodes {
|
||||
total_cpus=$((total_cpus+$ironic_node_cpu))
|
||||
done < $ironic_hwinfo_file
|
||||
|
||||
local adjusted_disk
|
||||
adjusted_disk=$(($ironic_node_disk - $ironic_ephemeral_disk))
|
||||
openstack flavor create --ephemeral $ironic_ephemeral_disk --ram $ironic_node_ram --disk $adjusted_disk --vcpus $ironic_node_cpu baremetal
|
||||
openstack flavor set baremetal --property "cpu_arch"="$ironic_node_arch"
|
||||
|
||||
if [ "$VIRT_DRIVER" == "ironic" ]; then
|
||||
local adjusted_disk
|
||||
adjusted_disk=$(($ironic_node_disk - $ironic_ephemeral_disk))
|
||||
openstack flavor create --ephemeral $ironic_ephemeral_disk --ram $ironic_node_ram --disk $adjusted_disk --vcpus $ironic_node_cpu baremetal
|
||||
openstack flavor set baremetal --property "cpu_arch"="$ironic_node_arch"
|
||||
|
||||
# NOTE(dtantsur): sometimes nova compute fails to start with ironic due
|
||||
# to keystone restarting and not being able to authenticate us.
|
||||
# Restart it just to be sure (and avoid gate problems like bug 1537076)
|
||||
|
Loading…
x
Reference in New Issue
Block a user