Shriram Rajagopalan
2011-Feb-17 06:08 UTC
[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs
# HG changeset patch # User Shriram Rajagopalan <rshriram@cs.ubc.ca> # Date 1297922415 28800 # Node ID 0ee537d24ca0fb0e5e74438f1375a7a7d9dc13b5 # Parent 137ad33475048abce15d82a7499cf211f0c28c85 Remus: support both tap and tap2 style disk specs Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> diff -r 137ad3347504 -r 0ee537d24ca0 tools/python/xen/remus/device.py --- a/tools/python/xen/remus/device.py Mon Feb 14 17:02:55 2011 +0000 +++ b/tools/python/xen/remus/device.py Wed Feb 16 22:00:15 2011 -0800 @@ -36,10 +36,11 @@ # to request commits. self.ctlfd = None - if not disk.uname.startswith(''tap:remus:'') and not disk.uname.startswith(''tap:tapdisk:remus:''): + disktype = re.match("tap2?:.*(remus.*)\|", disk.uname) + if disktype == None: raise ReplicatedDiskException(''Disk is not replicated: %s'' % str(disk)) - fifo = re.match("tap:.*(remus.*)\|", disk.uname).group(1).replace('':'', ''_'') + fifo = disktype.group(1).replace('':'', ''_'') absfifo = os.path.join(self.FIFODIR, fifo) absmsgfifo = absfifo + ''.msg'' _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Feb-17 19:04 UTC
Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs
Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):> Remus: support both tap and tap2 style disk specsThanks for this, but: where can I find documented what this disk spec string is supposed to look like ? Ought this to be in docs/misc/xl-disk-configuration.txt ?> - if not disk.uname.startswith(''tap:remus:'') and not disk.uname.startswith(''tap:tapdisk:remus:''): > + disktype = re.match("tap2?:.*(remus.*)\|", disk.uname) > + if disktype == None:This seems quite a striking change. What is the tap2 remus syntax like ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shriram Rajagopalan
2011-Feb-17 20:43 UTC
Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs
On Thu, Feb 17, 2011 at 11:04 AM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:> Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"): >> Remus: support both tap and tap2 style disk specs > > Thanks for this, but: where can I find documented what this disk spec > string is supposed to look like ? Ought this to be in > docs/misc/xl-disk-configuration.txt ? > >> - if not disk.uname.startswith(''tap:remus:'') and not disk.uname.startswith(''tap:tapdisk:remus:''): >> + disktype = re.match("tap2?:.*(remus.*)\|", disk.uname) >> + if disktype == None: > > This seems quite a striking change. What is the tap2 remus syntax > like ? >There is no change in remus syntax. remus part of the disk spec just requires "remus:BackupHost:Port|" to immediately follow major driver name. so, disk= tap2:remus:BackupHost:Port|aio:volname ... the problem is with the initial prefix "tap2:" string. Which could be tap: or tap2: or tap:tapdisk or tap2:tapdisk based on http://wiki.xensource.com/xenwiki/blktap2 Though as i noted in an earlier email, libxl doesnt accept tap2 while xend accepts tap2. shriram> Ian. > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Feb-18 12:23 UTC
Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs
Shriram Rajagopalan writes ("Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):> On Thu, Feb 17, 2011 at 11:04 AM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote: > > Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"): > >> - if not disk.uname.startswith(''tap:remus:'') and not disk.uname.startswith(''tap:tapdisk:remus:''): > >> + disktype = re.match("tap2?:.*(remus.*)\|", disk.uname) > >> + if disktype == None: > > > > This seems quite a striking change. What is the tap2 remus syntax > > like ? > > > There is no change in remus syntax. > remus part of the disk spec just requires "remus:BackupHost:Port|" to > immediately follow major driver name. so, > > disk= tap2:remus:BackupHost:Port|aio:volname ...Your regexp would match tap2:aio:file:/path/containing/remus/and/with/a/pipe/symbol|> the problem is with the initial prefix "tap2:" string. > Which could be tap: or tap2: or tap:tapdisk or tap2:tapdisk based on > http://wiki.xensource.com/xenwiki/blktap2Yes, this is very unpleasant. But at the very least I think you should be somewhat more careful and at least expect the thing you eat at the front not to contain slashes.> Though as i noted in an earlier email, libxl doesnt accept tap2 while xend > accepts tap2.We have fixed that very recently - in the last day or two. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shriram Rajagopalan
2011-Feb-18 13:50 UTC
Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs
On 2011-02-18, at 4:23 AM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:> Shriram Rajagopalan writes ("Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"): >> On Thu, Feb 17, 2011 at 11:04 AM, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote: >>> Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"): >>>> - if not disk.uname.startswith(''tap:remus:'') and not disk.uname.startswith(''tap:tapdisk:remus:''): >>>> + disktype = re.match("tap2?:.*(remus.*)\|", disk.uname) >>>> + if disktype == None: >>> >>> This seems quite a striking change. What is the tap2 remus syntax >>> like ? >>> >> There is no change in remus syntax. >> remus part of the disk spec just requires "remus:BackupHost:Port|" to >> immediately follow major driver name. so, >> >> disk= tap2:remus:BackupHost:Port|aio:volname ... > > Your regexp would match > tap2:aio:file:/path/containing/remus/and/with/a/pipe/symbol| > >> the problem is with the initial prefix "tap2:" string. >> Which could be tap: or tap2: or tap:tapdisk or tap2:tapdisk based on >> http://wiki.xensource.com/xenwiki/blktap2 > > Yes, this is very unpleasant. But at the very least I think you > should be somewhat more careful and at least expect the thing you eat > at the front not to contain slashes. > >> Though as i noted in an earlier email, libxl doesnt accept tap2 while xend >> accepts tap2. > > We have fixed that very recently - in the last day or two. >If that''s the case, the patch could be really simple. Will send out another patch soon. Shriram> Ian. >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel