diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 68696f591a..9c4dc6be38 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -83,8 +83,9 @@ fi info_block "Checking for required libraries." 2> /dev/null || source "${OSA_CLONE_DIR}/scripts/scripts-library.sh" ## Main ---------------------------------------------------------------------- - # Log some data about the instance and the rest of the system +gate_log_requirements + log_instance_info run_dstat || true diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index d5f170a02a..54d4916771 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -200,6 +200,20 @@ function gate_job_exit_tasks { log_instance_info } +function gate_log_requirements { + # ensure packages are installed to get instance info + determine_distro + case ${DISTRO_ID} in + ubuntu|debian) + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get -y install iproute2 net-tools + ;; + rocky|centos|rhel) + dnf -y install iproute + ;; + esac +} + function setup_ara { # Install ARA and add it to the callback path provided by bootstrap-ansible.sh/openstack-ansible.rc # This is added *here* instead of bootstrap-ansible so it's used for CI purposes only. @@ -245,17 +259,6 @@ function info_block { } function log_instance_info { - # ensure packages are installed to get instance info - determine_distro - case ${DISTRO_ID} in - ubuntu|debian) - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get -y install iproute2 net-tools - ;; - rocky|centos|rhel) - dnf -y install iproute - ;; - esac set +x # Get host information post initial setup and reset verbosity if [ ! -d "/openstack/log/instance-info" ];then