From 7cf604036f74ba5776dc781257d8c1167eca1822 Mon Sep 17 00:00:00 2001 From: "SKELS, KASPARS (ks3019)" Date: Tue, 19 Mar 2019 15:08:30 -0500 Subject: [PATCH] Minor fixes as follow-up for new Pegleg Change-Id: Ice3d03f5cf890cca55f191bbb3f6252fc2901997 --- tools/multi_nodes_gate/airship_gate/lib/airship.sh | 2 +- tools/multi_nodes_gate/airship_gate/lib/virsh.sh | 4 ++-- tools/multi_nodes_gate/airship_gate/stages/build-scripts.sh | 2 +- .../airship_gate/stages/generate-certificates.sh | 2 +- .../airship_gate/stages/shipyard-load-design.sh | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/multi_nodes_gate/airship_gate/lib/airship.sh b/tools/multi_nodes_gate/airship_gate/lib/airship.sh index 39f5ec3a..13af063f 100644 --- a/tools/multi_nodes_gate/airship_gate/lib/airship.sh +++ b/tools/multi_nodes_gate/airship_gate/lib/airship.sh @@ -140,7 +140,7 @@ collect_ssh_key() { ssh_keypair_declare fi - if [[ "${USE_EXISTING_SECRETS}" ]]; then + if [[ -n "${USE_EXISTING_SECRETS}" ]]; then log "Using existing manifests for secrets" return 0 fi diff --git a/tools/multi_nodes_gate/airship_gate/lib/virsh.sh b/tools/multi_nodes_gate/airship_gate/lib/virsh.sh index 1e3323ff..b6fcf83c 100644 --- a/tools/multi_nodes_gate/airship_gate/lib/virsh.sh +++ b/tools/multi_nodes_gate/airship_gate/lib/virsh.sh @@ -324,9 +324,9 @@ install_libvirt_key() { sudo chmod 700 ~virtmgr/.ssh sudo chmod 600 ~virtmgr/.ssh/authorized_keys - if [[ "${USE_EXISTING_SECRETS}" ]]; then + if [[ -n "${USE_EXISTING_SECRETS}" ]]; then log "Using existing manifests for secrets" - return 0 + return 0 fi mkdir -p "${GATE_DEPOT}" diff --git a/tools/multi_nodes_gate/airship_gate/stages/build-scripts.sh b/tools/multi_nodes_gate/airship_gate/stages/build-scripts.sh index 6fe06822..cce2d90e 100755 --- a/tools/multi_nodes_gate/airship_gate/stages/build-scripts.sh +++ b/tools/multi_nodes_gate/airship_gate/stages/build-scripts.sh @@ -19,7 +19,7 @@ done CERTS_PATH="/certs/*.yaml" KEYS_PATH="/gate/*.yaml" -if [[ "${USE_EXISTING_SECRETS}" ]] +if [[ -n "${USE_EXISTING_SECRETS}" ]] then CERTS_PATH="" KEYS_PATH="" diff --git a/tools/multi_nodes_gate/airship_gate/stages/generate-certificates.sh b/tools/multi_nodes_gate/airship_gate/stages/generate-certificates.sh index 80e5694e..c56f4dee 100755 --- a/tools/multi_nodes_gate/airship_gate/stages/generate-certificates.sh +++ b/tools/multi_nodes_gate/airship_gate/stages/generate-certificates.sh @@ -30,7 +30,7 @@ GATE_FILES=($(find "${GATE_DEPOT}" -name '*.yaml' | xargs -n 1 basename | xargs mkdir -p "${CERT_DEPOT}" chmod 777 "${CERT_DEPOT}" -if [[ "${USE_EXISTING_SECRETS}" ]] +if [[ -n "${USE_EXISTING_SECRETS}" ]] then log Certificates already provided by manifests exit 0 diff --git a/tools/multi_nodes_gate/airship_gate/stages/shipyard-load-design.sh b/tools/multi_nodes_gate/airship_gate/stages/shipyard-load-design.sh index a8fb8872..cb069563 100755 --- a/tools/multi_nodes_gate/airship_gate/stages/shipyard-load-design.sh +++ b/tools/multi_nodes_gate/airship_gate/stages/shipyard-load-design.sh @@ -60,7 +60,7 @@ sleep 120 check_configdocs_result "$(shipyard_cmd create configdocs design --directory=${BUILD_WORK_DIR}/site --replace)" # Skip certs/gate if already part of site manifests -if [[ "${USE_EXISTING_SECRETS}" ]] +if [[ -n "${USE_EXISTING_SECRETS}" ]] then OMIT_CERTS=1 OMIT_GATE=1