Net probe fails with timeout on check_dhcp request with a lot of iface and vlans
Change-Id: I49610410eb414bea43e3cb3dc62b043bee9d5427 Solution: Provide interface to limit time waiting for response and times request is repeated
This commit is contained in:
parent
65f8f5d09e
commit
dcbea32b06
|
@ -4,7 +4,7 @@ metadata :name => "Network Probe Agent",
|
||||||
:license => "MIT",
|
:license => "MIT",
|
||||||
:version => "0.1",
|
:version => "0.1",
|
||||||
:url => "http://mirantis.com",
|
:url => "http://mirantis.com",
|
||||||
:timeout => 40
|
:timeout => 120
|
||||||
|
|
||||||
action "start_frame_listeners", :description => "Starts catching packets on interfaces" do
|
action "start_frame_listeners", :description => "Starts catching packets on interfaces" do
|
||||||
display :always
|
display :always
|
||||||
|
|
|
@ -44,8 +44,9 @@ module MCollective
|
||||||
action "dhcp_discover" do
|
action "dhcp_discover" do
|
||||||
interfaces = request[:interfaces][get_uid]
|
interfaces = request[:interfaces][get_uid]
|
||||||
format = request.data[:format] || "json"
|
format = request.data[:format] || "json"
|
||||||
timeout = request.data[:timeout] || 7
|
timeout = request.data[:timeout] || 2
|
||||||
cmd = "dhcpcheck vlans '#{interfaces}' --timeout=#{timeout} --format=#{format} "
|
repeat = request.data[:repeat] || 1
|
||||||
|
cmd = "dhcpcheck vlans '#{interfaces}' --timeout=#{timeout} --format=#{format} --repeat=#{repeat} "
|
||||||
reply[:status] = run(cmd, :stdout => :out, :stderr => :err)
|
reply[:status] = run(cmd, :stdout => :out, :stderr => :err)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue