49 | | Since most of our !FlowVisor instances are managed by FOAM, when we upgrade !FlowVisor, we typically just test FOAM to make sure that everything still works as expected. |
| 49 | Here are some before-and-after tests you can do when you upgrade FlowVisor, to confirm that your state hasn't changed unexpectedly. |
| 50 | |
| 51 | First, get a "before" dump of the flowspace and slice info: |
| 52 | |
| 53 | {{{ |
| 54 | cd |
| 55 | rm -rf ~/tmp/flowvisor-upgrade |
| 56 | mkdir -p ~/tmp/flowvisor-upgrade/before |
| 57 | cd ~/tmp/flowvisor-upgrade/before |
| 58 | |
| 59 | fvctl --passwd-file=/etc/flowvisor.passwd dumpConfig config.json |
| 60 | fvctl --passwd-file=/etc/flowvisor.passwd listFlowSpace | sed -re 's/id=\[[0-9\-]+\]/[id number stripped]/' > flowspace |
| 61 | for slice in $(fvctl --passwd-file=/etc/flowvisor.passwd listSlices | awk '{print $3}' | sort); do echo "Info for slice: $slice" ; fvctl --passwd-file=/etc/flowvisor.passwd getSliceInfo $slice | egrep -v ^connection_[0-9]+= | sort ; done > sliceinfo |
| 62 | }}} |
| 63 | |
| 64 | Next do the upgrade, as usual. |
| 65 | |
| 66 | Then, get an "after" dump of the flowspace and slice info: |
| 67 | |
| 68 | {{{ |
| 69 | cd |
| 70 | rm -rf ~/tmp/flowvisor-upgrade/after |
| 71 | mkdir -p ~/tmp/flowvisor-upgrade/after |
| 72 | cd ~/tmp/flowvisor-upgrade/after |
| 73 | |
| 74 | fvctl --passwd-file=/etc/flowvisor.passwd dumpConfig config.json |
| 75 | fvctl --passwd-file=/etc/flowvisor.passwd listFlowSpace | sed -re 's/id=\[[0-9\-]+\]/[id number stripped]/' > flowspace |
| 76 | for slice in $(fvctl --passwd-file=/etc/flowvisor.passwd listSlices | awk '{print $3}' | sort); do echo "Info for slice: $slice" ; fvctl --passwd-file=/etc/flowvisor.passwd getSliceInfo $slice | egrep -v ^connection_[0-9]+= | sort ; done > sliceinfo |
| 77 | }}} |
| 78 | |
| 79 | Finally, diff the results against the "before" results: |
| 80 | |
| 81 | {{{ |
| 82 | cd ~/tmp/flowvisor-upgrade/before |
| 83 | for file in * ; do diff -u $file ../after/$file ; done |
| 84 | }}} |
| 85 | |
| 86 | If that all looks good, a good way to test that things are working properly is to do some FOAM operations (create or delete or approve or disable some slivers) on the FOAM server that manages that !FlowVisor. |