[Gluster-devel] Glusterd 2.0 and Geo-replication

Aravinda avishwan at redhat.com
Tue Nov 17 10:43:11 UTC 2015


Hi,


Today I spent some time identifying the interactions with Glusterd
from Geo-replication. Integration with Glusterd 2.0 is still unknown, but
the list of things may help Glusterd folks while designing plugins
infrastructure.

Thanks Kaushal for explaining the current state of Glusterd.

Geo-rep Create
--------------
1. Verify Slave Cluster
    Dependent on Glusterd: No

2. Generate SSH Keys and collect from all peer nodes to initiated node
    Dependent on Glusterd: Yes
    Existing: Geo-rep uses `gluster system:: execute` infrastructure to
    run in all nodes and copy from all peers.
    Proposed: TBD

3. Create session directory and status file in all peers
    Dependent on Glusterd: Yes
    Proposed: We can use distributed store to save the details
    of Session existence

4. Distribute the PUB keys to connected Slave node and then distribute
to all Slave peers.
    Dependent on Glusterd: Yes
    Existing: Geo-rep uses `gluster system:: copy-file` to copy file to
    all peers and `gluster system:: execute` to add keys to
    ~/.ssh/authorized_keys file.
    Proposed: TBD

Geo-rep Start
-------------
1. Check if Session exists
    Dependent on Glusterd: Yes
    Existing: Looks for status file in session dir
    Proposed: Look in Glusterd distributed store

2. Check if already started
    Dependent on Glusterd: No
    Existing: Reads monitor status file(If status is not Stopped, Created)
    Proposed: N/A (If we store Monitor status per node in
    Distributed store then we need to interact with Glusterd)

2. Start Geo-rep Monitor process in all Master nodes
    Dependent on Glusterd: Yes
    Existing: Gets the list of Unique master nodes and Spawns Monitor
    process
    Proposed: TBD

Geo-rep Stop
------------
1. Check if Session exists
    Dependent on Glusterd: Yes
    Existing: Looks for status file in session dir
    Proposed: Look in Glusterd distributed store

2. Check if started
    Dependent on Glusterd: No
    Existing: Reads monitor status file(If status is not Stopped, Created)
    Proposed: N/A (If we store Monitor status per node in
    Distributed store then we need to interact with Glusterd)

3. Send SIGTERM to respective Monitor process in all Master nodes
    Dependent on Glusterd: Yes
    Existing: Sends SIGTERM to all monitor process in all master nodes
    Proposed: TBD

Geo-rep config set
------------------
1. Check if session exists
    Dependent on Glusterd: Yes
    Existing: Looks for status file in session dir
    Proposed: Look in Glusterd distributed store

2. Update config file in all Master nodes
    Dependent on Glusterd: Yes
    Existing: Update config in all peers
    Proposed: Update config in distributed store

3. Restart Geo-rep if config change expects restart
    Same as Stop and Start

Geo-rep config get
------------------
1. Check if Session exists
    Dependent on Glusterd: Yes
    Existing: Looks for status file in session dir
    Proposed: Look in Glusterd distributed store

2. Get config values from One node by calling gsyncd
    Dependent on Glusterd: Yes
    Existing: Call gsyncd command to get config values
    Proposed: Read config values from Glusterd distributed store

Geo-rep delete
--------------
1. Check if session exists
    Dependent on Glusterd: Yes
    Existing: Looks for status file in session dir
    Proposed: Look in Glusterd distributed store

2. Delete the Session directories from all Master peers
    Dependent on Glusterd: Yes
    Existing: Delete Session directory from all Master peers
    Proposed: Delete session details and config from distributed store

Geo-rep status
--------------
1. If session details provided, check if session exists
    Dependent on Glusterd: Yes
    Existing: Looks for status file in session dir
    Proposed: Look in Glusterd distributed store

2. If session details not provided, get all Sessions
    Dependent on Glusterd: Yes
    Existing: Read all Volinfo and get list of session_slave
    Proposed: Read session list from distributed store.

3. For each session Get list of master nodes and Collect status from
each node by running gsyncd command in each Master node
    Dependent on Glusterd: Yes
    Existing: Get list of master nodes from Volinfo, run gsyncd status
    command in each node and parse the output.
    Proposed: TBD

Interaction with other components(APIs)
---------------------------------------
Snapshot, Remove brick, Volume stop commands checks for existence of
Geo-rep session. Following APIs are identified for the same.

1. Check if Geo-rep session exists
2. Check if Geo-rep session is running

Please add if I missed anything.

-- 
regards
Aravinda



More information about the Gluster-devel mailing list