Fix create_flavors on subnodes
This makes us depend on n-api being enabled, which should avoid running this on subnodes, where it fails because of no credentials. Change-Id: I209bd59cd57be27c3375f5a2074361307abcafe9 Closes-Bug: #1567065
This commit is contained in:
parent
5df868e83d
commit
d3d21394db
2
lib/nova
2
lib/nova
@ -934,6 +934,7 @@ function stop_nova {
|
|||||||
|
|
||||||
# create_instance_types(): Create default flavors
|
# create_instance_types(): Create default flavors
|
||||||
function create_flavors {
|
function create_flavors {
|
||||||
|
if is_service_enabled n-api; then
|
||||||
if ! openstack flavor list | grep -q ds512M; then
|
if ! openstack flavor list | grep -q ds512M; then
|
||||||
# Note that danms hates these flavors and apologizes for sdague
|
# Note that danms hates these flavors and apologizes for sdague
|
||||||
openstack flavor create --id c1 --ram 256 --disk 0 --vcpus 1 cirros256
|
openstack flavor create --id c1 --ram 256 --disk 0 --vcpus 1 cirros256
|
||||||
@ -950,6 +951,7 @@ function create_flavors {
|
|||||||
openstack flavor create --id 4 --ram 8192 --disk 80 --vcpus 4 m1.large
|
openstack flavor create --id 4 --ram 8192 --disk 80 --vcpus 4 m1.large
|
||||||
openstack flavor create --id 5 --ram 16384 --disk 160 --vcpus 8 m1.xlarge
|
openstack flavor create --id 5 --ram 16384 --disk 160 --vcpus 8 m1.xlarge
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
|
Loading…
Reference in New Issue
Block a user