3 # by default : reboot the boxes involved in testing
4 # with -a : reboot also the build boxes
8 echo "$COMMAND [-abtn]"
9 echo -e " -a\tall boxes, not just the test ones"
10 echo -e " -b\tbuild boxes only"
11 echo -e " -t\tjust clean the trackers"
12 echo -e " -n\tdry-run"
16 build_boxes="mirror $(echo build{1,2,3})"
17 test_boxes="testplc $(echo testqemu{1,2,3} testqemu32-{1,2,3,4,5})"
19 while getopts "abtnh" opt ; do
22 b) BUILD_BOXES_ONLY=true ;;
23 t) TRACKERS_ONLY=true ;;
28 toshift=$(($OPTIND - 1))
32 if [[ -n "$@" ]] ; then
34 elif [ -n "$ALL_BOXES" ] ; then
35 BOXES="$build_boxes $test_boxes"
36 elif [ -n "$BUILD_BOXES_ONLY" ] ; then
39 elif [ -n "$TRACKERS_ONLY" ] ; then
46 if [ -n "$CLEAN_TRACKERS" ] ; then
47 echo '==================== cleaning trackers on testmaster'
48 if [ -n "$DRY_RUN" ] ; then
49 echo DRYRUN: ssh root@testmaster.onelab.eu rm 'tracker*'
51 ssh root@testmaster.onelab.eu rm 'tracker*'
55 function host_detail () {
61 msg=$(host ${box}.onelab.eu | grep alias)
62 echo "==================== rebooting ${box}.onelab.eu ($msg)"
63 command="ssh root@${box}.onelab.eu shutdown -r now"
64 if [ -n "$DRY_RUN" ] ; then