Skip to content

Commit

Permalink
extras, tools, doc: remove offensive language
Browse files Browse the repository at this point in the history
Replace master and slave terminology in geo-replication with primary and
secondary respectively.

Change-Id: I3eb9242d2ce8340435265b764d28221d50f872c8
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
  • Loading branch information
itisravi authored and kotreshhr committed Dec 30, 2020
1 parent 53344d8 commit 146b35d
Show file tree
Hide file tree
Showing 16 changed files with 193 additions and 190 deletions.
28 changes: 14 additions & 14 deletions doc/gluster.8
Original file line number Diff line number Diff line change
Expand Up @@ -186,31 +186,31 @@ Display help for volume quota commands
NOTE: valid units of time and their symbols are : hours(h/hr), minutes(m/min), seconds(s/sec), weeks(w/wk), Days(d/days).
.SS "Geo-replication Commands"
.TP
\fI\ Note\fR: password-less ssh, from the master node (where these commands are executed) to the slave node <SLAVE_HOST>, is a prerequisite for the geo-replication commands.
\fI\ Note\fR: password-less ssh, from the primary node (where these commands are executed) to the secondary node <SECONDARY_HOST>, is a prerequisite for the geo-replication commands.
.TP
\fB\ system:: execute gsec_create\fR
Generates pem keys which are required for push-pem
.TP
\fB\ volume geo-replication <MASTER_VOL> <SLAVE_HOST>::<SLAVE_VOL> create [[ssh-port n][[no-verify]|[push-pem]]] [force]\fR
Create a new geo-replication session from <MASTER_VOL> to <SLAVE_HOST> host machine having <SLAVE_VOL>.
Use ssh-port n if custom SSH port is configured in slave nodes.
Use no-verify if the rsa-keys of nodes in master volume is distributed to slave nodes through an external agent.
\fB\ volume geo-replication <PRIMARY_VOL> <SECONDARY_HOST>::<SECONDARY_VOL> create [[ssh-port n][[no-verify]|[push-pem]]] [force]\fR
Create a new geo-replication session from <PRIMARY_VOL> to <SECONDARY_HOST> host machine having <SECONDARY_VOL>.
Use ssh-port n if custom SSH port is configured in secondary nodes.
Use no-verify if the rsa-keys of nodes in primary volume is distributed to secondary nodes through an external agent.
Use push-pem to push the keys automatically.
.TP
\fB\ volume geo-replication <MASTER_VOL> <SLAVE_HOST>::<SLAVE_VOL> {start|stop} [force] \fR
Start/stop the geo-replication session from <MASTER_VOL> to <SLAVE_HOST> host machine having <SLAVE_VOL>.
\fB\ volume geo-replication <PRIMARY_VOL> <SECONDARY_HOST>::<SECONDARY_VOL> {start|stop} [force] \fR
Start/stop the geo-replication session from <PRIMARY_VOL> to <SECONDARY_HOST> host machine having <SECONDARY_VOL>.
.TP
\fB\ volume geo-replication [<MASTER_VOL> [<SLAVE_HOST>::<SLAVE_VOL>]] status [detail] \fR
Query status of the geo-replication session from <MASTER_VOL> to <SLAVE_HOST> host machine having <SLAVE_VOL>.
\fB\ volume geo-replication [<PRIMARY_VOL> [<SECONDARY_HOST>::<SECONDARY_VOL>]] status [detail] \fR
Query status of the geo-replication session from <PRIMARY_VOL> to <SECONDARY_HOST> host machine having <SECONDARY_VOL>.
.TP
\fB\ volume geo-replication <MASTER_VOL> <SLAVE_HOST>::<SLAVE_VOL> {pause|resume} [force] \fR
Pause/resume the geo-replication session from <MASTER_VOL> to <SLAVE_HOST> host machine having <SLAVE_VOL>.
\fB\ volume geo-replication <PRIMARY_VOL> <SECONDARY_HOST>::<SECONDARY_VOL> {pause|resume} [force] \fR
Pause/resume the geo-replication session from <PRIMARY_VOL> to <SECONDARY_HOST> host machine having <SECONDARY_VOL>.
.TP
\fB\ volume geo-replication <MASTER_VOL> <SLAVE_HOST>::<SLAVE_VOL> delete [reset-sync-time]\fR
Delete the geo-replication session from <MASTER_VOL> to <SLAVE_HOST> host machine having <SLAVE_VOL>.
\fB\ volume geo-replication <PRIMARY_VOL> <SECONDARY_HOST>::<SECONDARY_VOL> delete [reset-sync-time]\fR
Delete the geo-replication session from <PRIMARY_VOL> to <SECONDARY_HOST> host machine having <SECONDARY_VOL>.
Optionally you can also reset the sync time in case you need to resync the entire volume on session recreate.
.TP
\fB\ volume geo-replication <MASTER_VOL> <SLAVE_HOST>::<SLAVE_VOL> config [[!]<options> [<value>]] \fR
\fB\ volume geo-replication <PRIMARY_VOL> <SECONDARY_HOST>::<SECONDARY_VOL> config [[!]<options> [<value>]] \fR
View (when no option provided) or set configuration for this geo-replication session.
Use "!<OPTION>" to reset option <OPTION> to default value.
.SS "Bitrot Commands"
Expand Down
1 change: 1 addition & 0 deletions extras/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DisableFormat: true
2 changes: 1 addition & 1 deletion extras/cliutils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Example use cases:
config based on version.
- Copy a file present in GLUSTERD_WORKDIR from one peer node to all
other peer nodes.(Geo-replication create push-pem is using this to
distribute the SSH public keys from all master nodes to all slave
distribute the SSH public keys from all primary nodes to all secondary
nodes)
- Generate pem keys in all peer nodes and collect all the public keys
to one place(Geo-replication gsec_create is doing this)
Expand Down
4 changes: 2 additions & 2 deletions extras/command-completion/gluster.bash
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ GLUSTER_GEO_REPLICATION_SUBOPTIONS="
"
GLUSTER_GEO_REPLICATION_OPTIONS="
{__VOLNAME [
{__SLAVEURL [
{__SECONDARYURL [
{create [
{push-pem
{force}
Expand Down Expand Up @@ -224,7 +224,7 @@ __SIZE ()
return 0
}

__SLAVEURL ()
__SECONDARYURL ()
{
return 0
}
Expand Down
4 changes: 2 additions & 2 deletions extras/geo-rep/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scriptsdir = $(libexecdir)/glusterfs/scripts
scripts_SCRIPTS = gsync-upgrade.sh generate-gfid-file.sh get-gfid.sh \
slave-upgrade.sh schedule_georep.py
secondary-upgrade.sh schedule_georep.py

scripts_PROGRAMS = gsync-sync-gfid
gsync_sync_gfid_CFLAGS = $(GF_CFLAGS) -Wall -I$(top_srcdir)/libglusterfs/src
Expand All @@ -11,6 +11,6 @@ gsync_sync_gfid_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src

EXTRA_DIST = gsync-sync-gfid.c gsync-upgrade.sh generate-gfid-file.sh \
get-gfid.sh slave-upgrade.sh schedule_georep.py.in
get-gfid.sh secondary-upgrade.sh schedule_georep.py.in

CLEANFILES = schedule_georep.py
12 changes: 6 additions & 6 deletions extras/geo-rep/generate-gfid-file.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#Usage: generate-gfid-file.sh <master-volfile-server:master-volume> <path-to-get-gfid.sh> <output-file> [dirs-list-file]
#Usage: generate-gfid-file.sh <primary-volfile-server:primary-volume> <path-to-get-gfid.sh> <output-file> [dirs-list-file]

function get_gfids()
{
Expand All @@ -25,7 +25,7 @@ function mount_client()

i=$(stat -c '%i' $T);

[ "x$i" = "x1" ] || fatal "could not mount volume $MASTER on $T";
[ "x$i" = "x1" ] || fatal "could not mount volume $PRIMARY on $T";

cd $T;
rm -f $OUTPUT;
Expand All @@ -43,20 +43,20 @@ function mount_client()

cd -;

umount $T || fatal "could not umount $MASTER from $T";
umount $T || fatal "could not umount $PRIMARY from $T";

rmdir $T || warn "rmdir of $T failed";
}


function main()
{
SLAVE=$1
SECONDARY=$1
GET_GFID_CMD=$2
OUTPUT=$3

VOLFILE_SERVER=`echo $SLAVE | sed -e 's/\(.*\):.*/\1/'`
VOLUME_NAME=`echo $SLAVE | sed -e 's/.*:\(.*\)/\1/'`
VOLFILE_SERVER=`echo $SECONDARY | sed -e 's/\(.*\):.*/\1/'`
VOLUME_NAME=`echo $SECONDARY | sed -e 's/.*:\(.*\)/\1/'`

if [ "$#" -lt 4 ]
then
Expand Down
16 changes: 8 additions & 8 deletions extras/geo-rep/gsync-sync-gfid.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <limits.h>
#include <sys/types.h>
#include <libgen.h>
#include <ctype.h>
#include <stdlib.h>
#include <errno.h>
#include <glusterfs/glusterfs.h>
#include <glusterfs/syscall.h>
#include <libgen.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>

#ifndef UUID_CANONICAL_FORM_LEN
#define UUID_CANONICAL_FORM_LEN 36
Expand Down Expand Up @@ -42,7 +42,7 @@ main(int argc, char *argv[])
if (argc != 2) {
/* each line in the file has the following format
* uuid-in-canonical-form path-relative-to-gluster-mount.
* Both uuid and relative path are from master mount.
* Both uuid and relative path are from primary mount.
*/
fprintf(stderr, "usage: %s <file-of-paths-to-be-synced>\n", argv[0]);
goto out;
Expand Down
34 changes: 17 additions & 17 deletions extras/geo-rep/gsync-upgrade.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
#usage: gsync-upgrade.sh <slave-volfile-server:slave-volume> <gfid-file>
#usage: gsync-upgrade.sh <secondary-volfile-server:secondary-volume> <gfid-file>
# <path-to-gsync-sync-gfid> <ssh-identity-file>
#<slave-volfile-server>: a machine on which gluster cli can fetch slave volume info.
# slave-volfile-server defaults to localhost.
#<secondary-volfile-server>: a machine on which gluster cli can fetch secondary volume info.
# secondary-volfile-server defaults to localhost.
#
#<gfid-file>: a file containing paths and their associated gfids
# on master. The paths are relative to master mount point
# on primary. The paths are relative to primary mount point
# (not absolute). An example extract of <gfid-file> can be,
#
# <extract>
Expand All @@ -15,7 +15,7 @@
#
#<ssh-identity-file>: file from which the identity (private key) for public key authentication is read.

SLAVE_MOUNT='/tmp/glfs_slave'
SECONDARY_MOUNT='/tmp/glfs_secondary'

function SSH()
{
Expand Down Expand Up @@ -49,7 +49,7 @@ function cleanup_brick()
SSH -i $SSHKEY $HOST "rm -rf $BRICK/.glusterfs/* && find $BRICK -exec setfattr -x trusted.gfid {} \;"
}

function cleanup_slave()
function cleanup_secondary()
{
SSHKEY=$2

Expand Down Expand Up @@ -81,43 +81,43 @@ function mount_client()

i=$(stat -c '%i' $T);

[ "x$i" = "x1" ] || fatal "could not mount volume $MASTER on $T";
[ "x$i" = "x1" ] || fatal "could not mount volume $PRIMARY on $T";

cd $T;

$SYNC_CMD $GFID_FILE

cd -;

umount -l $T || fatal "could not umount $MASTER from $T";
umount -l $T || fatal "could not umount $PRIMARY from $T";

rmdir $T || warn "rmdir of $T failed";
}

function sync_gfids()
{
SLAVE=$1
SECONDARY=$1
GFID_FILE=$2

SLAVE_VOLFILE_SERVER=`echo $SLAVE | sed -e 's/\(.*\):.*/\1/'`
SLAVE_VOLUME_NAME=`echo $SLAVE | sed -e 's/.*:\(.*\)/\1/'`
SECONDARY_VOLFILE_SERVER=`echo $SECONDARY | sed -e 's/\(.*\):.*/\1/'`
SECONDARY_VOLUME_NAME=`echo $SECONDARY | sed -e 's/.*:\(.*\)/\1/'`

if [ "x$SLAVE_VOLFILE_SERVER" = "x" ]; then
SLAVE_VOLFILE_SERVER="localhost"
if [ "x$SECONDARY_VOLFILE_SERVER" = "x" ]; then
SECONDARY_VOLFILE_SERVER="localhost"
fi

mount_client $SLAVE_VOLFILE_SERVER $SLAVE_VOLUME_NAME $GFID_FILE $3
mount_client $SECONDARY_VOLFILE_SERVER $SECONDARY_VOLUME_NAME $GFID_FILE $3
}

function upgrade()
{
SLAVE=$1
SECONDARY=$1
GFID_FILE=$2
SYNC_CMD=$3
SSHKEY=$4

cleanup_slave $SLAVE $SSHKEY
sync_gfids $SLAVE $GFID_FILE $SYNC_CMD
cleanup_secondary $SECONDARY $SSHKEY
sync_gfids $SECONDARY $GFID_FILE $SYNC_CMD
}

upgrade "$@"
Loading

0 comments on commit 146b35d

Please sign in to comment.