Changes between Initial Version and Version 1 of OpenFlow/FOAM/UpgradingTo0.8


Ignore:
Timestamp:
09/25/12 09:09:39 (12 years ago)
Author:
Josh Smift
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenFlow/FOAM/UpgradingTo0.8

    v1 v1  
     1Upgrading to FOAM 0.8 from FOAM 0.6 involves a database conversion; here's an end-to-end procedure for upgrading and testing.
     2
     3Get before state:
     4
     5{{{
     6cd
     7rm -rf ~/tmp/foam-upgrade
     8mkdir -p ~/tmp/foam-upgrade/before
     9cd ~/tmp/foam-upgrade/before
     10
     11foamctl list-slivers --passwd-file=/opt/foam/etc/foampasswd > list-slivers-active.txt
     12foamctl list-slivers --deleted --passwd-file=/opt/foam/etc/foampasswd > list-slivers-deleted.txt
     13
     14egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-active.txt | sort > list-slivers-active-cooked.txt
     15egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-deleted.txt | sort > list-slivers-deleted-cooked.txt
     16}}}
     17
     18Update the apt sources entry to 'deb https://s3.amazonaws.com/bssoftworks/foam-pkg/ lucid/stable/all/'.
     19
     20Make sure it's available:
     21
     22{{{
     23sudo apt-get update
     24apt-cache show foam | grep "^Version"
     25}}}
     26
     27Do what https://openflow.stanford.edu/display/FOAM/0.8+Upgrade+Instructions says:
     28
     29{{{
     30cp /opt/foam/db/foam.db ~/foam.db.bak
     31cp /opt/foam/db/foam.db /tmp/foam.db
     32sudo apt-get install -y --force-yes foam
     33sudo service foam restart
     34sudo service nginx restart
     35foam-db-convert.py | tee ~/foam-db-convert.log
     36}}}
     37
     38At the end of foam-db-convert.py, it'll prompt you for a new admin password. You can use the same thing as you had before (e.g. the one in /opt/foam/etc/foampasswd, if you had it stashed there) -- it's just that it got reset to 'admin' when the new 0.8.x database was created.
     39
     40Note that foam-db-convert.py is importing deleted slivers, so if e.g. experimenters created and deleted slivers in the same '''slice''' repeatedly, you may see a bunch of what looks like duplicates. The '''slice''' URNs may be the same, but the '''sliver''' URNs should be different.
     41
     42Get "after" state:
     43
     44{{{
     45cd
     46rm -rf ~/tmp/foam-upgrade/after
     47mkdir -p ~/tmp/foam-upgrade/after
     48cd ~/tmp/foam-upgrade/after
     49
     50foamctl geni:list-slivers --passwd-file=/opt/foam/etc/foampasswd > list-slivers-active.txt
     51foamctl geni:list-slivers --deleted --passwd-file=/opt/foam/etc/foampasswd > list-slivers-deleted.txt
     52
     53egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-active.txt | sort > list-slivers-active-cooked.txt
     54egrep '(email|desc|slice_urn|sliver_urn)' list-slivers-deleted.txt | sort > list-slivers-deleted-cooked.txt
     55}}}
     56
     57Diff the results:
     58
     59{{{
     60for file in *cooked.txt ; do diff -u ../before/$file $file ; done
     61}}}
     62
     63Check for any other exceptions:
     64
     65{{{
     66grep -i exception /opt/foam/log/foam.log
     67}}}
     68
     69You can also look through ~/foam-db-convert.log if you want to see what all it did, skim for anything unusual, etc. Not essential, if you feel happy.