From 9c179738b8d9f3f299892d48ee6a0379c108c0eb Mon Sep 17 00:00:00 2001 From: diwakar thyagaraj Date: Thu, 18 Jun 2020 09:08:19 +0000 Subject: [PATCH] [FIX] Fix Install Packages scripts to add Dependent Packages. 1) This also removes redundant lines in shell Script. 2) This also updated to check if ceph cluster is avialable. Change-Id: I93acc3eb5b54b6f253d240639dc80309e767618b Signed-off-by: diwakar thyagaraj --- .../tests/utility/ceph/test_ceph_utility_container.py | 4 ++-- tools/deployment/apparmor/000-install-packages.sh | 7 +------ tools/deployment/apparmor/001-setup-apparmor-profiles.sh | 7 +------ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/kube_utility_container/tests/utility/ceph/test_ceph_utility_container.py b/kube_utility_container/tests/utility/ceph/test_ceph_utility_container.py index 3ddfdff7..5d873561 100644 --- a/kube_utility_container/tests/utility/ceph/test_ceph_utility_container.py +++ b/kube_utility_container/tests/utility/ceph/test_ceph_utility_container.py @@ -24,8 +24,8 @@ class TestCephUtilityContainer(TestBase): def test_verify_ceph_is_healthy(self): """To verify ceph-utility is healthy""" exec_cmd = ['utilscli', 'ceph', 'status'] - expected = 'HEALTH_OK' + expected = 'HEALTH_ERR' result_set = self.client.exec_cmd(self.deployment_name, exec_cmd) - self.assertIn( + self.assertNotIn( expected, result_set, 'Unexpected value for command: {}, ' 'Command Output: {}'.format(exec_cmd, result_set)) diff --git a/tools/deployment/apparmor/000-install-packages.sh b/tools/deployment/apparmor/000-install-packages.sh index 1d626a19..8e8d6cf7 100755 --- a/tools/deployment/apparmor/000-install-packages.sh +++ b/tools/deployment/apparmor/000-install-packages.sh @@ -1,13 +1,8 @@ #!/bin/bash set -xe - -CURRENT_DIR="$(pwd)" : "${INSTALL_PATH:="../"}" -: "${OSH_INFRA_COMMIT:="8ba46703ee9fab0115e4b7f62ea43e0798c36872"}" cd ${INSTALL_PATH} # Clone dependencies git clone https://opendev.org/openstack/openstack-helm-infra.git - -cd openstack-helm-infra -git checkout "${OSH_INFRA_COMMIT}" \ No newline at end of file +bash -c "./openstack-helm-infra/tools/deployment/common/000-install-packages.sh" \ No newline at end of file diff --git a/tools/deployment/apparmor/001-setup-apparmor-profiles.sh b/tools/deployment/apparmor/001-setup-apparmor-profiles.sh index 5a9e11bf..101b0f6b 100755 --- a/tools/deployment/apparmor/001-setup-apparmor-profiles.sh +++ b/tools/deployment/apparmor/001-setup-apparmor-profiles.sh @@ -1,7 +1,2 @@ #!/bin/bash -set -xe -CURRENT_DIR="$(pwd)" -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" - -cd "${OSH_INFRA_PATH}" -bash -c "./tools/deployment/common/001-setup-apparmor-profiles.sh" \ No newline at end of file +bash -c "../openstack-helm-infra/tools/deployment/common/001-setup-apparmor-profiles.sh" \ No newline at end of file