Remus: support both tap and tap2 style disk specs
PATCH 1/1 Remus: support both tap and tap2 style disk specs
# HG changeset patch
# User Shriram Rajagopalan <[email protected]> # Date 1297922415 28800
# Node ID 0ee537d24ca0fb0e5e74438f1375a7a7d9dc13b5 # Parent 137ad33475048abce15d82a7499cf211f0c28c85
Remus: support both tap and tap2 style disk specs
tools/python/xen/remus/device.py +3 -2
@@ -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'
Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):
Quoted 1 line
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 ?
tools/python/xen/remus/device.py line 40
Quoted 3 lines
tools/python/xen/remus/device.py +2
-1- 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.
Quoted 7 lines · Ian Jackson
Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):
Quoted 1 line
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?
Quoted 7 lines
Quoted 3 lines
- if not
disk.uname.startswith('tap:remus:')and notdisk.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
Quoted 3 lines
Ian.
Shriram Rajagopalan writes ("Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):
Quoted 6 lines · Ian Jackson
Quoted 5 lines
Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):
Quoted 3 lines
- if not
disk.uname.startswith('tap:remus:')and notdisk.uname.startswith('tap:tapdisk:remus:'):
+ disktype =re.match("tap2?:.*(remus.*)\|", disk.uname)
+ if disktype == None:
Quoted 8 lines
Quoted 3 lines
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|
Quoted 3 lines
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.
Quoted 2 lines
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.
Quoted 23 lines · Ian Jackson
Shriram Rajagopalan writes ("Re: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):
Quoted 6 lines · Ian Jackson
Quoted 5 lines
Shriram Rajagopalan writes ("[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs"):
Quoted 3 lines
tools/python/xen/remus/device.py +2
-1- 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:Quoted 8 lines
Quoted 3 lines
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|Quoted 3 lines
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
Quoted 9 lines
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.
Quoted 2 lines
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
Quoted 2 lines
Ian.