summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Ilyin <dilyin@mirantis.com>2017-01-11 16:43:29 +0300
committerDmitry Ilyin <dilyin@mirantis.com>2017-01-11 16:45:53 +0300
commit5ea2e3cc7504eb8386b266ad1227b6d1b4707e42 (patch)
tree4edcbd44b96c63b91cb8946ce2a6c7c5eee336fd
parent8ed8caf30a2c9ef63bfbb5f653271cd77eb5f823 (diff)
Add check if there is no default gateway
Do not try to return the default gateway data if there is no default gateway. Change-Id: I68b62b12cce2730ece968cede98b8f1597281fc5 Closes-Bug: 1655595
Notes
Notes (review): Code-Review+2: Vladimir Sharshov <vsharshov@mirantis.com> Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Alexander Kislitsky <akislitsky@mirantis.com> Workflow+1: Vladimir Sharshov <vsharshov@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 17 Jan 2017 12:01:31 +0000 Reviewed-on: https://review.openstack.org/418940 Project: openstack/fuel-nailgun-agent Branch: refs/heads/master
-rwxr-xr-xagent8
1 files changed, 5 insertions, 3 deletions
diff --git a/agent b/agent
index b713b7b..1ab1499 100755
--- a/agent
+++ b/agent
@@ -333,9 +333,11 @@ class NodeAgent
333 iface = $2 333 iface = $2
334 end 334 end
335 result = _get_all_interfaces_info 335 result = _get_all_interfaces_info
336 result[:default_gateway] = gw 336 if gw and iface
337 result[:default_interface] = iface 337 result[:default_gateway] = gw
338 result[:mac] = @facter["macaddress_#{iface.gsub('-', '_')}"].upcase 338 result[:default_interface] = iface
339 result[:mac] = @facter["macaddress_#{iface.gsub('-', '_')}"].upcase
340 end
339 result 341 result
340 end 342 end
341 343