cloudstack/scripts/vm/network
Wido den Hollander 26becef722
kvm: Aqcuire lock when running security group Python script
It could happen that when multiple instances are starting at the same
time on a KVM host the Agent spawns multiple instances of security_group.py
which both try to modify iptables/ebtables rules.

This fails with on of the two processes failing.

The instance is still started, but it doesn't have any IP connectivity due
to the failed programming of the security groups.

This modification lets the script aqcuire a exclusive lock on a file so that
only one instance of the scripts talks to iptables/ebtables at once.

Other instances of the script which start will poll every 500ms if they can
obtain the lock and otherwise execute anyway after 15 seconds.

The lock will be released as soon as the script exists, which is usually within
a few hundred ms.
2016-04-28 10:16:11 +02:00
..
vnet CLOUDSTACK-8252: Ignore VLAN 4095 which is n/a on linux 2015-05-22 13:26:06 +01:00
ovs-pvlan-cleanup.sh Implement PVLAN on Xen 2013-05-01 13:23:08 -07:00
ovs-pvlan-dhcp-host.sh PVLAN: Optimize pvlan scripts 2013-05-06 17:51:33 -07:00
ovs-pvlan-vm.sh CLOUDSTACK-2775: Fix trunk port is not 1 on some hosts 2013-06-04 11:32:23 -07:00
security_group.py kvm: Aqcuire lock when running security group Python script 2016-04-28 10:16:11 +02:00