Make nova-next archive using --before
Change-Id: I4fbd0cb73c73ab680af3f341d6069addb57393fb
This commit is contained in:
parent
e822360b66
commit
0685139ed8
|
@ -5,8 +5,12 @@ MANAGE="/usr/local/bin/nova-manage"
|
||||||
function archive_deleted_rows {
|
function archive_deleted_rows {
|
||||||
# NOTE(danms): Run this a few times to make sure that we end
|
# NOTE(danms): Run this a few times to make sure that we end
|
||||||
# up with nothing more to archive
|
# up with nothing more to archive
|
||||||
|
if ! $MANAGE $* db archive_deleted_rows --verbose --before "$(date -d yesterday)" 2>&1 | grep 'Nothing was archived'; then
|
||||||
|
echo "Archiving yesterday data should have done nothing"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
for i in `seq 30`; do
|
for i in `seq 30`; do
|
||||||
$MANAGE $* db archive_deleted_rows --verbose --max_rows 1000
|
$MANAGE $* db archive_deleted_rows --verbose --max_rows 1000 --before "$(date -d tomorrow)"
|
||||||
RET=$?
|
RET=$?
|
||||||
if [[ $RET -gt 1 ]]; then
|
if [[ $RET -gt 1 ]]; then
|
||||||
echo Archiving failed with result $RET
|
echo Archiving failed with result $RET
|
||||||
|
|
Loading…
Reference in New Issue