hive            Code |FrontPage |HiveTraits

Hive-case3

   You want to clean up all the watchers currently deployed and reinit the system but do not want the channels configuration to be lost.

Storing the location of all machines.

go to the #hive channel and type this.
  !$keeper:snapshot *
The above will take a snapshot of all machines in the current channels. If you want to
see the current status, you can do
  !$keeper:status *

with out the '*' it will do snapshot and status of current channel.

Deleting all the state files and restarting.

    |cat cleanup.seq
!do $sys:rm[$me:session[basedir]/*.yaml
!do $me:restart

Getting the machines back to the channels

after all the machines have joined back go to the #hive channel and type this.
  !$keeper:status

This will tell you if there are any more machines yet to join back in #hive. If you get no 'out' messages,
then you can do this.

  !$keeper:ensure *


The above will get all the machines back to their original channels.

Wraping it up.

  1. Take a snapshot of the current status
  2.   !$keeper:snapshot *

  3. Delete statefiles and restat

  4.     |cat cleanup.seq
    !do $sys:rm[$me:session[basedir]/*.yaml
    !do $me:restart

  5. Get the machines back to the previous channels
  6. Make sure every machine has joined back in #hive after restart.
      !$keeper:status

    After you get all 'in', in #hive
      !$keeper:ensure *