Re: [virt-tools-list] [PATCH] Add glusterfs volumes support to virt-install

2014-12-09 Thread Cole Robinson

On 12/04/2014 12:04 PM, Cole Robinson wrote:

On 12/02/2014 04:35 AM, Anatoly Belikov wrote:

---
  tests/xmlparse-xml/change-disk-in.xml  |  8 +++
  tests/xmlparse-xml/change-disk-out.xml |  8 +++
  tests/xmlparse.py  |  9 
  virtinst/cli.py| 28 
  virtinst/devicedisk.py | 23 +++-
  virtinst/diskbackend.py| 39
+++---
  virtinst/storage.py| 14 +---
  7 files changed, 104 insertions(+), 25 deletions(-)



Thanks for updating the patch. A few comments:

- There's still spurious whitespace changes (added/removing blank lines,
changing indentation of unaltered code)

- Supporting a single disk hostname isn't sufficient, at least ceph/rbd can
handle multiple host names

- The libxml usage means we are doing something wrong: we should be using
StoragePool's parsing capabilities.

- The change should be split further: one patch handling the source protocol,
source name, and host name additions, the another patch handling the
gluster:// URI parsing magic

- tests/clitest.py should be extended as well

That said, I just finished setting up a gluster and ceph server for testing,
so I'm working on this now. I'll likely massage this patch and commit the
protocol/name/hostname bit with proper attribution, and build on it from
there. I'll respond here when there's more to test



Most of the hard work is done upstream now. What's available:
- --disk $URL should just work
- --disk source_protocol=$PROTO,source_host_name=$HOSTNAME,... etc should work
- virt-manager createpool/createvol wizards should work

Bits I'm still working on:
- Fix network volume selection in virt-manager storagebrowser work
- rbd/sheepdog volume creation with --disk
- Documentation

Related stuff that I'm not planning on doing right now:
- Any ceph auth handling
- Multi host support in devicedisk
- Multi host support in createpool wizard UI

- Cole

___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list


Re: [virt-tools-list] [PATCH] Add glusterfs volumes support to virt-install

2014-12-04 Thread Cole Robinson

On 12/02/2014 04:35 AM, Anatoly Belikov wrote:

---
  tests/xmlparse-xml/change-disk-in.xml  |  8 +++
  tests/xmlparse-xml/change-disk-out.xml |  8 +++
  tests/xmlparse.py  |  9 
  virtinst/cli.py| 28 
  virtinst/devicedisk.py | 23 +++-
  virtinst/diskbackend.py| 39 +++---
  virtinst/storage.py| 14 +---
  7 files changed, 104 insertions(+), 25 deletions(-)



Thanks for updating the patch. A few comments:

- There's still spurious whitespace changes (added/removing blank lines, 
changing indentation of unaltered code)


- Supporting a single disk hostname isn't sufficient, at least ceph/rbd can 
handle multiple host names


- The libxml usage means we are doing something wrong: we should be using 
StoragePool's parsing capabilities.


- The change should be split further: one patch handling the source protocol, 
source name, and host name additions, the another patch handling the 
gluster:// URI parsing magic


- tests/clitest.py should be extended as well

That said, I just finished setting up a gluster and ceph server for testing, 
so I'm working on this now. I'll likely massage this patch and commit the 
protocol/name/hostname bit with proper attribution, and build on it from 
there. I'll respond here when there's more to test


Thanks,
Cole

___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list


Re: [virt-tools-list] Patch: Add glusterfs volumes support to virt-install

2014-10-29 Thread Chen, Hanxiao
Hi,

I amend your patch a little ,add a doc patch and resend.

Thanks,
-Chen

From: Anatoly Belikov [mailto:wormbl...@gmail.com]
Sent: Friday, October 24, 2014 11:40 PM
To: Chen, Hanxiao/陈 晗霄
Cc: virt-tools-list@redhat.com
Subject: Re: [virt-tools-list] Patch: Add glusterfs volumes support to 
virt-install

I have fixed pylint warnings i introduced and some more. Sorry for not using 
git-email yet. I am having some problems setting it up right now.

2014-10-24 6:06 GMT+04:00 Chen, Hanxiao 
chenhanx...@cn.fujitsu.commailto:chenhanx...@cn.fujitsu.com:
Hi Anatoly,

 Thanks for your patch.

 Please run:
 python setup.py pylint
 and you’ll find that pylint complained a lot :)

 Also, ‘git send-email’ is preferred for an easy review.

Thanks,
- Chen

From: 
virt-tools-list-boun...@redhat.commailto:virt-tools-list-boun...@redhat.com 
[mailto:virt-tools-list-boun...@redhat.commailto:virt-tools-list-boun...@redhat.com]
 On Behalf Of Anatoly Belikov
Sent: Thursday, October 23, 2014 8:20 PM
To: virt-tools-list@redhat.commailto:virt-tools-list@redhat.com
Subject: [virt-tools-list] Patch: Add glusterfs volumes support to virt-install

Hello.
I would like to share my patch. It allows to create vm with volumes from 
glusterfs pools if volume already exists.




--
С уважением
А. Беликов
___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list

Re: [virt-tools-list] Patch: Add glusterfs volumes support to virt-install

2014-10-24 Thread Anatoly Belikov
I have fixed pylint warnings i introduced and some more. Sorry for not
using git-email yet. I am having some problems setting it up right now.

2014-10-24 6:06 GMT+04:00 Chen, Hanxiao chenhanx...@cn.fujitsu.com:

  Hi Anatoly,



  Thanks for your patch.



  Please run:

  python setup.py pylint

  and you'll find that pylint complained a lot :)



  Also, 'git send-email' is preferred for an easy review.



 Thanks,

 - Chen



 *From:* virt-tools-list-boun...@redhat.com [mailto:
 virt-tools-list-boun...@redhat.com] * On Behalf Of *Anatoly Belikov
 *Sent:* Thursday, October 23, 2014 8:20 PM
 *To:* virt-tools-list@redhat.com
 *Subject:* [virt-tools-list] Patch: Add glusterfs volumes support to
 virt-install



 Hello.

 I would like to share my patch. It allows to create vm with volumes from
 glusterfs pools if volume already exists.





-- 
С уважением
А. Беликов
From ee5b337cc3c75954608425eb0096879ee30a Mon Sep 17 00:00:00 2001
From: Anatoly Belikov wormbl...@gmail.com
Date: Fri, 24 Oct 2014 19:34:20 +0400
Subject: [PATCH] add glusterfs volumes support to virt-install

---
 tests/testdriver.xml   | 35 +-
 tests/xmlparse-xml/change-disk-in.xml  |  8 
 tests/xmlparse-xml/change-disk-out.xml |  8 
 tests/xmlparse.py  | 11 +++
 virtinst/cli.py| 22 +++--
 virtinst/devicedisk.py | 25 
 virtinst/diskbackend.py| 26 -
 virtinst/storage.py| 10 +++---
 8 files changed, 126 insertions(+), 19 deletions(-)

diff --git a/tests/testdriver.xml b/tests/testdriver.xml
index 579c756..43c0755 100644
--- a/tests/testdriver.xml
+++ b/tests/testdriver.xml
@@ -1739,7 +1739,40 @@ ba/description
 /pool
 
 
-
+pool type='gluster'
+  namegluster-pool/name
+  uuid7b83ef6d-28da-44f1-841f-2011320f13b0/uuid
+  capacity unit='bytes'492258959360/capacity
+  allocation unit='bytes'16975638528/allocation
+  available unit='bytes'475283320832/available
+  source
+host name='192.168.1.100'/
+dir path='/'/
+nametest-volume/name
+  /source
+  volume type='network'
+  nametest-volume2.raw/name
+  keygluster://192.168.1.100/test-volume/test-gluster.raw/key
+  source
+  /source
+  capacity unit='bytes'10737418240/capacity
+  allocation unit='bytes'2489327616/allocation
+  target
+pathgluster://192.168.1.100/test-volume/test-gluster.raw/path
+format type='raw'/
+permissions
+  mode0666/mode
+  owner0/owner
+  group0/group
+/permissions
+timestamps
+  atime1413881655.870313004/atime
+  mtime1411649104.965642390/mtime
+  ctime1412163870.190503958/ctime
+/timestamps
+  /target
+  /volume
+/pool
 
 
 
diff --git a/tests/xmlparse-xml/change-disk-in.xml b/tests/xmlparse-xml/change-disk-in.xml
index 9725e9b..16c1140 100644
--- a/tests/xmlparse-xml/change-disk-in.xml
+++ b/tests/xmlparse-xml/change-disk-in.xml
@@ -68,6 +68,14 @@
   target dev='vda' bus='virtio'/
   readonly/
 /disk
+disk type='network' device='disk'
+  driver name='qemu' type='raw'/
+  source protocol='sheepdog' name='sheepdog-pool/test-sheepdog.raw'
+host name='test.domain'/
+  /source
+  target dev='vdc' bus='virtio'/
+  address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x0'/
+/disk
 input type=mouse bus=ps2/
 graphics type=vnc display=:3.4 xauth=/tmp/.Xauthority/
 console type=pty/
diff --git a/tests/xmlparse-xml/change-disk-out.xml b/tests/xmlparse-xml/change-disk-out.xml
index d9af1e3..5acd34a 100644
--- a/tests/xmlparse-xml/change-disk-out.xml
+++ b/tests/xmlparse-xml/change-disk-out.xml
@@ -70,6 +70,14 @@
   target dev=vda bus=virtio/
   readonly/
 /disk
+disk type=network device=disk
+  driver name=qemu type=raw/
+  source protocol=gluster name=test-volume/test-gluster.raw
+host name=192.168.1.100/
+  /source
+  target dev=vdc bus=virtio/
+  address type=pci domain=0x bus=0x00 slot=0x05 function=0x0/
+/disk
 input type=mouse bus=ps2/
 graphics type=vnc display=:3.4 xauth=/tmp/.Xauthority/
 console type=pty/
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index 62aa410..0bde7b2 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -332,6 +332,7 @@ class XMLParseTest(unittest.TestCase):
 disk6 = disks[5]
 disk6.size = 1
 disk9 = disks[8]
+disk_gl = disks[9]
 
 check = self._make_checker(disk1)
 check(path, /tmp/test.img, /dev/null)
@@ -374,6 +375,16 @@ class XMLParseTest(unittest.TestCase):
 check = self._make_checker(disk9)
 check(sourcePool, defaultPool, anotherPool)
 
+check = self._make_checker(disk_gl)
+
+check(source_protocol, sheepdog, gluster)
+
+check(host_name, test.domain, 192.168.1.100)
+pool = 

Re: [virt-tools-list] Patch: Add glusterfs volumes support to virt-install

2014-10-23 Thread Chen, Hanxiao
Hi Anatoly,

 Thanks for your patch.

 Please run:
 python setup.py pylint
 and you’ll find that pylint complained a lot :)

 Also, ‘git send-email’ is preferred for an easy review.

Thanks,
- Chen

From: virt-tools-list-boun...@redhat.com 
[mailto:virt-tools-list-boun...@redhat.com] On Behalf Of Anatoly Belikov
Sent: Thursday, October 23, 2014 8:20 PM
To: virt-tools-list@redhat.com
Subject: [virt-tools-list] Patch: Add glusterfs volumes support to virt-install

Hello.
I would like to share my patch. It allows to create vm with volumes from 
glusterfs pools if volume already exists.

___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list