diff options
| author | Venky Shankar <vshankar@redhat.com> | 2013-08-02 15:34:00 +0530 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2013-09-04 19:27:19 -0700 | 
| commit | c7cc5252a350ff78b5f8396d05c85b9d2ade17b8 (patch) | |
| tree | 3a674c25a06e91f2c82cc29ebbf1341e4935d209 /geo-replication/syncdaemon/resource.py | |
| parent | fa095c24979db2d0a3a6413aa431fe7256be5206 (diff) | |
glusterd: Saving geo-rep session details in a more specific path
Now saving the session details in
/var/lib/glusterd/geo-replication/<mastervol>_<slaveip>_<slavevol>
repo to distinguish between two master-slave sessions where the
slavename is same across two different clusters.
Change-Id: I57c93f55cc9bd4fe2bffe579028aaf5e4335b223
BUG: 991501
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/5488
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
| -rw-r--r-- | geo-replication/syncdaemon/resource.py | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 401bca7f8..297cdabcb 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -1059,16 +1059,17 @@ class SSH(AbstractUrl, SlaveRemote):          self.volume = inner_url[1:]      @staticmethod -    def parse_ssh_address(addr): -        m = re.match('([^@]+)@(.+)', addr) +    def parse_ssh_address(self): +        m = re.match('([^@]+)@(.+)', self.remote_addr)          if m:              u, h = m.groups()          else: -            u, h = syncdutils.getusername(), addr +            u, h = syncdutils.getusername(), self.remote_addr +        self.remotehost = h          return {'user': u, 'host': h}      def canonical_path(self): -        rap = self.parse_ssh_address(self.remote_addr) +        rap = self.parse_ssh_address(self)          remote_addr = '@'.join([rap['user'], gethostbyname(rap['host'])])          return ':'.join([remote_addr, self.inner_rsc.get_url(canonical=True)])  | 
