People,

in the following code the baremetal-vr.py configuration script is started
unconditionally, this means it will be started on ssvm and cpvm as well.
but also on virtual routervms;


CMDLINE=$(cat /var/cache/cloud/cmdline)
router=$(echo "$CMDLINE" | grep -o  type=router)
vpcrouter=$(echo "$CMDLINE" | grep -o  type=vpcrouter)

if [ "$router" != "" ] ||  [ "$vpcrouter" != "" ]
then
   echo 1000000 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
   echo 1000000 > /proc/sys/net/netfilter/nf_conntrack_max
   echo 1000000 > /proc/sys/net/nf_conntrack_max
fi

python /opt/cloud/bin/baremetal-vr.py &


Does it make sense to at least move it inside the if block above so it is
only started on routers?
Or does anybody know how to distinguish that we are running on baremetal
and guard for that condition?

-- 
Daan

Reply via email to