[libvirt] Add hook for network update event

kay kay.diam at gmail.com
Mon Jun 22 10:23:18 UTC 2015


Hey guys,

This is duplicate from Bugzilla
(https://bugzilla.redhat.com/show_bug.cgi?id=1181539), but I would
like to ask you if my patch looks good.

"virsh net-update" starts iptables rules reload for NAT network
system. This event doesn't start network hooks, so all previous custom
iptables rules become unavailable.

How reproducible:
Add "/etc/libvirt/hooks/network" with:
-------------------------------------------
#!/bin/bash
echo "`date` $0 $@" >> /var/log/libvirt.log
-------------------------------------------
Restart libvirt and run virsh net-update command:

virsh net-update default modify ip-dhcp-host --live --config "<host
mac='52:54:00:97:eb:95' name='test' ip='192.168.122.253'/>"

Actual results:
/var/log/libvirt.log log file doesn't contain events from virsh
net-update command.

Expected results:
/var/log/libvirt.log log file should contain event.

Additional info:
This bug brakes iptables hooks hack for FORWARD chain with NAT network.

Patch file is attached. It was tested with libvirt 1.2.15
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt_bridge_hook.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150622/950ee186/attachment-0001.bin>


More information about the libvir-list mailing list