Merge "Make nova-manage db purge take --all-cells"
This commit is contained in:
commit
5eb1ece537
@ -19,7 +19,7 @@ function archive_deleted_rows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function purge_db {
|
function purge_db {
|
||||||
$MANAGE $* db purge --all --verbose
|
$MANAGE db purge --all --verbose --all-cells
|
||||||
RET=$?
|
RET=$?
|
||||||
if [[ $RET -eq 0 ]]; then
|
if [[ $RET -eq 0 ]]; then
|
||||||
echo Purge successful
|
echo Purge successful
|
||||||
@ -40,7 +40,7 @@ cell_conf=$(conductor_conf 1)
|
|||||||
conf="--config-file $NOVA_CONF --config-file $cell_conf"
|
conf="--config-file $NOVA_CONF --config-file $cell_conf"
|
||||||
|
|
||||||
archive_deleted_rows $conf
|
archive_deleted_rows $conf
|
||||||
purge_db $conf
|
purge_db
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
# We need to get the admin credentials to run the OSC CLIs for Placement.
|
# We need to get the admin credentials to run the OSC CLIs for Placement.
|
||||||
|
@ -5926,8 +5926,8 @@ def _purgeable_tables(metadata):
|
|||||||
t.name.endswith('migrate_version'))]
|
t.name.endswith('migrate_version'))]
|
||||||
|
|
||||||
|
|
||||||
def purge_shadow_tables(before_date, status_fn=None):
|
def purge_shadow_tables(context, before_date, status_fn=None):
|
||||||
engine = get_engine()
|
engine = get_engine(context=context)
|
||||||
conn = engine.connect()
|
conn = engine.connect()
|
||||||
metadata = MetaData()
|
metadata = MetaData()
|
||||||
metadata.bind = engine
|
metadata.bind = engine
|
||||||
|
Loading…
Reference in New Issue
Block a user