| ... | ... |
@@ -466,6 +466,13 @@ function is_arch {
|
| 466 | 466 |
[[ "$(uname -m)" == "$1" ]] |
| 467 | 467 |
} |
| 468 | 468 |
|
| 469 |
+# Quick check for a rackspace host; n.b. rackspace provided images |
|
| 470 |
+# have these Xen tools installed but a custom image may not. |
|
| 471 |
+function is_rackspace {
|
|
| 472 |
+ [ -f /usr/bin/xenstore-ls ] && \ |
|
| 473 |
+ sudo /usr/bin/xenstore-ls vm-data | grep -q "Rackspace" |
|
| 474 |
+} |
|
| 475 |
+ |
|
| 469 | 476 |
# Determine if current distribution is a Fedora-based distribution |
| 470 | 477 |
# (Fedora, RHEL, CentOS, etc). |
| 471 | 478 |
# is_fedora |
| ... | ... |
@@ -216,6 +216,14 @@ if is_ubuntu; then |
| 216 | 216 |
echo 'APT::Acquire::Retries "20";' | sudo tee /etc/apt/apt.conf.d/80retry |
| 217 | 217 |
fi |
| 218 | 218 |
|
| 219 |
+# upstream Rackspace centos7 images have an issue where cloud-init is |
|
| 220 |
+# installed via pip because there were not official packages when the |
|
| 221 |
+# image was created (fix in the works). Remove all pip packages |
|
| 222 |
+# before we do anything else |
|
| 223 |
+if [[ $DISTRO = "rhel7" && is_rackspace ]]; then |
|
| 224 |
+ (sudo pip freeze | xargs sudo pip uninstall -y) || true |
|
| 225 |
+fi |
|
| 226 |
+ |
|
| 219 | 227 |
# Some distros need to add repos beyond the defaults provided by the vendor |
| 220 | 228 |
# to pick up required packages. |
| 221 | 229 |
|