From b4caa4d0e62589838e32c9abfef5d41fc693f91b Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Wed, 29 Jun 2016 10:23:59 +0200 Subject: [PATCH] Make all services optionals except keystone Change-Id: I2cb3c75bdd738a8e19796456f0aed14237ef755e --- grenade.sh | 5 ++++- projects/40_glance/settings | 6 ++++-- projects/60_nova/settings | 6 ++++-- projects/80_horizon/settings | 4 +++- save-state | 13 +++++++++---- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/grenade.sh b/grenade.sh index 0f8d3134..ff2abb20 100755 --- a/grenade.sh +++ b/grenade.sh @@ -238,7 +238,10 @@ if [[ "$RUN_BASE" == "True" ]]; then rsync -a $BASE_DEVSTACK_DIR/files/$IMAGE_FNAME $BASE_RELEASE_DIR/images fi done - rsync -a $BASE_DEVSTACK_DIR/files/images/ $BASE_RELEASE_DIR/images + # NOTE(sileht): If glance is not enabled the directory cannot exists. + if [[ -d $BASE_DEVSTACK_DIR/files/images ]] ; then + rsync -a $BASE_DEVSTACK_DIR/files/images/ $BASE_RELEASE_DIR/images + fi stop $STOP image-cache 20 # Operation diff --git a/projects/40_glance/settings b/projects/40_glance/settings index 24323a13..97d04efe 100644 --- a/projects/40_glance/settings +++ b/projects/40_glance/settings @@ -1,2 +1,4 @@ -register_project_for_upgrade glance -register_db_to_save glance \ No newline at end of file +if is_service_enabled glance; then + register_project_for_upgrade glance + register_db_to_save glance +fi diff --git a/projects/60_nova/settings b/projects/60_nova/settings index a08f0a18..6bd94ce8 100644 --- a/projects/60_nova/settings +++ b/projects/60_nova/settings @@ -1,2 +1,4 @@ -register_project_for_upgrade nova -register_db_to_save nova \ No newline at end of file +if is_service_enabled nova; then + register_project_for_upgrade nova + register_db_to_save nova +fi diff --git a/projects/80_horizon/settings b/projects/80_horizon/settings index 0eabb1dd..30e16538 100644 --- a/projects/80_horizon/settings +++ b/projects/80_horizon/settings @@ -1 +1,3 @@ -register_project_for_upgrade horizon \ No newline at end of file +if is_service_enabled horizon; then + register_project_for_upgrade horizon +fi diff --git a/save-state b/save-state index 86c1b838..d363a3b5 100755 --- a/save-state +++ b/save-state @@ -47,10 +47,15 @@ save_data $BASE_RELEASE $BASE_DEVSTACK_DIR # Save ebtables/iptables # ---------------------- -sudo iptables-save >$SAVE_DIR/iptables.$BASE_RELEASE -sudo ebtables -t broute -L >$SAVE_DIR/ebtables-broute.$BASE_RELEASE -sudo ebtables -t filter -L >$SAVE_DIR/ebtables-filter.$BASE_RELEASE -sudo ebtables -t nat -L >$SAVE_DIR/ebtables-nat.$BASE_RELEASE +# NOTE(sileht): If nova is not installed this tools are not present +if [ -x "$(iptable-save)" ]; then + sudo iptables-save >$SAVE_DIR/iptables.$BASE_RELEASE +fi +if [ -x "$(ebtables)" ]; then + sudo ebtables -t broute -L >$SAVE_DIR/ebtables-broute.$BASE_RELEASE + sudo ebtables -t filter -L >$SAVE_DIR/ebtables-filter.$BASE_RELEASE + sudo ebtables -t nat -L >$SAVE_DIR/ebtables-nat.$BASE_RELEASE +fi # Log RabbitMQ state # ------------------