[Gluster-devel] Replacing a host using gdeploy

Sachidananda URS surs at redhat.com
Mon Jun 13 17:35:20 UTC 2016


Hi,

With the replace node operation being very tedious and elaborate process,
it is
easy to commit mistakes. And it is much tedious process to roll back in
case of
mistakes.

This is an effort to automate the entire process, the script
replace_node.sh is
a wrapper script around gdeploy configuration file. It takes three
parameters:
`Existing node name', `new node name', and `volume name'. The script
generates
a configuration file, and calls gdeploy with the configuration file as an
argument. This handles clusters with multiple hosts and just two hosts.

USAGE:

$ ./replace_node.sh NODE-1 NODE-2 VOLUMENAME

*******************************************************************************
Node NODE-2 will be replaced with configuration from NODE-1
It is very important to give the node names right. Review before continuing.
*******************************************************************************

Continue(y/N):


-------------------------

When continued NODE-2 will be added into the cluster and self-heal is
triggered.

Prerequisites:
===========
1. Password less ssh from node-1 to node-2
2. Passwordless ssh from the laptop to node-1, node-2
3. Place the replace_prep.sh under /usr/share/ansible/gdeploy/scripts/

Configuration generation and additional script generation and invocation is
managed by gdeploy.

The step-3 in Prerequisite will be handled in the rpm once the code is
merged
upstream and rpm generated. I'll post on -users list once I build rpms.

I've done some initial tests and things work fine. Any suggestions and
contributions are welcome.

-sac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20160613/4acfff7a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace_node.sh
Type: application/x-sh
Size: 1149 bytes
Desc: not available
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20160613/4acfff7a/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace_node.conf.template
Type: application/octet-stream
Size: 1341 bytes
Desc: not available
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20160613/4acfff7a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace_prep.sh
Type: application/x-sh
Size: 1770 bytes
Desc: not available
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20160613/4acfff7a/attachment-0001.sh>


More information about the Gluster-devel mailing list