Re: [libvirt] libvirt modifying iptables rules

2010-03-12 Thread David Lutterkort
On Mon, 2010-03-08 at 23:02 +0100, Felix Schwarz wrote: Am 07.03.2010 15:09, schrieb Varrun Ramani: I am right now undertaking a project which deals with verification of firewall rules. I wish to know which applications/libraries modify/query firewall rules. I came to know that libvirt

Re: [libvirt] [PATCH] Avoid segv if ncf_init fails

2009-10-27 Thread David Lutterkort
On Fri, 2009-10-23 at 20:31 +0100, Daniel P. Berrange wrote: On Fri, Oct 23, 2009 at 03:13:17PM -0400, Laine Stump wrote: If ncf_init() fails, it takes responsibility to call ncf_close() when appropriate. Having libvirt call it results in a double close, which ends up segv'ing. Hmm, it

Re: [libvirt] [PATCH] Avoid segv if ncf_init fails

2009-10-27 Thread David Lutterkort
On Tue, 2009-10-27 at 14:23 +, David Lutterkort wrote: On Fri, 2009-10-23 at 20:31 +0100, Daniel P. Berrange wrote: On Fri, Oct 23, 2009 at 03:13:17PM -0400, Laine Stump wrote: If ncf_init() fails, it takes responsibility to call ncf_close() when appropriate. Having libvirt call

Re: [libvirt] [PATCH] Support reporting live interface IP/netmask.

2009-10-06 Thread David Lutterkort
On Tue, 2009-10-06 at 10:13 +0100, Daniel P. Berrange wrote: The live XML should *always* say what the inteface is doing right now. And from the rest of this exchange, I think the word 'only' should be added to that sentence. In other words, the XML for live setups contains *only* what we have

Re: [libvirt] [PATCH] Support reporting live interface IP/netmask.

2009-10-06 Thread David Lutterkort
On Tue, 2009-10-06 at 14:17 -0400, Laine Stump wrote: On 10/06/2009 01:36 PM, David Lutterkort wrote: On Tue, 2009-10-06 at 10:13 +0100, Daniel P. Berrange wrote: The live XML should *always* say what the inteface is doing right now. And from the rest of this exchange, I

Re: [libvirt] [PATCH] Support reporting live interface IP/netmask.

2009-10-05 Thread David Lutterkort
On Mon, 2009-10-05 at 12:02 +0100, Daniel P. Berrange wrote: On Tue, Sep 29, 2009 at 04:02:30PM -0400, Laine Stump wrote: From: root r...@vlap.laine.org This patch adds the flag VIR_INTERFACE_XML_INACTIVE to virInterfaceGetXMLDesc's flags. When it is *not* set (the default), the live

Re: [libvirt] [PATCH] Support reporting live interface IP/netmask.

2009-10-05 Thread David Lutterkort
On Mon, 2009-10-05 at 17:34 +0100, Daniel P. Berrange wrote: With the domain XML format, we did have a few abortive attempts at indicating in the live XML, whether an attribute was from the persistent config, vs dynamically added to live config, but it all ended up as rather a mess. Here's a

Re: [libvirt] [PATCH] Support for IPv6 / multiple ifaces in interface_conf.[ch]

2009-10-05 Thread David Lutterkort
On Sun, 2009-10-04 at 22:58 -0400, Laine Stump wrote: Note that netcf appears to not accept defining both ipv4 and ipv6 on the same interface, and still can't report live config of IPv6 (or multiple IPv4 addresses), so the usefulness of this patch is limited until those items are fixed in

Re: [libvirt] hooking a physical nic to a bridge with net-create

2009-06-29 Thread David Lutterkort
On Sun, 2009-06-28 at 21:39 -0700, Shahar Klein wrote: Correct me if I'm wrong but it seems that the vlan support is not in netcf yet... That is correct, but it will land RSN. David -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-23 Thread David Lutterkort
On Mon, 2009-06-22 at 10:50 +0100, Daniel P. Berrange wrote: libvirt does not require that all functionality is present on all platforms. So as long as an error is raised if the user requests an unsupported configuration, we're fine. As for the XML question, libvirt requires 100% backwards

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-19 Thread David Lutterkort
On Fri, 2009-06-19 at 17:39 +0100, Daniel P. Berrange wrote: Here is a proposal that is a compromise between the single hierarchy, and completely flat. The break point is only introduced where VLANs appear, which is acceptable because when defining VLAns, you don't need to define the

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-19 Thread David Lutterkort
On Fri, 2009-06-19 at 17:17 +0100, Daniel P. Berrange wrote: On Fri, Jun 19, 2009 at 06:13:37PM +0200, Daniel Veillard wrote: On Thu, Jun 18, 2009 at 10:50:10PM +, David Lutterkort wrote: On Thu, 2009-06-18 at 20:48 +0100, Daniel P. Berrange wrote: On Thu, Jun 18, 2009 at 07:05:29PM

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-19 Thread David Lutterkort
On Fri, 2009-06-19 at 10:47 +0100, Daniel P. Berrange wrote: IMHO that results in a bad structure, because its anot associating the related info together, eg having an separate element to turn on/off IPV6, and then listing addresses: address family='ipv6'/ ip type='ipv6'

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-19 Thread David Lutterkort
On Fri, 2009-06-19 at 20:14 +0200, Daniel Veillard wrote: On Fri, Jun 19, 2009 at 05:45:33PM +, David Lutterkort wrote: Agreed .. that format wouldn't help much with static checking. Okay, well I think the recursive definition is really the worse for validation and processing. I

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 10:46 +0100, Daniel P. Berrange wrote: On Wed, Jun 17, 2009 at 10:59:20PM +, David Lutterkort wrote: On Wed, 2009-06-17 at 21:32 +0100, Daniel P. Berrange wrote: How do you deal with IPv6 currently ? With lots of Aspirin (actually, not at all) I

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 16:06 +0200, Daniel Veillard wrote: On Thu, Jun 18, 2009 at 10:46:45AM +0100, Daniel P. Berrange wrote: On Wed, Jun 17, 2009 at 10:59:20PM +, David Lutterkort wrote: The problem with the propsal is that it opens the door to a variety of errors like using the same

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 18:06 +0100, Daniel P. Berrange wrote: On Thu, Jun 18, 2009 at 04:06:40PM +0200, Daniel Veillard wrote: We should allow standalone IPv4 and IPv6, or both. Each could either use DHCP or allow one or more IP address and routes. You need to have allow for IP

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 19:05 +0100, Daniel P. Berrange wrote: Similarly, a bond enslaved to a bridge, together with a vlan on that bond also enslaved to the bridge would look like interface type=bridge startmode=onboot namebr0/name ... bridge

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 20:48 +0100, Daniel P. Berrange wrote: On Thu, Jun 18, 2009 at 07:05:29PM +0100, Daniel P. Berrange wrote: I think this is a really unpleasant format to deal with. IMHO there should not be nesting for bridge/bond tags. They should just refer to their slave device

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 18:10 +0100, Daniel P. Berrange wrote: I don't see that that buys us anything that we wouldn't have with ip type='ipv4' address='122.0.0.3' prefix='24'/ ip type='ipv4' address='24.24.224.4' prefix='24'/ ip type='ipv6' address='2001:23::2'

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 09:15 +0200, Jonas Eriksson wrote: I am a bit critical to the policy restrictions of the current incarnation of the netcf API. Currently, a interface (or connection) has to have an IP address and a bridge has to have one or more interfaces attached to it. Ok .. I relent

Re: [libvirt] Patch for Ruby Bindings to include attach detach device

2009-06-18 Thread David Lutterkort
On Thu, 2009-06-18 at 12:31 +0200, Martin Gajdos wrote: What this small patch does is, it adds two functions to call virDomainAttachDevice virDomainDetachDevice which allow devices to be attached detached at run-time. The Ruby methods are called attach_device detach_device and belong to the

[libvirt] Re: [netcf-devel] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-17 Thread David Lutterkort
On Tue, 2009-06-16 at 15:12 -0400, Laine Stump wrote: I've already been working on incorporating physical host interface configuration into libvirt by way of using libnetcf on the backend. It's becoming apparent that, in addition to modifying and reporting the current configuration of

Re: [libvirt] Re: [netcf-devel] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-17 Thread David Lutterkort
On Wed, 2009-06-17 at 19:27 +0100, Daniel P. Berrange wrote: Hmm, this seems wrong to me. 'connections' are an application level concept. The libvirt API should be exposing all the interfaces on the host, so you should see all the br0, bond0, and eth0 eth1 devices for a bridge on top of a

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-17 Thread David Lutterkort
On Wed, 2009-06-17 at 19:24 +0100, Daniel P. Berrange wrote: IP address information should be in the XML, and indeed surely it is already there in order to allow non-DHCP based IP address config on interfaces ? Yes, for statically configured interfaces, the IP information is in the XML -

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-17 Thread David Lutterkort
On Wed, 2009-06-17 at 22:10 +0200, Daniel Veillard wrote: On Wed, Jun 17, 2009 at 09:03:32PM +0100, Daniel P. Berrange wrote: On Wed, Jun 17, 2009 at 09:42:11PM +0200, Daniel Veillard wrote: On Wed, Jun 17, 2009 at 12:22:13PM -0700, David Lutterkort wrote: On Wed, 2009-06-17 at 19:24

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-17 Thread David Lutterkort
On Wed, 2009-06-17 at 21:32 +0100, Daniel P. Berrange wrote: How do you deal with IPv6 currently ? With lots of Aspirin (actually, not at all) I was thinking of sugesting an attribute ip type=ipv6 address=2001:23::2 prefix=24/ but I think its possibly better to have a different

Re: [netcf-devel] [libvirt] [RFC] Reporting host interface status/statistics via netcf/libvirt, and listing active vs. inactive interfaces

2009-06-17 Thread David Lutterkort
On Wed, 2009-06-17 at 22:33 +0200, Daniel Veillard wrote: On Wed, Jun 17, 2009 at 01:27:14PM -0700, David Lutterkort wrote: I haven't declared the schema or the API stable yet, but I want to do that once there is a libvirt release out there that relies on netcf. So if there are any other

Re: [libvirt] test driver for interface config

2009-04-14 Thread David Lutterkort
On Fri, 2009-04-10 at 11:47 +0100, Daniel P. Berrange wrote: I'm afraid this isn't really going to fly. The libvirt public interface is defined by C library API/ABI, and the XML format. To provide the guarenteed stability consistency of this interface across releases, we need to have the XML

Re: [libvirt] test driver for interface config

2009-04-07 Thread David Lutterkort
On Tue, 2009-04-07 at 16:50 +0100, Daniel P. Berrange wrote: The test impl needs to be within libvirt so it is always available no matter whether netcf is available for the build, so it shouldn't use netcf at all. For the time being though, netcf not being available also means that the

Re: [libvirt] test driver for interface config

2009-04-07 Thread David Lutterkort
On Tue, 2009-04-07 at 16:35 +0100, Daniel P. Berrange wrote: Even though its doing a passthrough to netcf library, the netcf driver would still need to parse the XML in accordance with libvirt defined schema. It just happens that netcf uses the same XML format, so it can then convert it back

Re: [libvirt] How to prevent libvirt from adding iptables rules?

2009-04-06 Thread David Lutterkort
On Mon, 2009-04-06 at 14:36 +0200, Ludwig Nussel wrote: SuSEfirewall2 does not have such a mechanism and TBH I pretty much dislike the idea of allowing applications to inject arbitrary rules. I'd prefer some higher level abstraction so it's left to the firewall to decide how to translate the

[libvirt] ANNOUNCE: netcf, a platform-agnostic library for network configuration

2009-04-02 Thread David Lutterkort
I am pleased to announce the availability of netcf 0.0.1, the initial release of a library for managing network configuration in a platform agnostic manner. If I were into code names, this would be the what have you been waiting for release. Netcf does its work by directly modifying the 'native'

Re: [libvirt] 802.1q vlan-tagging support for libvirt

2009-04-02 Thread David Lutterkort
Hi Klaus, On Thu, 2009-04-02 at 15:50 -0300, Klaus Heinrich Kiwi wrote: My understanding is that libvirt would use vconfig to create tagged interfaces, while using a physical interface as trunk (e.g., eth0 is the trunk, eth0.20 the interface with the '20' vlan tag). Then it would add the

Re: [libvirt] [Fwd: first cut public API for physical host interface configuration]

2009-03-31 Thread David Lutterkort
On Tue, 2009-03-31 at 10:24 +0100, Daniel P. Berrange wrote: Simply that if the admin configures a new NIC using DHCP / IPV6 they will wish to know what address it got after it was brought online. libvirt does not have todo anything with these addresses, merely provide info about them in the

Re: [libvirt] [Fwd: first cut public API for physical host interface configuration]

2009-03-26 Thread David Lutterkort
On Wed, 2009-03-25 at 19:59 +, Daniel P. Berrange wrote: When 'virNetwork' talks about defined vs active interfaces there are a few things to be aware of: - There is a concept of a persistent network. This is a network which has a config file associated with it. - There is a

Re: [libvirt] [PATCH] * qemud/libvirtd_qemu.aug: Add security_driver.

2009-03-03 Thread David Lutterkort
On Tue, 2009-03-03 at 19:39 +0100, Jim Meyering wrote: Daniel P. Berrange wrote: On Tue, Mar 03, 2009 at 05:43:28PM +0100, Jim Meyering wrote: From 0e79e00614e8c6cd2b7fe7bcad1d52b2de1a3a58 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 3 Mar 2009 17:42:53 +0100

Re: [libvirt] Update on host interface configuration

2009-02-27 Thread David Lutterkort
On Fri, 2009-02-27 at 10:07 +0200, Dan Kenigsberg wrote: The real issue is, that in this stage, management may have lost connectivity to the node. What exactly is the scenario here ? Are you trying to manage any old node as long as it has libvirt installed ? As soon as you need any sort of

Re: [libvirt] Update on host interface configuration

2009-02-26 Thread David Lutterkort
On Thu, 2009-02-26 at 12:40 -0500, Dan Williams wrote: On Fri, 2009-02-13 at 09:12 +, Mark McLoughlin wrote: Hi David, Nice work ... A thought as I update this Fedora feature page[1], given that the goal of the feature could be described as fixing things so that the shared

Re: [libvirt] PATCH: 0/3: Run QEMU guests within a CGroup

2009-02-26 Thread David Lutterkort
On Thu, 2009-02-26 at 16:36 +, Daniel P. Berrange wrote: Recent Linux kernels have a new concept of 'CGroups' which is a way to group tasks on the system and apply policy to them as a whole. We already use this in the LXC container driver, to control total memory usage of things runing

Re: [libvirt] Update on host interface configuration

2009-02-24 Thread David Lutterkort
On Tue, 2009-02-24 at 18:24 +0200, Dan Kenigsberg wrote: I know I'm arriving very late to this discussion and should have read it all before posting, but... The project I'm working on wanted to be able to setup network configuration without making persistant changes to configuration files.

Re: [libvirt] networking with two hosts

2009-02-24 Thread David Lutterkort
On Tue, 2009-02-24 at 14:25 +0100, Andreas Rittershofer wrote: Task 1.) Each VM must have network access to each other VM and to the outside. Task 2.) When one host fails, all VMs are running on the remainig host and 1.) must still be fulfilled. Does somebody has any hints about

Re: [libvirt] iptables and libvirt

2009-02-06 Thread David Lutterkort
On Fri, 2009-02-06 at 13:36 -0500, Karl Wirth wrote: What if we could flexibly change the iptables rules for the different guests as they are deployed onto the node/host. The idea would be to do all of this within the iptables of the host leaving alone the iptables of the guests themselves.

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-02-05 Thread David Lutterkort
On Mon, 2009-02-02 at 10:59 +0100, Marius Tomaschewski wrote: For now, I want to stay out of setting up static routes, but I think that has to come sooner or later. It is OK to limit routes to the default route for now, but IMO it is better to use separate xml nodes, e.g.: static

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-30 Thread David Lutterkort
On Thu, 2009-01-29 at 13:34 -0800, Kaitlin Rupert wrote: Mark McLoughlin wrote: I don't think we want to define a bridge here, but more that an interface is shared - i.e. this is a property of eth2. Note this line. The main concern is that this is the way I'd expect NetworkManager

Re: [libvirt] setting up dnsmasq options for PXE boot

2009-01-28 Thread David Lutterkort
On Thu, 2009-01-22 at 15:20 +, Daniel P. Berrange wrote: On Thu, Jan 22, 2009 at 03:12:39PM +, Richard W.M. Jones wrote: On Tue, Jan 20, 2009 at 02:05:26PM +0300, Dmitry Guryanov wrote: But for working PXE boot it should have also something like

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-20 Thread David Lutterkort
On Tue, 2009-01-20 at 11:35 -0700, Jim Fehlig wrote: David Lutterkort wrote: For certain applications, we want libvirt to be able to configure host network interfaces in a variety of ways; currently, we are most interested in teaching libvirt how to set up ordinary ethernet interfaces

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
On Fri, 2009-01-16 at 03:29 +, John Levon wrote: On Fri, Jan 16, 2009 at 02:59:17AM +, David Lutterkort wrote: I am not disagreeing with you, but either way, libvirt needs _some_ way to control host interfaces. This is far from obvious to me. Could you explain more

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
On Fri, 2009-01-16 at 15:06 +, Daniel P. Berrange wrote: On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: From a style point of view I'd prefer these to all have the same top level XML element name, and use type='phys|bond|vlan|bridge' attribute for distinction, since

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
Hi Mark, On Fri, 2009-01-16 at 09:00 +, Mark McLoughlin wrote: Hi David, On Fri, 2009-01-16 at 01:13 +, David Lutterkort wrote: bond name=bond00 onboot=yes mode=active-backup slave device=eth0 primary=yes/ slave device=eth1/ /bond bridge name=br0 stp=off onboot=yes

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
On Fri, 2009-01-16 at 13:49 +, Daniel P. Berrange wrote: On Fri, Jan 16, 2009 at 09:00:16AM +, Mark McLoughlin wrote: The thing is, this has to integrate with existing configuration - there's no point in futzing about with ip link set eth0 ... if the user has configured eth0 with

[libvirt] RFC: configuring host interfaces with libvirt

2009-01-15 Thread David Lutterkort
For certain applications, we want libvirt to be able to configure host network interfaces in a variety of ways; currently, we are most interested in teaching libvirt how to set up ordinary ethernet interfaces, bridges, bonding and vlan's. Below is a high-level proposal of how that could be done.

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-15 Thread David Lutterkort
On Fri, 2009-01-16 at 01:26 +, John Levon wrote: On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: * Should this even be done as part of libvirt ? It seems like a very generic network config tool, and libvirt merely the conduit to exposing this through an API

Re: [libvirt] [PATCH 1/5] write pid file into stateDir

2008-12-12 Thread David Lutterkort
On Fri, 2008-12-12 at 19:26 +0100, Guido Günther wrote: diff --git a/src/qemu_driver.c b/src/qemu_driver.c index ca96223..a2e573e 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -220,6 +220,10 @@ qemudStartup(void) { if ((base = strdup (SYSCONF_DIR /libvirt)) == NULL)

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-12 Thread David Lutterkort
On Fri, 2008-12-12 at 19:27 +0100, Guido Günther wrote: diff --git a/src/qemu_driver.c b/src/qemu_driver.c index d8b87e4..57a396c 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -183,6 +183,46 @@ qemudAutostartConfigs(struct qemud_driver *driver) { } +static int

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-12 Thread David Lutterkort
On Fri, 2008-12-12 at 23:21 +0100, Guido Günther wrote: On Fri, Dec 12, 2008 at 08:30:26PM +, Daniel P. Berrange wrote: This is crying out for us to write a virASprintf() that explicitly always sets path = NULL upon failure. And then blacklist 'asprintf' in make syntax-check. Possible

Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-11 Thread David Lutterkort
65bee217eb80a3be39f80a7c229305180e5786c6 Mon Sep 17 00:00:00 2001 From: David Lutterkort lut...@redhat.com Date: Wed, 10 Dec 2008 18:34:39 -0800 Subject: [PATCH] virConnectGetHostname: return a fully qualified hostname Instead of doing the equivalent of 'hostname', do 'hostname --fqdn', i.e. try

Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-11 Thread David Lutterkort
On Thu, 2008-12-11 at 10:29 +, Daniel P. Berrange wrote: ACK to the rest of the patch - particularly the removal of all those duplicated impls ! I would have liked to have just one impl of virConnectGetHostname that does the whole gethostname dance, but each driver uses slightly different

[libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-10 Thread David Lutterkort
2001 From: David Lutterkort [EMAIL PROTECTED] Date: Wed, 10 Dec 2008 18:34:39 -0800 Subject: [PATCH] virConnectGetHostname: return a fully qualified hostname Instead of doing the equivalent of 'hostname', do 'hostname --fqdn', i.e. try to qualify the local host name by an additional call

[libvirt] ANNOUNCE: Ruby bindings for libvirt, version 0.1.0

2008-11-18 Thread David Lutterkort
I am pleased to announce the release of version 0.1.0 of the ruby-libvirt bindings. NEWS: * Add binding for virConnectFindStoragePoolSources (clalance) * Fix dom_migrate (clalance) * Add the MIGRATE_LIVE (enum virDomainMigrateFlags) flag * Slight improvements of the unit tests The main

Re: [libvirt] [PATCH]: Update ruby-libvirt migrate binding to use rb_scan_args

2008-10-28 Thread David Lutterkort
On Thu, 2008-10-23 at 12:04 +0200, Chris Lalancette wrote: It's really not a good idea to hand parse variable number of args to a ruby binding, like I implemented for the migrate method. Convert this to use rb_scan_args, which is the proper way to do it, and matches all of the other variable

Re: [libvirt] [PATCH]: Implement ruby-libvirt storage pool discovery binding

2008-10-28 Thread David Lutterkort
On Thu, 2008-10-23 at 12:04 +0200, Chris Lalancette wrote: Attached is a pretty simple patch to implement the virConnectFindStoragePoolSources() binding for ruby-libvirt.This capability went into libvirt-0.4.5, so any version of libvirt that has storage API support should have support for

Re: [libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread David Lutterkort
On Wed, 2008-08-27 at 12:03 +0100, Richard W.M. Jones wrote: Out of interest, do you ever hit the 16 bit limit in the size of compiled regexps? The bytecode used to represent compiled GNU regexps has (or perhaps had) a 16 bit limit in the jump offsets, which I hit a few years back. Had to

Re: [libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread David Lutterkort
On Wed, 2008-08-27 at 12:15 +0100, Richard W.M. Jones wrote: Dan pointed out that you have your own DFA implementation. Actually, libf does everything but matching - it does all the regexp calculations needed for the typechecker; for matching, I use GNU regex. David -- Libvir-list mailing

[libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-27 Thread David Lutterkort
On Wed, 2008-08-27 at 12:31 +0100, Daniel P. Berrange wrote: On Tue, Aug 26, 2008 at 09:40:41PM +, David Lutterkort wrote: On Tue, 2008-08-26 at 21:05 +0100, Daniel P. Berrange wrote: + let empty = [ label empty . del /[ \t]*\n/ ] Do you really care that empty entries show up

[libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-26 Thread David Lutterkort
On Tue, 2008-08-26 at 21:05 +0100, Daniel P. Berrange wrote: Now instead of telling people 'edit /etc/libvirt/libvirtd.conf and change listen_tls to 1, and auth_tls to sasl' we can say run # augtool EOF set /files/etc/libvirt/libvirtd.conf/listen_tls 1 set

[libvirt] Re: [augeas-devel] PATCH: Add a augeas lens for libvirtd.conf

2008-08-26 Thread David Lutterkort
On Tue, 2008-08-26 at 22:37 +0200, Raphaël Pinson wrote: Hi Daniel, On Tue, Aug 26, 2008 at 10:05 PM, Daniel P. Berrange [EMAIL PROTECTED] wrote: THis patch is intended to be committed to libvirt, so the config file rules are distributed alongside libvirt. I'm

Re: [libvirt] [PATCH]: ruby-libvirt migration fixes

2008-08-12 Thread David Lutterkort
On Fri, 2008-08-08 at 16:22 +0200, Chris Lalancette wrote: Jim Meyering wrote: diff -r c6a3e36cdf54 ext/libvirt/_libvirt.c --- a/ext/libvirt/_libvirt.c Thu Jul 17 15:24:26 2008 -0700 +++ b/ext/libvirt/_libvirt.c Fri Aug 08 06:04:56 2008 -0400 @@ -637,16 +637,51 @@ VALUE

Re: [libvirt] default networking issues

2008-08-04 Thread David Lutterkort
On Thu, 2008-07-31 at 09:55 +0100, Daniel P. Berrange wrote: The libvirt default networking capability will automatically setup the correct iptables rules to allow outbound NAT based connectivity for guest VMs. If this wasn't working there are two likely causes: - You run 'service iptables

Re: [libvirt] Re: ruby-libvirt on debian based systems

2008-07-21 Thread David Lutterkort
On Mon, 2008-07-21 at 16:48 +0200, Tom Verhaeghe wrote: Solved, i had to install libxen3-dev in order to make it work. I assume that that contains the pkgconfig for libvirt; the extconf.rb in ruby-libvirt needs that. With that ruby-libvirt works fine on Ubuntu ? I am glad to hear that. David

Re: [libvirt] [PATCH]: Add MIGRATE_LIVE definition to ruby-libvirt bindings

2008-07-17 Thread David Lutterkort
On Mon, 2008-07-07 at 17:28 +0200, Chris Lalancette wrote: Attached is a trivial patch to add the MIGRATE_LIVE flag into the ruby-libvirt bindings. Signed-off-by: Chris Lalancette [EMAIL PROTECTED] ACK .. Committed. (1) Do you need a new ruby-libvirt release for this ? (2) How far back has

Re: [libvirt] PATCH: Bash auto-completion for virsh

2008-07-15 Thread David Lutterkort
On Mon, 2008-07-14 at 11:57 +0100, Daniel P. Berrange wrote: Everyone[1] seems to be doing funky bash auto-completion for commands these days, so I thought I'd make a stab at doing something for virsh. I guess the completions I did previously[1] never were committed then - I'm using them quite

[libvirt] Re: [PATCH]: fix ruby-libvirt bindings when virConnectNum* returns 0

2008-06-20 Thread David Lutterkort
On Tue, 2008-06-17 at 11:16 +0200, Chris Lalancette wrote: Attached is a simple patch to fix a problem I ran into when using the ruby-libvirt bindings with libvirt 0.4.3. Basically, if you call any of the virConnectList* functions with a max of 0, it returns Invalid Arg. To get around this,

Re: [Libvir] RFC: safer memory allocation APIs with compile time checking

2008-04-28 Thread David Lutterkort
On Mon, 2008-04-28 at 13:38 +0100, Richard W.M. Jones wrote: On Mon, Apr 28, 2008 at 03:39:41AM -0400, Daniel Veillard wrote: Calling abort() in a library is a major NO-NO and one of the reasons I avoided glib in most of the code I developped. You just can't exit()/abort() from a

Re: [Libvir] RFC: safer memory allocation APIs with compile time checking

2008-04-28 Thread David Lutterkort
On Mon, 2008-04-28 at 20:16 +0100, Daniel P. Berrange wrote: I've just hacked up a similar approach to the one DBus uses to fail the 'nth' malloc Does that fail exactly the nth malloc or the nth malloc and after (or from nth malloc to (n+k)th malloc) ? The latter two are more realistic for an

Re: [Libvir] new release of ruby bindings

2008-04-15 Thread David Lutterkort
On Tue, 2008-04-15 at 11:37 -0700, Vadim Zaliva wrote: Since last official release of ruby bindings is causing nasty crash in error handling code, wouldn't it be good idea to issue new bugfix release. Yes, you are right. I am in the middle of getting 0.0.7 out .. should be available in a

[Libvir] ANNOUNCE: Ruby bindings for libvirt, version 0.0.7

2008-04-15 Thread David Lutterkort
I am pleased to announce the release of version 0.0.7 of the ruby-libvirt bindings. The main reason for this release is to fix a nasty crash caused by the use of virResetError. NEWS: * Binding for virDomainMigrate * Fix crash caused by using virResetError * More sensible message included

Re: [Libvir] crash on domain shutdown (via ruby)

2008-04-14 Thread David Lutterkort
On Mon, 2008-04-14 at 11:04 -0700, Vadim Zaliva wrote: On Apr 11, 2008, at 16:55, David Lutterkort wrote: Try commenting the call to virResetError in _libvirt.c in the ruby bindings out entirely, and see if you still get a crash. Yes, that helped. Do you plan to fix in in mercurial soon

Re: [Libvir] new ruby error handling

2008-04-11 Thread David Lutterkort
On Thu, 2008-04-10 at 23:28 -0700, Vadim Zaliva wrote: I have a dumb question about new error handling. What is the rationale for using 'libvirt_message' instead of 'message' in new Libvirt Ruby error classes? The 'message' in the exception is set, too, usually to the name of the libvirt

Re: [Libvir] crash on domain shutdown (via ruby)

2008-04-11 Thread David Lutterkort
On Fri, 2008-04-11 at 15:32 -0700, Vadim Zaliva wrote: I was too quick to speak. I got another crash: *** glibc detected *** ruby: double free or corruption (out): 0x08e78608 *** === Backtrace: = /lib/i686/nosegneg/libc.so.6[0x5166a6]

[Libvir] ANNOUNCE: Ruby bindings for libvirt, version 0.0.6

2008-04-10 Thread David Lutterkort
I'm pleased to announce version 0.0.6 of the Ruby bindings for libvirt. The most notable addition is support for the libvirt storage API. From the NEWS file: * Explicit free methods for various objects (based on a patch by Vadim Zaliva) * Make the FLAGS argument for various calls

Re: [Libvir] crash on domain shutdown (via ruby)

2008-04-10 Thread David Lutterkort
Hi Vadim, seems you're having the honor of testing the new improved error reporting in ruby-libvirt. The way virResetError was used was incorrect: it can only be called if virConnCopyLastError returned a positive result. For some reason, in your example virDomainShutdown fails, but the error

Re: [Libvir] patch: Domain.free() in Ruby bindings

2008-04-01 Thread David Lutterkort
On Tue, 2008-04-01 at 10:04 -0700, Vadim Zaliva wrote: Attached patch adds new method free() to Domain class. Invocation of this method calls virDomainFree(). After this call, all other calls to this domain object would fail. Thanks for the patch. I just committed a slight variation of

Re: [Libvir] uuid of newly created domain

2008-03-31 Thread David Lutterkort
On Sat, 2008-03-29 at 15:53 -0700, Vadim Zaliva wrote: I am running into interesting problem with UUID. I am using Ruby bindings, but I think the problem is not specific to Ruby. I am doing roughly the following: dom = c.define_domain_xml(xml) dom1 = c.ookup_domain_by_uuid(dom.uuid)

Re: [Libvir] ruby binding patch

2008-03-31 Thread David Lutterkort
On Fri, 2008-03-28 at 18:10 -0700, Vadim Zaliva wrote: Attached is a patch, implementing Domain.pin_vcpu method. I have tested it locally and it works. Here is my test code: Excellent. I just committed it with some minor modifications (use ALLOC/ALLOC_N instead of malloc, since the former

Re: [Libvir] building ruby bindings

2008-03-27 Thread David Lutterkort
On Wed, 2008-03-26 at 16:42 -0700, Vadim Zaliva wrote: On Mar 26, 2008, at 16:24, David Lutterkort wrote: This is very strange since the NORETURN macro is defined by ruby-devel (for gcc it amounts to __attribute__((noreturn)) ) It seems that gcc-4.1.1/gcc-4.1.2 don't like __attribute__

Re: [Libvir] building ruby bindings

2008-03-26 Thread David Lutterkort
On Wed, 2008-03-26 at 14:53 -0700, Vadim Zaliva wrote: The offending line is: NORETURN(static void vir_error(virConnectPtr conn, const char *fn)) { rb_raise(rb_eSystemCallError, libvir call %s failed, fn); } This is very strange since the NORETURN macro is defined by ruby-devel (for

Re: [Libvir] Bindings for ruby

2007-11-25 Thread David Lutterkort
On Sun, 2007-11-25 at 22:09 -0200, Grabber wrote: I'm using ruby bindings, anyone have informations about if it is the fully implementation? Have some knowed bugs to be solved? I wan't to help! The bindings are relatively new - if you find bugs or find things that aren't covered by them, post

[Libvir] ANNOUNCE: Ruby bindings for libvirt

2007-11-19 Thread David Lutterkort
I'm pleased to announce the availability of Ruby bindings for libvirt. The main site for them is http://libvirt.org/ruby API docs can be found at http://libvirt.org/ruby/api/index.html An initial release is at http://libvirt.org/ruby/download - the bindings are mostly complete, though there are

Re: [Libvir] [PATCH]: Add virNodeGetInfo to ruby bindings

2007-11-19 Thread David Lutterkort
On Mon, 2007-11-19 at 16:18 -0500, Chris Lalancette wrote: Attached is a patch to add the virNodeGetInfo() call to the Libvirt Ruby bindings. Although it is not technically a virConn* function, it acts like one since it uses the virConnectPtr structure, so I put it with those functions.

[Libvir] Bash completions for virsh

2007-10-25 Thread David Lutterkort
during completion. Could this be added to the libvirt CVS in some appropriate place ? The RPM should probably install it in /etc/bash_completion.d/ David #-*- mode: shell-script;-*- # Programmed completion for bash to use virsh # Copyright 2007 Red Hat Inc. # David Lutterkort [EMAIL PROTECTED

Re: [Libvir] Ruby bindings for libvirt

2007-08-30 Thread David Lutterkort
On Thu, 2007-08-30 at 17:32 +0800, Meng Kuan wrote: Hi, I am exploring the possibility of creating ruby bindings for libvirt. The only attempt I found after some searching is this: http://www.cs.ucsb.edu/~ckrintz/racelab/jisha/ Following the SWIG method as described in the above

Re: [Libvir] Re: PATCH 1/2: Qemu feature reporting

2007-07-27 Thread David Lutterkort
Patch updated with feedback (mostly formatting) David Index: libvirt/src/qemu_driver.c === --- libvirt.orig/src/qemu_driver.c 2007-07-27 10:07:17.0 -0700 +++ libvirt/src/qemu_driver.c 2007-07-27 10:13:03.0 -0700 @@

Re: [Libvir] Re: PATCH 2/2: Reporting of ACPI/APIC features for HVM Xen

2007-07-27 Thread David Lutterkort
Updated patch, incorporating feedback. Besides formatting, changes how apic is reported - and that's not pretty. As danpb found out, in cset 12423:ebed72718263 in xen-unstable, setting the apic was removed from tools/libxc/xc_hvm_build.c. In a surprising turn of events, cset 12569:9d6bc06919e0

[Libvir] Re: PATCH 1/2: Qemu feature reporting

2007-07-24 Thread David Lutterkort
This patch lets the qemu/kvm drivers report features for i686 and x86_64. The output is table-driven, like the rest of the capability generation. That should make it easy to report additional features for other arches (which I know zip about) David Index: libvirt/src/qemu_driver.c

[Libvir] Re: PATCH 2/2: Reporting of ACPI/APIC features for HVM Xen

2007-07-24 Thread David Lutterkort
For HVM Xen, state that ACPI and APIC can be turned on and off. David Index: libvirt/src/xen_internal.c === --- libvirt.orig/src/xen_internal.c 2007-07-24 09:42:16.0 -0700 +++ libvirt/src/xen_internal.c 2007-07-24

[Libvir] PATCH 0/2: Capabilities and features

2007-07-24 Thread David Lutterkort
Hi, these two patches extend the features libvirt reports in the capabilities XML; in particular, features are now reported for the QEMU driver, and features for both Xen and QEMU include information on ACPI/APIC support. Tools that rely on feature reporting, in general, need to know whether a

Re: [Libvir] OpenVZ XML format and VPS properties get/set interface [long]

2007-07-23 Thread David Lutterkort
On Tue, 2007-07-24 at 01:10 +0100, Daniel P. Berrange wrote: Yes, the networking XML is a missing bit of the websites. The following snippet illustrates all the important constructs: network namedefault/name bridge name=virbr0 / forward/ ip address=192.168.122.1

[Libvir] [PATCH] Document VIRSH_DEFAULT_CONNECT_URI

2007-07-20 Thread David Lutterkort
I keep forgetting the exact name of VIRSH_DEFAULT_CONNECT_URI - patch to add it to the man page attached. David Index: virsh.1 === RCS file: /data/cvs/libvirt/virsh.1,v retrieving revision 1.5 diff -u -r1.5 virsh.1 --- virsh.1 21 Jun

Re: [Libvir] Next features and target for development

2007-07-10 Thread David Lutterkort
On Tue, 2007-07-10 at 17:23 +0100, Daniel P. Berrange wrote: On Tue, Jul 10, 2007 at 05:12:38PM +0100, Richard W.M. Jones wrote: (2) Are the hosts compatible? (eg. microarchitecture, hypervisor, ... other sources of incompatibility?) Should we care at the API level or just report

  1   2   >