mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix adding customized public/private nics for kvm
This commit is contained in:
parent
b13f5574ec
commit
72e82c8c8c
@ -26,8 +26,8 @@ echo CLASSPATH to run the agent: "$CLASSPATH"
|
|||||||
export PATH=/sbin:/usr/sbin:"$PATH"
|
export PATH=/sbin:/usr/sbin:"$PATH"
|
||||||
SERVICEARGS=
|
SERVICEARGS=
|
||||||
for x in private public ; do
|
for x in private public ; do
|
||||||
configuration=`grep -q "^$x.network.device" "@AGENTSYSCONFDIR@"/agent.properties || true`
|
configuration=`grep -q "^$x.network.device" "@AGENTSYSCONFDIR@"/agent.properties`
|
||||||
if [ -n "$CONFIGURATION" ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
echo "Using manually-configured network device $CONFIGURATION"
|
echo "Using manually-configured network device $CONFIGURATION"
|
||||||
else
|
else
|
||||||
defaultroute=`ip route | grep ^default | cut -d ' ' -f 5`
|
defaultroute=`ip route | grep ^default | cut -d ' ' -f 5`
|
||||||
|
|||||||
@ -972,9 +972,9 @@ def setup_agent_config(configfile, host, zone, pod, cluster, guid, pubNic, prvNi
|
|||||||
if prvNic == None or not device_exist(prvNic):
|
if prvNic == None or not device_exist(prvNic):
|
||||||
confopts["private.network.device"] = pubNic
|
confopts["private.network.device"] = pubNic
|
||||||
|
|
||||||
if prvNic != None and device_exits(prvNic):
|
if prvNic != None and device_exist(prvNic):
|
||||||
confopts["private.network.device"] = prvNic
|
confopts["private.network.device"] = prvNic
|
||||||
if pubNic == None or not device_exits(pubNic):
|
if pubNic == None or not device_exist(pubNic):
|
||||||
confopts["public.network.device"] = prvNic
|
confopts["public.network.device"] = prvNic
|
||||||
|
|
||||||
stderr("Querying %s for zones and pods",host)
|
stderr("Querying %s for zones and pods",host)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user