From fc951f3a2ee84c0401c08b61cbbc50e07787649c Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 27 Mar 2015 12:07:43 +1100 Subject: [PATCH] Apply F20 gruby work-around only on RAX The issue with F20 grubby killing the extlinux.conf file is specific to RAX, because they ship a different file. So apply this only when on RAX because it is causing issues elsewhere. This is not needed long-term. We are close to removing f20 nodes anyway with just a few jobs, all of which can be converted to centos. All changes to do this are in-flight, see the dependency chain from [1]. At that point all this goes away anyway. [1] https://review.openstack.org/167443 Change-Id: Ibb5a455d690aa1298c2f625da20e606914bf632a --- install_puppet.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/install_puppet.sh b/install_puppet.sh index f94f85ec12..718227bdd2 100755 --- a/install_puppet.sh +++ b/install_puppet.sh @@ -48,19 +48,29 @@ function is_opensuse { cat /etc/os-release | grep -q -e "openSUSE" } +function is_rackspace { + if [ ! -f /usr/bin/xenstore-ls ]; then + return 1 + fi + + /usr/bin/xenstore-ls vm-data | grep -q "Rackspace" +} + # # Distro specific puppet installs # function setup_puppet_fedora { - # grubby on f20 can eat the "default" line of extlinux.conf when - # updating the kernel and create an unbootable system. There is - # an unresolved bug [1], but just install the latest -- which - # seems to get around this -- before we update. + # grubby on the rax f20 images can eat the "default" line of + # extlinux.conf when updating the kernel and create an unbootable + # system. There is an unresolved bug [1], but just install the + # latest -- which seems to get around this -- before we update. # [1] https://bugzilla.redhat.com/show_bug.cgi?id=964178 if grep -q 'Fedora release 20' /etc/redhat-release; then - sudo yum install -y fedora-release-rawhide - sudo yum install -y grubby --enablerepo rawhide + if is_rackspace; then + sudo yum install -y fedora-release-rawhide + sudo yum install -y grubby --enablerepo rawhide + fi fi yum update -y