Merge "Changing arping command execute to accept 1 as extra OK code"
This commit is contained in:
commit
b51c5635ab
|
@ -1023,7 +1023,10 @@ def _arping(ns_name, iface_name, address, count, log_exception):
|
|||
'-w', 1.5 * count, address]
|
||||
try:
|
||||
ip_wrapper = IPWrapper(namespace=ns_name)
|
||||
ip_wrapper.netns.execute(arping_cmd, check_exit_code=True)
|
||||
# Since arping is used to send gratuitous ARP, a response is not
|
||||
# expected. In some cases (no response) and with some platforms
|
||||
# (>=Ubuntu 14.04), arping exit code can be 1.
|
||||
ip_wrapper.netns.execute(arping_cmd, extra_ok_codes=[1])
|
||||
except Exception as exc:
|
||||
msg = _("Failed sending gratuitous ARP "
|
||||
"to %(addr)s on %(iface)s in namespace %(ns)s: %(err)s")
|
||||
|
|
|
@ -1357,7 +1357,7 @@ class TestArpPing(TestIPCmdBase):
|
|||
'-w', mock.ANY,
|
||||
address]
|
||||
ip_wrapper.netns.execute.assert_any_call(arping_cmd,
|
||||
check_exit_code=True)
|
||||
extra_ok_codes=[1])
|
||||
|
||||
@mock.patch('eventlet.spawn_n')
|
||||
def test_no_ipv6_addr_notif(self, spawn_n):
|
||||
|
|
Loading…
Reference in New Issue