| 60 | }}} |
| 61 | |
| 62 | == Upgrading == |
| 63 | |
| 64 | Here are some before-and-after tests you can do when you upgrade FOAM, to confirm that your state hasn't changed unexpectedly. |
| 65 | |
| 66 | Note that if you're upgrading from FOAM 0.6 to 0.8, you'll need to modify the foamctl commands in the "before" section, changing "geni:list-slivers" to "list-slivers". |
| 67 | |
| 68 | On the FOAM server, get a "before" list of slivers, active and deleted: |
| 69 | |
| 70 | {{{ |
| 71 | cd |
| 72 | rm -rf ~/tmp/foam-upgrade |
| 73 | mkdir -p ~/tmp/foam-upgrade/before |
| 74 | cd ~/tmp/foam-upgrade/before |
| 75 | |
| 76 | foamctl geni:list-slivers --passwd-file=/opt/foam/etc/foampasswd > list-slivers-active.txt |
| 77 | foamctl geni:list-slivers --deleted --passwd-file=/opt/foam/etc/foampasswd > list-slivers-deleted.txt |
| 78 | |
| 79 | egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-active.txt | sort > list-slivers-active-cooked.txt |
| 80 | egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-deleted.txt | sort > list-slivers-deleted-cooked.txt |
| 81 | }}} |
| 82 | |
| 83 | If you own any slivers on the server, you can also do a listresources and sliverstatus for a sliver or two. |
| 84 | |
| 85 | Then do the upgrade, as usual. |
| 86 | |
| 87 | On the FOAM server, get an "after" list of slivers, active and deleted: |
| 88 | |
| 89 | {{{ |
| 90 | cd |
| 91 | rm -rf ~/tmp/foam-upgrade/after |
| 92 | mkdir -p ~/tmp/foam-upgrade/after |
| 93 | cd ~/tmp/foam-upgrade/after |
| 94 | |
| 95 | foamctl geni:list-slivers --passwd-file=/opt/foam/etc/foampasswd > list-slivers-active.txt |
| 96 | foamctl geni:list-slivers --deleted --passwd-file=/opt/foam/etc/foampasswd > list-slivers-deleted.txt |
| 97 | |
| 98 | egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-active.txt | sort > list-slivers-active-cooked.txt |
| 99 | egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-deleted.txt | sort > list-slivers-deleted-cooked.txt |
| 100 | }}} |
| 101 | |
| 102 | Diff the results: |
| 103 | |
| 104 | {{{ |
| 105 | for file in *cooked.txt ; do diff -u ../before/$file $file ; done |