From d8170deb0731b0022383801eb6223a889016d8dc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 4 Dec 2015 22:11:22 +0100 Subject: [PATCH] Remove CentOS6 from nodepool scripts With CentOS6 usage removed, remove special handling for it from nodepool scripts. Change-Id: Ife5ec9ade201dcd8f5969087dd2fc88be12dbebd --- .../cache-bindep/install.d/50-cache-pkgs | 20 +------------------ .../cache-devstack/install.d/50-download-pkgs | 20 +------------------ nodepool/scripts/prepare_node.sh | 14 +------------ 3 files changed, 3 insertions(+), 51 deletions(-) diff --git a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs b/nodepool/elements/cache-bindep/install.d/50-cache-pkgs index e7e8b1787b..e89e9ee858 100755 --- a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs +++ b/nodepool/elements/cache-bindep/install.d/50-cache-pkgs @@ -50,27 +50,9 @@ echo "$PACKAGES" > $PACKAGESFILE PACKAGELIST=`/usr/bindep-env/bin/bindep -b -f $PACKAGESFILE || true` rm $PACKAGESFILE -if grep "^CentOS release 6" /etc/redhat-release ; then - # --downloadonly is provided by the yum-plugin-downloadonly package on - # CentOS 6.x - CENTOS6=1 - yum install -y yum-plugin-downloadonly -else - CENTOS6=0 -fi - if [ -f /usr/bin/apt-get ] ; then # --ignore-missing conflicts with set -e, so force it to be ok apt-get -y --ignore-missing -d install $PACKAGELIST || true else - if [ $CENTOS6 -eq 1 ] ; then - # some packages may depend on python-setuptools, which is not - # installed and cannot be reinstalled on CentOS 6.x once yum - # has erased them, so use --skip-broken to avoid aborting; also - # on this platform --downloadonly causes yum to return nonzero - # even when it succeeds, so ignore its exit code - yum install -y --downloadonly --skip-broken $PACKAGELIST || true - else - yum install -y --downloadonly $PACKAGELIST - fi + yum install -y --downloadonly $PACKAGELIST fi diff --git a/nodepool/elements/cache-devstack/install.d/50-download-pkgs b/nodepool/elements/cache-devstack/install.d/50-download-pkgs index c20074047f..0f0367fe99 100755 --- a/nodepool/elements/cache-devstack/install.d/50-download-pkgs +++ b/nodepool/elements/cache-devstack/install.d/50-download-pkgs @@ -27,31 +27,13 @@ if [[ ${YUM:-yum} == "dnf" ]]; then exit 0 fi -if grep "^CentOS release 6" /etc/redhat-release ; then - # --downloadonly is provided by the yum-plugin-downloadonly package on - # CentOS 6.x - CENTOS6=1 - yum install -y yum-plugin-downloadonly -else - CENTOS6=0 -fi - while read line ; do if [ -f /usr/bin/apt-get ] ; then # --ignore-missing conflicts with set -e, so force it to be ok apt-get -y --ignore-missing -d install $line || true else - if [ $CENTOS6 -eq 1 ] ; then - # some packages may depend on python-setuptools, which is not - # installed and cannot be reinstalled on CentOS 6.x once yum - # has erased them, so use --skip-broken to avoid aborting; also - # on this platform --downloadonly causes yum to return nonzero - # even when it succeeds, so ignore its exit code - yum install -y --downloadonly --skip-broken $line || true - else - yum install -y --downloadonly $line - fi + yum install -y --downloadonly $line fi done < /tmp/pkgs-to-install diff --git a/nodepool/scripts/prepare_node.sh b/nodepool/scripts/prepare_node.sh index 46892a2245..4d2b41a8da 100755 --- a/nodepool/scripts/prepare_node.sh +++ b/nodepool/scripts/prepare_node.sh @@ -31,19 +31,7 @@ fi echo $HOSTNAME > /tmp/image-hostname.txt sudo mv /tmp/image-hostname.txt /etc/image-hostname.txt -# HP Cloud centos6 images currently require an update to the -# certificates file before they can connect to common services such as -# fedora mirror for EPEL over https -if [ -f /etc/redhat-release ]; then - if grep -q 'CentOS release 6' /etc/redhat-release; then - # chicken-and-egg ... hp cloud image has EPEL installed, but - # we can't connect to it... - # Note 'epel*' will match 0 or more repositories named epel, - # so it will work regardless of whether epel is actually - # installed. - sudo yum --disablerepo=epel* update -y ca-certificates - fi -else +if [ ! -f /etc/redhat-release ]; then # Cloud provider apt repos break us - so stop using them LSBDISTID=$(lsb_release -is) LSBDISTCODENAME=$(lsb_release -cs)