Bug 764518 (GLUSTER-2786)

Summary: Having to prepend geo-replication master vol with colon spoils the UI
Product: [Community] GlusterFS Reporter: Csaba Henk <csaba>
Component: geo-replicationAssignee: Csaba Henk <csaba>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, kbudiger, rahulcs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Csaba Henk 2011-04-17 06:40:41 UTC
The leading colon intends to express that the master argument is an url. However, the as of the current semantics, it's a volume name directly, not geo-replication style url. Therefore the colon is a nuisance.

An implied issue is future compatibility (regarding possible future when a broader range of urls can be used for master). Ie. as of now, simple identifiers (strings with no path/url separators (like :, /, @)) are understood as sugared urls, namely <id> is desugared into file://`pwd`/<id>. With this scheme it's ambiguous whether <id> represents a sugared url or a volname. So we have to change the desugaring of <id> to a url (the current one is quite unfortunate anyways, given its dependence on user's location). There are two proposals for this:

a) Change url sugaring so that simple identifers will be interpreted as volume names (ie. <id> would mean gluster://localhost:<id>); then url/volname distinction disappears and we can drop the colon now without concerns.
b) Change url sugaring so that simple identifiera are uninterpreted as url. Then volume names and urls live in two separate namespace so we can use volumes without risking ambiguitly later on.

I'd go with b) -- accepting simple ids as urls are a special case anyway, which hurts the uniformity of the url sugaring logic. Ie. when we desugar an expression like <domain>:<subexpr> (ie. figuring out the url scheme of it), the scheme should be clearly deducible from the format of <domain> and <subexpr>. We'd like to have a rule like <domain>:<inner-url> desugars to ssh://`whoami`@<domain>:<inner-url>; and a rule like <domain>:<vol> desugars to gluster://<domain>:<vol>. If the simple identifier is meaningful as an url and as volname too, then both rules  match <domain>:<id>, having to add a special case for deciding which one to use. b) solves this problem clearly.

Comment 1 Anand Avati 2011-04-18 01:41:05 UTC
PATCH: http://patches.gluster.com/patch/6930 in master (mgmt/glusterd : change of syntax of geo-replication command)

Comment 2 Anand Avati 2011-04-19 06:29:57 UTC
PATCH: http://patches.gluster.com/patch/6954 in master (syncdaemon: don't accept simple identifiers anymore as sugared urls)