diff --git a/scripts/devenv-builder/configure-vm.sh b/scripts/devenv-builder/configure-vm.sh index c8881c8b11..dc65862f1b 100755 --- a/scripts/devenv-builder/configure-vm.sh +++ b/scripts/devenv-builder/configure-vm.sh @@ -181,9 +181,11 @@ if ${RHEL_SUBSCRIPTION}; then OSVERSION=$(awk -F: '{print $5}' /etc/system-release-cpe) sudo subscription-manager config --rhsm.manage_repos=1 + sudo subscription-manager repos \ + --enable "rhocp-${OCPVERSION}-for-rhel-${OSVERSION}-$(uname -m)-rpms" + if ! ${RHEL_BETA_VERSION} ; then sudo subscription-manager repos \ - --enable "rhocp-${OCPVERSION}-for-rhel-${OSVERSION}-$(uname -m)-rpms" \ --enable "fast-datapath-for-rhel-${OSVERSION}-$(uname -m)-rpms" else OCP_REPO_NAME="rhocp-${OCPVERSION}-for-rhel-${OSVERSION}-mirrorbeta-$(uname -i)-rpms" diff --git a/scripts/image-builder/cleanup.sh b/scripts/image-builder/cleanup.sh index 204f0cca41..197745632d 100755 --- a/scripts/image-builder/cleanup.sh +++ b/scripts/image-builder/cleanup.sh @@ -82,7 +82,16 @@ restart_osbuilder_services() { if ! systemctl is-active -q osbuild-composer.socket &>/dev/null ; then title "Starting osbuild services" sudo systemctl start osbuild-composer.socket - sudo systemctl start osbuild-worker@1.service + for try in $(seq 3); do + sleep 1 # Give composer some time to be ready for workers + if sudo systemctl start osbuild-worker@1.service; then + break + else + if [ "${try}" -eq 2 ]; then + return 1 + fi + fi + done fi } diff --git a/test/bin/build_images.sh b/test/bin/build_images.sh index d8db45fedb..8cf5b90e0a 100755 --- a/test/bin/build_images.sh +++ b/test/bin/build_images.sh @@ -354,7 +354,7 @@ do_group() { rc=$? set -e if [[ "${rc}" -eq 0 ]]; then - buildid=$(echo "${build_cmd_output}" | awk '{print $2}') + buildid=$(echo "${build_cmd_output}" | awk '/^Compose/ {print $2}') break fi sleep 15 @@ -473,6 +473,12 @@ do_group() { builds_to_get=$(time "${SCRIPTDIR}/wait_images.py" "${buildid_list[@]}") fi + builds_to_get_num="$(echo "${builds_to_get}" | awk -F' ' '{print NF}')" + if [ "${#buildid_list[@]}" -ne "${builds_to_get_num}" ]; then + echo "wait_images.py returned unexpected amount of build IDs" + return 1 + fi + echo "Downloading build logs, metadata, and image" cd "${IMAGEDIR}/builds" @@ -546,6 +552,7 @@ do_group() { record_junit "${groupdir}" "${alias_name}" "alias" "OK" else record_junit "${groupdir}" "${alias_name}" "alias" "FAILED" + return 1 fi done