To check nonlocal_bind option for already created namespaces
Change-Id: Ic92b194445882b364564ff0139e2e2dcff9287d4
Closes-bug: 1632320
(cherry picked from commit dfbb81604d
)
This commit is contained in:
parent
8ff22b55cf
commit
e090d8e86f
@ -292,6 +292,9 @@ check_ns() {
|
||||
local ns=$(ip netns list | awk "/${OCF_RESKEY_ns}/ {print \$1}")
|
||||
ocf_log debug "${LH} recieved netns list: ${ns}"
|
||||
[ "${ns}" != "${OCF_RESKEY_ns}" ] && return $OCF_ERR_GENERIC
|
||||
if [ "`$RUN_IN_NS /sbin/sysctl net.ipv4.ip_nonlocal_bind --values`" -eq "0" ]; then
|
||||
ocf_run $RUN_IN_NS /sbin/sysctl -w net.ipv4.ip_nonlocal_bind=1
|
||||
fi
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user