Skip to content

Commit 72e82c8

Browse files
committed
fix adding customized public/private nics for kvm
1 parent b13f557 commit 72e82c8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

agent/libexec/agent-runner.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ echo CLASSPATH to run the agent: "$CLASSPATH"
2626
export PATH=/sbin:/usr/sbin:"$PATH"
2727
SERVICEARGS=
2828
for x in private public ; do
29-
configuration=`grep -q "^$x.network.device" "@AGENTSYSCONFDIR@"/agent.properties || true`
30-
if [ -n "$CONFIGURATION" ] ; then
29+
configuration=`grep -q "^$x.network.device" "@AGENTSYSCONFDIR@"/agent.properties`
30+
if [ $? -eq 0 ] ; then
3131
echo "Using manually-configured network device $CONFIGURATION"
3232
else
3333
defaultroute=`ip route | grep ^default | cut -d ' ' -f 5`

python/lib/cloud_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,9 +972,9 @@ def setup_agent_config(configfile, host, zone, pod, cluster, guid, pubNic, prvNi
972972
if prvNic == None or not device_exist(prvNic):
973973
confopts["private.network.device"] = pubNic
974974

975-
if prvNic != None and device_exits(prvNic):
975+
if prvNic != None and device_exist(prvNic):
976976
confopts["private.network.device"] = prvNic
977-
if pubNic == None or not device_exits(pubNic):
977+
if pubNic == None or not device_exist(pubNic):
978978
confopts["public.network.device"] = prvNic
979979

980980
stderr("Querying %s for zones and pods",host)

0 commit comments

Comments
 (0)