From 71e7ecf6ce97afb981dd8ac86099a4c8f770d6fa Mon Sep 17 00:00:00 2001 From: Eric Ball Date: Tue, 4 Aug 2020 11:15:52 -0700 Subject: [PATCH] Update sigul-install.sh to check for sigul If sigul is already installed, we can skip the installation. This is important due to kojipkgs being unreliable. We now have the sigul binary baked into the base image creation, so newer images should already have sigul on board. If they do and we still try to do this manual installation, we could still run into connection issues with kojipkgs. Issue: RELENG-3115 Change-Id: I3580b92b8e4c1c72493069bf977f96e36aba6a85 Signed-off-by: Eric Ball --- .../notes/sigul-install-check-765a0b5eda01cfa4.yaml | 9 +++++++++ shell/sigul-install.sh | 17 ++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/sigul-install-check-765a0b5eda01cfa4.yaml mode change 100644 => 100755 shell/sigul-install.sh diff --git a/releasenotes/notes/sigul-install-check-765a0b5eda01cfa4.yaml b/releasenotes/notes/sigul-install-check-765a0b5eda01cfa4.yaml new file mode 100644 index 00000000..e54a5a55 --- /dev/null +++ b/releasenotes/notes/sigul-install-check-765a0b5eda01cfa4.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + Update sigul-install.sh to check for sigul. If sigul is already installed, + we can skip the installation. This is important due to kojipkgs being + unreliable. We now have the sigul binary baked into the base image creation, + so newer images should already have sigul on board. If they do and we still + try to do this manual installation, we could still run into connection + issues with kojipkgs. diff --git a/shell/sigul-install.sh b/shell/sigul-install.sh old mode 100644 new mode 100755 index 8573154e..59d0a194 --- a/shell/sigul-install.sh +++ b/shell/sigul-install.sh @@ -13,8 +13,11 @@ echo "---> sigul-install.sh" # Ensure we fail the job if any steps fail. set -e -o pipefail -# Setup sigul RPM repo -echo "[fedora-infra-sigul] +if command -v sigul &>/dev/null; then + echo "Sigul already installed; skipping installation." +else + # Setup sigul RPM repo + echo "[fedora-infra-sigul] name=Fedora builder packages for sigul baseurl=https://kojipkgs.fedoraproject.org/repos-dist/epel\$releasever-infra/latest/\$basearch/ enabled=1 @@ -23,12 +26,12 @@ gpgkey=https://infrastructure.fedoraproject.org/repo/infra/RPM-GPG-KEY-INFRA-TAG includepkgs=sigul* skip_if_unavailable=True" > fedora-infra-sigul.repo -sudo cp fedora-infra-sigul.repo /etc/yum.repos.d -rm fedora-infra-sigul.repo - -# install sigul -sudo yum install -y -q sigul + sudo cp fedora-infra-sigul.repo /etc/yum.repos.d + rm fedora-infra-sigul.repo + # install sigul + sudo yum install -y -q sigul +fi; # configure /etc/hosts with the sigul bridge hostname # This is needed as build minions can't always get DNS resolution # on the bridge -- 2.16.6