Reviewed: https://review.opendev.org/c/openstack/neutron/+/963921 Committed: https://opendev.org/openstack/neutron/commit/f5a6cd144f817da40c3981165538dcb941dc5277 Submitter: "Zuul (22348)" Branch: master
commit f5a6cd144f817da40c3981165538dcb941dc5277 Author: Rodolfo Alonso Hernandez <[email protected]> Date: Tue Oct 14 06:50:04 2025 +0000 [UT] Allow any call order in ``test_send_ipv4_addr_adv_notif`` The test ``test_send_ipv4_addr_adv_notif`` is failing because it is expected to find a list of calls in the same order. In [1], the sleep time was reduced to 0 in order to immediately execute the expected calls, avoiding the interference of other parallel executions. However this is not always happening. This patch allows to check the expected calls in any order, that allows the presence of other commands in the call list. [1]https://review.opendev.org/c/openstack/neutron/+/939435 Closes-Bug: #2095044 Signed-off-by: Rodolfo Alonso Hernandez <[email protected]> Change-Id: I7eaf374a84cbb24d6e0081080624589920629197 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/2095044 Title: test_ip_lib calls to sudo and fails (sometimes?) Status in neutron: Fix Released Bug description: https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_31c/939272/1/check/openstack- tox-cover/31c980b/testr_results.html ft1.2: neutron.tests.unit.agent.linux.test_ip_lib.TestArpPing.test_send_ipv4_addr_adv_notiftesttools.testresult.real._StringException: pythonlogging:'': {{{ ERROR [neutron.agent.linux.external_process] haproxy for MetadataPath with uuid host_metadata_proxy not found. The process should not have died WARNING [oslo.privsep.daemon] privsep log: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper WARNING [oslo.privsep.daemon] privsep log: sudo: a password is required CRITICAL [oslo.privsep.daemon] privsep helper command exited non-zero (1) ERROR [neutron.agent.linux.external_process] Could not delete file /tmp/tmplxihnf9x/tmpy45pwqr6/external/pids/host_metadata_proxy.pid.haproxy, haproxy could fail to start. Exception: privsep helper command exited non-zero (1) }}} Traceback (most recent call last): File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 178, in func return f(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/unittest/mock.py", line 1390, in patched return func(*newargs, **newkeywargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/agent/linux/test_ip_lib.py", line 1093, in test_send_ipv4_addr_adv_notif mIPWrapper.assert_has_calls([ File "/usr/lib/python3.12/unittest/mock.py", line 981, in assert_has_calls raise AssertionError( AssertionError: Calls not found. Expected: [call(namespace=sentinel.ns_name), call().netns.execute(<ANY>, extra_ok_codes=[1], privsep_exec=True), call().netns.execute(<ANY>, extra_ok_codes=[1], privsep_exec=True), call().netns.execute(<ANY>, extra_ok_codes=[1, 2], privsep_exec=True), call().netns.execute(<ANY>, extra_ok_codes=[1, 2], privsep_exec=True), call().netns.execute(<ANY>, extra_ok_codes=[1, 2], privsep_exec=True), call().netns.execute(<ANY>, extra_ok_codes=[1, 2], privsep_exec=True)] Actual: [call(namespace=sentinel.ns_name), call().netns.execute(['arping', '-U', '-I', sentinel.iface_name, '-c', 1, '-w', 2, '20.0.0.1'], extra_ok_codes=[1], privsep_exec=True), call().netns.execute(['arping', '-A', '-I', sentinel.iface_name, '-c', 1, '-w', 2, '20.0.0.1'], extra_ok_codes=[1], privsep_exec=True), call(namespace=None), call().netns.execute(['haproxy', '-f', '/fake/host_metadata_proxy.haproxy.conf', '-p', '/tmp/tmplxihnf9x/tmpy45pwqr6/external/pids/host_metadata_proxy.pid.haproxy'], addl_env={'PROCESS_TAG': 'haproxy-host_metadata_proxy'}, run_as_root=True), call().netns.execute(['arping', '-U', '-I', sentinel.iface_name, '-c', 1, '-w', 2, '20.0.0.1'], extra_ok_codes=[1, 2], privsep_exec=True), call().netns.execute(['arping', '-A', '-I', sentinel.iface_name, '-c', 1, '-w', 2, '20.0.0.1'], extra_ok_codes=[1, 2], privsep_exec=True), call().netns.execute(['arping', '-U', '-I', sentinel.iface_name, '-c', 1, '-w', 2, '20.0.0.1'], extra_ok_codes=[1, 2], privsep_exec=True), call().netns.execute(['arping', '-A', '-I', sentinel.iface_name, '-c', 1, '-w', 2, '20.0.0.1'], extra_ok_codes=[1, 2], privsep_exec=True)] Also noticed unit test runs calling to sudo on my Mac when I ran the suite yesterday. Probably related. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2095044/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

