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


[virt-tools-list] [PATCH 2/2] Show the new connection dialog if we can't find a default URI.

2014-12-04 Thread Cédric Bosdonnat
---
 virtManager/engine.py | 18 +-
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/virtManager/engine.py b/virtManager/engine.py
index 8e9caeb..487277a 100644
--- a/virtManager/engine.py
+++ b/virtManager/engine.py
@@ -178,14 +178,6 @@ class vmmEngine(vmmGObject):
 self.timeout_add(1000, self._add_default_conn, manager)
 
 def _add_default_conn(self, manager):
-# Manager fail message
-msg = _("Could not detect a default hypervisor. Make\n"
-"sure the appropriate virtualization packages\n"
-"are installed (kvm, qemu, libvirt, etc.), and\n"
-"that libvirtd is running.\n\n"
-"A hypervisor connection can be manually\n"
-"added via File->Add Connection")
-
 logging.debug("Determining default libvirt URI")
 
 ret = None
@@ -202,10 +194,6 @@ class vmmEngine(vmmGObject):
 else:
 tryuri = vmmConnect.default_uri(always_system=True)
 
-if tryuri is None:
-manager.set_startup_error(msg)
-return
-
 warnmsg = _("The 'libvirtd' service will need to be started.\n\n"
 "After that, virt-manager will connect to libvirt on\n"
 "the next application start up.")
@@ -219,7 +207,11 @@ class vmmEngine(vmmGObject):
 if not connected and do_start:
 manager.err.ok(_("Libvirt service must be started"), warnmsg)
 
-self.idle_add(idle_connect)
+# If there is no default URI to be found, show the new connection 
dialog
+if tryuri is None:
+self._do_show_connect(self.windowManager)
+else:
+self.idle_add(idle_connect)
 
 
 def load_stored_uris(self):
-- 
2.1.2

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


[virt-tools-list] [PATCH 0/2] Better default URI default

2014-12-04 Thread Cédric Bosdonnat
Hi all,

Here are two patches to improve the default URI to connect to:
  * First pach enables lxc:/// is we only have the lxc driver installed on
the local libvirt instance
  * Second patch pops up the New Connection dialog instead of showing an
error if we can't manage to figure out a default URI to use. This
should improve the experience for users who don't have a running
instance of libvirt on the same machine than virt-manager.

Cédric Bosdonnat (2):
  Default connection URI if libvirt-daemon-driver-lxc is installed
  Show the new connection dialog if we can't find a default URI.

 virtManager/connect.py |  4 
 virtManager/engine.py  | 18 +-
 2 files changed, 9 insertions(+), 13 deletions(-)

-- 
2.1.2

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

[virt-tools-list] [PATCH 1/2] Default connection URI if libvirt-daemon-driver-lxc is installed

2014-12-04 Thread Cédric Bosdonnat
From: Cédric Bosdonnat 

The default URI is set to lxc:/// if libvirt's lxc driver is installed
locally, but only if there is no kvm/xen URI to default to.
---
 virtManager/connect.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/virtManager/connect.py b/virtManager/connect.py
index 9c997da..ddda173 100644
--- a/virtManager/connect.py
+++ b/virtManager/connect.py
@@ -115,6 +115,10 @@ class vmmConnect(vmmGObjectUI):
 return "qemu:///system"
 else:
 return "qemu:///session"
+
+if (os.path.exists("/usr/lib/libvirt/libvirt_lxc") or
+os.path.exists("/usr/lib64/libvirt/libvirt_lxc")):
+return "lxc:///"
 return None
 
 def cancel(self, ignore1=None, ignore2=None):
-- 
2.1.2

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