mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-06 12:58:18 +03:00
* This should fix issues in HA environment, where we sometimes get duplicit virtual IPs
This commit is contained in:
parent
b153069059
commit
5788a2528e
@ -86,9 +86,21 @@ function virtualip() {
|
||||
# main
|
||||
#
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
LOCK_LOCATION=/var/lock/one
|
||||
else
|
||||
LOCK_LOCATION=$ONE_LOCATION/var/lock
|
||||
fi
|
||||
|
||||
LOCK_FILE="$LOCK_LOCATION/vip_sh"
|
||||
|
||||
ACTION="$1"
|
||||
shift
|
||||
|
||||
# Start of critical section (opens LOCK_FILE with fd 56)
|
||||
exec 56>$LOCK_FILE
|
||||
flock -w 60 56
|
||||
|
||||
# Process all parameters in the form of interface:IP
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user