nova-compute doesn't work well with libvirt 1.2.7 and qemu 2.1.0

Bug #1360115 reported by David Hill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Hello,

    I have successfully compiled libvirt 1.2.7 and qemu 2.1.0 but had some troubles with nova-compute. It appears like libvirt is throwing back an error if a nwfilter is already present.

Here is my debug log:
2014-08-22 08:22:25.032 15354 DEBUG nova.virt.libvirt.firewall [req-0959ec86-3939-4e38-9505-48494b44a9fa f1d21892f9a0413c9437b6771e4290ce 9cad53a0432d4164837b8c0b35d91307] nwfilterDefineXML may have failed with (operation failed: filter 'nova-nodhcp' already exists with uuid 59970732-ca52-4521-ba0c-d001049d8460)! _define_filter /usr/lib/python2.6/site-packages/nova/virt/libvirt/firewall.py:239
2014-08-22 08:22:25.033 15354 DEBUG nova.virt.libvirt.firewall [req-0959ec86-3939-4e38-9505-48494b44a9fa f1d21892f9a0413c9437b6771e4290ce 9cad53a0432d4164837b8c0b35d91307] nwfilterDefineXML may have failed with (operation failed: filter 'nova-base' already exists with uuid b5aa80ad-ea4a-4633-84ac-442c9270a143)! _define_filter /usr/lib/python2.6/site-packages/nova/virt/libvirt/firewall.py:239
2014-08-22 08:22:25.034 15354 DEBUG nova.virt.libvirt.firewall [req-0959ec86-3939-4e38-9505-48494b44a9fa f1d21892f9a0413c9437b6771e4290ce 9cad53a0432d4164837b8c0b35d91307] nwfilterDefineXML may have failed with (operation failed: filter 'nova-vpn' already exists with uuid b61eb708-a9a5-4a16-8787-cdc58310babc)! _define_filter /usr/lib/python2.6/site-packages/nova/virt/libvirt/firewall.py:239

Here is the original function:
    def _define_filter(self, xml):
        if callable(xml):
            xml = xml()
        self._conn.nwfilterDefineXML(xml)

And here is the "patched" function":
    def _define_filter(self, xml):
        if callable(xml):
            xml = xml()
        try:
            self._conn.nwfilterDefineXML(xml)
        except Exception, e:
            LOG.debug(_('nwfilterDefineXML may have failed with (%s)!'), e)

I'm not a python expert but I think that patch could be adapted to raise an error ONLY if the nwfilter rule doesn't already exist.

Dave

Revision history for this message
John Vrbanac (john.vrbanac) wrote :

Looks like this was misassigned to the Barbican project. Reassigning to nova.

affects: barbican → nova
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.