Rhino ships with a pair of scripts for managing nodes and SLEE state. Rhino.sh controls the startup and shutdown of nodes on a host. Slee.sh controls the state of the SLEE in a cluster.

The scripts contain logic to detect the nodes running on a host, but it is recommended to set the RHINO_SLEE_NODES and RHINO_QUORUM_NODES variables explicitly (this is typically done in $RHINO_BASE/rhino.env).

rhino.sh

The rhino.sh script is used to start and stop Rhino nodes on a host. It can be used to manage individual nodes or all the nodes on the local host.

If starting a cluster for the first time (i.e. where no previous cluster state exists) and the 'make primary' option to create-node.sh was not specified for one of the nodes, then the cluster must be manually made primary (by using the make-primary.sh script in a node directory).

Warning

Do not add the '-p' start argument to the rhino.sh script, it will result in nodes failing to start correctly.

Usage

The rhino.sh script takes a command and an optional list of nodes to act on. rhino.sh start|stop|kill|status|restart [-nodes node1,node2,…​] The command may be:

Argument Description
start

Start Rhino nodes into operational state

stop

Shutdown Rhino nodes, first stopping the SLEE if needed

kill

Forcibly terminate Rhino nodes

status

get the status of the nodes installed on this host system

restart

Forcibly restart Rhino nodes regardless of SLEE state

Starting all local nodes

$ ./rhino.sh start
Rhino node 101 startup initiated with 0s delay
Rhino node 102 startup initiated with 30s delay
Rhino node 105 startup initiated with 60s delay

Starting a subset of the local nodes

$ ./rhino.sh start -nodes 101,105
Rhino node 101 startup initiated with 0s delay
Rhino node 105 startup initiated with 30s delay

Shutting down all local nodes

$ ./rhino.sh stop
Stopping Rhino nodes 101,102,105
Executing "rhino-console stop -ifneeded -nodes 101,102"
Stopping SLEE on node(s) [101,102]
SLEE transitioned to the Stopping state on node 101
SLEE transitioned to the Stopping state on node 102
Waiting for SLEE to enter the Stopped state on node(s) 101,102
Executing "rhino-console waitonstate stopped -nodes 101,102"
SLEE is in the Stopped state on node(s) [101,102]
Nodes to shut down: 105 101 102
Executing "rhino-console shutdown -nodes 105"
Shutting down node(s) [101] (using Rhino's default shutdown timeout)
Shutdown successful
Executing "rhino-console shutdown -nodes 101"
Shutting down node(s) [101] (using Rhino's default shutdown timeout)
Shutdown successful
Executing "rhino-console shutdown -nodes 102"
Shutting down node(s) [101] (using Rhino's default shutdown timeout)
Shutdown successful

Shutting down a single node

$ ./rhino.sh stop -nodes 101
Stopping Rhino nodes 101,102,105
Executing "rhino-console stop -ifneeded -nodes 101"
Stopping SLEE on node(s) [101]
SLEE transitioned to the Stopping state on node 101
Waiting for SLEE to enter the Stopped state on node(s) 101
Executing "rhino-console waitonstate stopped -nodes 101"
SLEE is in the Stopped state on node(s) [101]
Nodes to shut down: 101
Executing "rhino-console shutdown -nodes 101"
Shutting down node(s) [101] (using Rhino's default shutdown timeout)
Shutdown successful

Forcibly stopping a node

$ ./rhino.sh kill -nodes 201
Killing node 201 process id 5770
Killing node 201 startup script process id 4763

Forcibly restarting nodes

$ ./rhino.sh restart
Killing node 201 startup script process id 12547
Killing node 201 process id 13568
Killing node 202 startup script process id 12549
Killing node 202 process id 13794

Getting the status of the local nodes

$ ./rhino.sh status
Rhino node 101: found process with id 3660
Rhino node 102: no process found, waiting to start
Rhino node 105: no process found

slee.sh

The slee.sh script is used to control SLEE state for a cluster. It can be used to manage individual nodes or the whole cluster.

Usage

The slee.sh script takes a command and an optional list of nodes to act on. slee.sh start|stop|reboot|shutdown|state [-ifneeded] {-local | -cluster | -nodes node1,node2,…​} -states {running|r|stopped|s},…​ The command may be:

Command Description
start

Start the SLEE

stop

Stop the SLEE

reboot

Shutdown and restart nodes cleanly

shutdown

Shutdown nodes

state

Get the SLEE state

The start, stop, reboot and shutdown commands take an argument specifying which nodes to act on. That argument can be

Argument Description
-local

Only change the state of the nodes on this host

-cluster

Change the state on the entire cluster

-nodes node1,node2…​

Change the state of the listed nodes

The reboot command also takes an argument specifing the states the nodes should be rebooted to. That argument can be a single value to apply to all nodes or a list of one state per node. The states are: running (r) and stopped (s)

Argument Description
-states

The state to restart the nodes to. Can be one of running (r) or stopped (s) Specify either once or for each node separated with commas

Starting the SLEE on all local nodes

$ slee.sh start -local
Node 101 is Running
Node 102 is Stopped

Stopping the SLEE on all nodes in the cluster

$ ./slee.sh stop -cluster
Executing "rhino-console stop -ifneeded"
Stopping SLEE on node(s) [101,102,103]
SLEE transitioned to the Stopping state on node 101
SLEE transitioned to the Stopping state on node 102
SLEE transitioned to the Stopping state on node 103
Waiting for SLEE to enter the Stopped state
Executing "rhino-console waitonstate stopped"
SLEE is in the Stopped state

Rebooting node 101 and 102 to Running and Stopped respectively

$ ./slee.sh reboot -nodes 101,102 -states r,s
Stopping Rhino nodes 101,102
Executing "rhino-console stop -ifneeded -nodes 101,102"
SLEE is not running on specified nodes
Waiting for SLEE to enter the Stopped state on node(s) 101,102
Executing "rhino-console waitonstate stopped -nodes 101,102"
SLEE is in the Stopped state on node(s) [101,102]
Nodes to reboot: 101,102 into state r,s
Executing "rhino-console reboot -nodes 101,102 -states r,s"
Restarting node(s) [101,102] (using Rhino's default shutdown timeout)
Restarting

Getting the SLEE state

$ slee.sh state
Node 101 is Running
Node 102 is Stopped

Node 101 is running and ready to process traffic Node 102 is stopped and must be started before it will accept traffic

Previous page Next page