XtremIO Process Restart Script (Process - Restart - Py)
XtremIO Process Restart Script (Process - Restart - Py)
py)
This document is purely for development and testing reference, it is not to be used as a guarantee the script has been tested
Check the 'Scripts publish location' section within XtremIO Support Scripts page for scripts that have been officially published
Background
Purpose
Support
Utilisation
Basic use (for field usage)
Restart SYM
Restart PM
Expert use (for L3 only)
Restart gateway
Restart xenv
Enable/check clustering
Restart survivor
Restart sshd (ssh deamon)
Disabling/enabling and checking idle destage
Background
In certain scenarios iit is necessary to manually restart certain XtremIO processes.
This manual action requires privileged access to the storage controllers (root) and can be harmful to the storage stability if performed incorrectly
and/or when the cluster overall health status does not allow it.
To prevent the above, the signed script called process_restart has been implemented in order to perform said actions safely.
Purpose
The script is capable to safely restart the following processes:
SYM
PM
Xenv
gateway
survivor
clustering (enable/check)
sshd
idle destage (enable/disable/check)
Support
The script supports the following XtremIO versions:
Utilisation
1. Using the xmsupload user and SFTP, upload the process_restart script to the XMS under /images/scripts.
2. Log in to the xms as xmsadmin and to the xmcli as tech user
Restart SYM
1. Obtain the cluster-id from the xmcli command show-clusters(cluster-id is a mandatory even if only one cluster is being
managed by XMS )
2. Run the following xmcli command, using the details obtained on step 1 , run-script script="process_restart_v1.4-s4.0.0.
py " arguments="--cluster-id [cluster-id] --restart-sym"
The example show restarting SYM with waiting checking for lazy load status
xmcli (tech)> run-script script="process_restart-v1.4-s4.0.0.py"
arguments="--cluster-id=4 --restart-sym --no_lazy_load_wait"
13:56:39 - 2017-10-22 13:56:38,616 INFO Cluster 4(xbrick665) is healthy -
PSNT XIO00154604176
13:56:44 - 2017-10-22 13:56:42,085 INFO Successfully authenticated user
tech with technician permission
13:56:44 - 2017-10-22 13:56:42,086 INFO Script Version is 1.4
13:56:44 - 2017-10-22 13:56:42,086 INFO Cluster xbrick665 version 6.0.1-
13_X2 was found
13:56:44 - 2017-10-22 13:56:42,086 INFO Found lock file with pid - 16441
13:56:44 - 2017-10-22 13:56:42,086 INFO pid 16441 is not running -
updating lock file with current pid
13:56:44 - 2017-10-22 13:56:42,086 INFO Created lock file with pid - 16984
13:56:59 - 2017-10-22 13:56:55,646 INFO Traffic will be forwarded through
10.82.75.71
13:56:59 - 2017-10-22 13:56:57,297 INFO MetaData Load Prefetch is running
13:57:04 - 2017-10-22 13:57:01,568 INFO 10.82.75.71 - cat /xtremapp/debuc
/127.0.0.1\:33336/clst_sym_elect/clst_sym_elect | grep \" state \-\"
13:57:04 - 2017-10-22 13:57:03,482 INFO 10.82.75.73 - cat /xtremapp/debuc
/127.0.0.1\:33336/clst_sym_elect/clst_sym_elect | grep \" state \-\"
13:57:10 - 2017-10-22 13:57:05,393 INFO 10.82.75.71 clustering status is 5
13:57:10 - 2017-10-22 13:57:05,393 INFO 10.82.75.73 clustering status is 2
13:57:15 - 2017-10-22 13:57:11,104 INFO (10.82.75.71:22)Found SYM pid
38748 - started at Tue Oct 10 17:51:12 2017
13:57:15 - 2017-10-22 13:57:11,104 INFO (10.82.75.71:22)Killing SYM
process 38748 on 10.82.75.71:22
13:57:40 - 2017-10-22 13:57:35,903 INFO New SYM started - 10970 on
10.82.75.71:22
13:57:40 - 2017-10-22 13:57:37,361 INFO Sleeping for 30 seconds before
checking logs
13:58:15 - 2017-10-22 13:58:13,243 INFO Found SYM restart completed in SYM
log - 2017-10-22 13:57:19.349370
Script exited with status: 0
Restart PM
1. Obtain the cluster-id from the xmcli command show-clusters(cluster-id is a mandatory even if only one cluster is being
managed by XMS )
2. Obtain the sc-id from the xmcli command show-storage-controllers(sc-id is mandatory) of the storage controller that needs its
PM restarted
3. Run the following xmcli command, using the details obtained on step 1 and 2, run-script script="process_restart-v1.4-s4.
0.0.py" arguments="cluster-id=[cluster-id] --restart-pm --sc-id=[sc-id]"
on cluster-id 2
xmcli (tech)> run-script script="process_restart-v1.4-s4.0.0.py"
arguments="--cluster-id=2 --restart-pm --sc-id=1"
07:49:21 - 2017-10-23 07:49:16,788 INFO Cluster 2(xbrick68) is healthy -
PSNT XIO00150200936
07:49:21 - 2017-10-23 07:49:20,600 INFO Successfully authenticated user
tech with technician permission
07:49:26 - 2017-10-23 07:49:20,600 INFO Script Version is 1.4
07:49:26 - 2017-10-23 07:49:20,600 INFO Cluster xbrick68 version 4.0.25-27
was found
07:49:26 - 2017-10-23 07:49:20,601 INFO Found lock file with pid - 10579
07:49:26 - 2017-10-23 07:49:20,601 INFO pid 10579 is not running -
updating lock file with current pid
07:49:26 - 2017-10-23 07:49:20,601 INFO Created lock file with pid - 15604
07:49:41 - 2017-10-23 07:49:37,119 INFO Traffic will be forwarded through
10.82.84.37
07:49:41 - 2017-10-23 07:49:37,261 INFO Executing command on X1 - SC1
using 10.82.84.37:22000
07:49:41 - 2017-10-23 07:49:38,905 INFO MetaData load Prefetch is not
running
07:49:46 - 2017-10-23 07:49:44,655 INFO (X1-SC1-IB1)Found PM pid 44863 -
started at Sun Oct 22 15:47:40 2017
07:49:51 - 2017-10-23 07:49:44,656 INFO (X1-SC1-IB1)Killing PM process
44863 on 10.82.84.37:22000
07:50:12 - 2017-10-23 07:50:07,201 INFO New PM started - 98817 on
10.82.84.37:22000
07:50:12 - 2017-10-23 07:50:09,219 INFO Sleeping for 15 seconds before
checking logs
07:50:42 - 2017-10-23 07:50:39,352 INFO Found PM restart completed in SYM
log - 2017-10-23 07:49:57.421545
Restart gateway
1. Obtain the cluster-id from the xmcli command show-clusters(cluster-id is a mandatory even if only one cluster is being
managed by XMS )
2. Obtain the sc-id from the xmcli command show-storage-controllers(sc-id is mandatory) of the storage controller that needs its
gateway restarted
3. Run the following xmcli command, using the details obtained on step 1 and 2, run-script script="process_restart-v1.4-s4.
0.0.py" arguments="cluster-id=[cluster-id] --restart-gw --sc-id=[sc-id]"
Restart xenv
1. Obtain the cluster-id from the xmcli command show-clusters(cluster-id is a mandatory even if only one cluster is being
managed by XMS )
2. Obtain the CSID from the xmcli command show-xenvs of the Xenv that should be restarted
3. Obtain the sc-id from the xmcli command show-storage-controllers(sc-id is mandatory) of the storage controller that needs its
xenv restarted (mandatory to cross-check CSID against sc-id)
4. Run the following xmcli command, using the details obtained on step 1, 2 and 3, run-script script="process_restart-v1.4-
s4.0.0.py" arguments="cluster-id=[cluster-id] --restart-xenv [CSID] --sc-id=[sc-id]"
Enable/check clustering
1. Obtain the cluster-id from the xmcli command show-clusters(cluster-id is a mandatory even if only one cluster is being
managed by XMS )
2. Obtain the sc-id from the xmcli command show-storage-controllers(sc-id is mandatory) of the storage controller on X1 Brick
Run the following xmcli command, to enable clustering, using the details obtained on step 1 and 2, run-script script="
process_restart-v1.4-s4.0.0.py" arguments="cluster-id=[cluster-id] --clustering enable --sc-id=
[sc-id]"
Run the following xmcli command, to check clustering status, using the details obtained on step 1 and 2, run-script script="
process_restart-v1.4-s4.0.0.py" arguments="cluster-id=[cluster-id] --clustering check --sc-id=
[sc-id]"
Restart survivor
1. Obtain the cluster-id from the xmcli command show-clusters(cluster-id is a mandatory even if only one cluster is being
managed by XMS )
2. Obtain the sc-id from the xmcli command show-storage-controllers(sc-id is mandatory) of the storage controller that needs its
gateway restarted
3. Run the following xmcli command, using the details obtained on step 1 and 2, run-script script="process_restart-v1.4-s4.
0.0.py" arguments="cluster-id=[cluster-id] --restart-survivor --sc-id=[sc-id]"
1. Obtain the cluster-id from the xmcli command show-clusters(cluster-id is a mandatory even if only one cluster is being
managed by XMS )
Run the following xmcli command to enable idle destage, using the details obtained on step 1 and 2, run-script script="
process_restart-v1.4-s4.0.0.py" arguments="cluster-id=[cluster-id] --idle-destage enable"
Run the following xmcli command to enable idle destage, using the details obtained on step 1 and 2, run-script script="
process_restart-v1.4-s4.0.0.py" arguments="cluster-id=[cluster-id] --idle-destage disable"
Run the following xmcli command to check idle destage status, using the details obtained on step 1 and 2, run-script
script="process_restart-v1.4-s4.0.0.py" arguments="cluster-id=[cluster-id] --idle-destage
check"