Merge "Work around pip installed pkgs on Rackspace image"
This commit is contained in:
commit
5e4a42db0e
|
@ -466,6 +466,13 @@ function is_arch {
|
|||
[[ "$(uname -m)" == "$1" ]]
|
||||
}
|
||||
|
||||
# Quick check for a rackspace host; n.b. rackspace provided images
|
||||
# have these Xen tools installed but a custom image may not.
|
||||
function is_rackspace {
|
||||
[ -f /usr/bin/xenstore-ls ] && \
|
||||
sudo /usr/bin/xenstore-ls vm-data | grep -q "Rackspace"
|
||||
}
|
||||
|
||||
# Determine if current distribution is a Fedora-based distribution
|
||||
# (Fedora, RHEL, CentOS, etc).
|
||||
# is_fedora
|
||||
|
|
8
stack.sh
8
stack.sh
|
@ -216,6 +216,14 @@ if is_ubuntu; then
|
|||
echo 'APT::Acquire::Retries "20";' | sudo tee /etc/apt/apt.conf.d/80retry
|
||||
fi
|
||||
|
||||
# upstream Rackspace centos7 images have an issue where cloud-init is
|
||||
# installed via pip because there were not official packages when the
|
||||
# image was created (fix in the works). Remove all pip packages
|
||||
# before we do anything else
|
||||
if [[ $DISTRO = "rhel7" && is_rackspace ]]; then
|
||||
(sudo pip freeze | xargs sudo pip uninstall -y) || true
|
||||
fi
|
||||
|
||||
# Some distros need to add repos beyond the defaults provided by the vendor
|
||||
# to pick up required packages.
|
||||
|
||||
|
|
Loading…
Reference in New Issue