Changeset 10634 in genesis


Ignore:
Timestamp:
May 1, 2012, 12:38:57 PM (13 years ago)
Author:
rick
Message:

Let's see if we can reboot all lvrouted clients at ones, to load new -z flag settings.

Related-To: beheer#196

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/batch-cmd

    r10632 r10634  
    3636## View lvrouted configured flages
    3737##
     38#cat <<'EOF' > /tmp/command
    3839#/usr/local/etc/rc.d/lvrouted rcvar | grep flags
     40#EOF
    3941
     42##
     43## Restart lvrouted
     44##
     45cat <<'EOF' > /tmp/command
     46sleep 30
     47nohup /usr/local/etc/rc.d/lvrouted restart
     48EOF
     49
     50##
     51## Sync lvrouted and wl-config files
     52##
     53#cat <<'EOF' > /tmp/command
     54#mount -uwo noatime / || exit 1
     55#trap "mount -ur /; exit 1" 1 2 3 15
     56#trap "mount -ur /; exit 0" 0
    4057#
    41 # Sync lvrouted and wl-config files
     58#cp -v /tmp/wl-config /tools || exit 1
     59#cp -v /tmp/lvrouted.in /usr/local/etc/rc.d/lvrouted || exit 1
     60#cp -v /tmp/lvrouted.in /conf/base/etc/local/rc.d/lvrouted || exit 1
    4261#
    43 cat <<'EOF' > /tmp/command
    44 mount -uwo noatime / || exit 1
    45 trap "mount -ur /; exit 1" 1 2 3 15
    46 trap "mount -ur /; exit 0" 0
     62#/usr/local/etc/rc.d/lvrouted rcvar
     63#EOF
    4764
    48 cp -v /tmp/wl-config /tools || exit 1
    49 cp -v /tmp/lvrouted.in /usr/local/etc/rc.d/lvrouted || exit 1
    50 cp -v /tmp/lvrouted.in /conf/base/etc/local/rc.d/lvrouted || exit 1
    51 EOF
     65##
     66## Run /tools/wl-config with random scheduler to avoid gold-rush and killing the
     67## config generator server
     68##
     69#cat <<'EOF' > /tmp/command
     70##sleep `expr $$ % 120`
     71#/tools/wl-config -b
     72#EOF
    5273
    5374
     
    5677
    5778for HOST in $HOSTS; do
     79  echo "# Working on $HOST"
    5880  stdout_file="$PREFIX-${HOST%%.}.txt"
    5981  stderr_file="stderr-${HOST%%.}.txt"
     
    6183  : > $stderr_file
    6284  {
    63     scp -o ConnectTimeout=3 -o BatchMode=yes /tmp/wl-config /tmp/lvrouted.in root@$HOST:/tmp
     85    #scp -o ConnectTimeout=3 -o BatchMode=yes /tmp/wl-config /tmp/lvrouted.in root@$HOST:/tmp || exit 1
    6486    cat /tmp/command | ssh -o ConnectTimeout=3 -o BatchMode=yes root@$HOST 'cat >/tmp/command && sh /tmp/command'
    6587  } 1>$stdout_file 2>$stderr_file &
Note: See TracChangeset for help on using the changeset viewer.