Last active
August 29, 2015 14:02
-
-
Save jclulow/668675d94a47b407ac58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/incr-upgrade-scripts/README.md b/incr-upgrade-scripts/README.md | |
index a1d366e..60f052b 100644 | |
--- a/incr-upgrade-scripts/README.md | |
+++ b/incr-upgrade-scripts/README.md | |
@@ -78,7 +78,8 @@ then you cannot run this step until you've added it. | |
cp -r /usbkey/default ./olddefault | |
cp -r /usbkey/scripts ./oldscripts | |
- cp -rP /opt/smartdc/bin ./oldtools | |
+ (cd /opt/smartdc && /usr/bin/tar cvf - bin lib man node_modules | gzip) \ | |
+ > ./oldtools.tar.gz | |
./upgrade-tools.sh 2>&1 | tee tools-$(date +%s).log | |
@@ -230,7 +231,8 @@ To rollback: | |
mv scripts newscripts | |
mv oldscripts scripts | |
- mv tools newtools | |
- mv oldtools tools | |
+ mv tools.tar.gz newtools.tar.gz | |
+ mv oldtools.tar.gz tools.tar.gz | |
./upgrade-tools.sh 2>&1 | tee rollback-tools-$(date +%s).log | |
./upgrade-all.sh rollback-images 2>&1 | tee all-other-zones-rollback-$(date +%s).log | |
diff --git a/incr-upgrade-scripts/upgrade-tools.sh b/incr-upgrade-scripts/upgrade-tools.sh | |
index b4b7e70..5d7680f 100755 | |
--- a/incr-upgrade-scripts/upgrade-tools.sh | |
+++ b/incr-upgrade-scripts/upgrade-tools.sh | |
@@ -62,6 +62,12 @@ rm -rf /mnt/usbkey/scripts /usbkey/scripts | |
cp -Rp scripts /mnt/usbkey/scripts | |
cp -Rp scripts /usbkey/scripts | |
+if [[ -f /usbkey/tools.tar.gz ]]; then | |
+ cp /usbkey/tools.tar.gz pre-upgrade.tools.$(date +%s).tar.gz | |
+fi | |
+cp tools.tar.gz /usbkey/tools.tar.gz | |
+cp tools.tar.gz /mnt/usbkey/tools.tar.gz | |
+ | |
cp default/* /mnt/usbkey/default | |
cp default/* /usbkey/default | |
diff --git a/scripts/headnode.sh b/scripts/headnode.sh | |
index d529d3f..157d51a 100755 | |
--- a/scripts/headnode.sh | |
+++ b/scripts/headnode.sh | |
@@ -402,12 +402,6 @@ function create_zone { | |
existing_uuid=$(vmadm lookup tags.smartdc_role=${zone}) | |
if [[ -n ${existing_uuid} ]]; then | |
- if [[ ${zone} == "sdc" ]]; then | |
- # (Re)create the /opt/smartdc/sdc symlink into the sdc zone: | |
- rm -f /opt/smartdc/sdc || true | |
- mkdir -p /opt/smartdc && | |
- ln -s /zones/${existing_uuid}/root/opt/smartdc/sdc /opt/smartdc/sdc | |
- fi | |
echo "Skipping creation of ${zone} as ${existing_uuid} already has" \ | |
"that role." | |
return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment