Merge "Create cell1 cell before n-api starts"
This commit is contained in:
commit
8ddbf6f89d
19
lib/nova
19
lib/nova
@ -664,6 +664,10 @@ function init_nova_cells {
|
|||||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF db sync
|
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF db sync
|
||||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
|
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
|
||||||
$NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1
|
$NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1
|
||||||
|
|
||||||
|
# Creates the single cells v2 cell for the child cell (v1) nova db.
|
||||||
|
nova-manage --config-file $NOVA_CELLS_CONF cell_v2 create_cell \
|
||||||
|
--transport-url $(get_transport_url child_cell) --name 'cell1'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -720,6 +724,10 @@ function init_nova {
|
|||||||
# Run online migrations on the new databases
|
# Run online migrations on the new databases
|
||||||
# Needed for flavor conversion
|
# Needed for flavor conversion
|
||||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations
|
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations
|
||||||
|
|
||||||
|
# create the cell1 cell for the main nova db where the hosts live
|
||||||
|
nova-manage cell_v2 create_cell --transport-url $(get_transport_url) \
|
||||||
|
--name 'cell1'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
create_nova_cache_dir
|
create_nova_cache_dir
|
||||||
@ -970,17 +978,6 @@ function create_flavors {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# create_cell(): Group the available hosts into a cell
|
|
||||||
function create_cell {
|
|
||||||
if ! is_service_enabled n-cell; then
|
|
||||||
nova-manage cell_v2 simple_cell_setup --transport-url $(get_transport_url)
|
|
||||||
else
|
|
||||||
nova-manage --config-file $NOVA_CELLS_CONF --verbose cell_v2 map_cell_and_hosts \
|
|
||||||
--transport-url $(get_transport_url child_cell) --name 'cell1'
|
|
||||||
nova-manage db sync
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$_XTRACE_LIB_NOVA
|
$_XTRACE_LIB_NOVA
|
||||||
|
|
||||||
|
2
stack.sh
2
stack.sh
@ -1364,7 +1364,7 @@ check_libs_from_git
|
|||||||
# Do this late because it requires compute hosts to have started
|
# Do this late because it requires compute hosts to have started
|
||||||
if is_service_enabled n-api; then
|
if is_service_enabled n-api; then
|
||||||
if is_service_enabled n-cpu; then
|
if is_service_enabled n-cpu; then
|
||||||
create_cell
|
$TOP_DIR/tools/discover_hosts.sh
|
||||||
else
|
else
|
||||||
# Some CI systems like Hyper-V build the control plane on
|
# Some CI systems like Hyper-V build the control plane on
|
||||||
# Linux, and join in non Linux Computes after setup. This
|
# Linux, and join in non Linux Computes after setup. This
|
||||||
|
Loading…
x
Reference in New Issue
Block a user