Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: wait for interfaces online #19881

Closed
wants to merge 1 commit into from

Conversation

yuwata
Copy link
Member

@yuwata yuwata commented Jun 10, 2021

Prompted by #19811 (comment).

@yuwata yuwata added the tests label Jun 10, 2021
@yuwata
Copy link
Member Author

yuwata commented Jun 10, 2021

(I do not check this work or not.)

cc @bluca.

Copy link
Member

@bluca bluca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good in principle, given the failure does not happen often let's see if this helps

@bluca bluca added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Jun 10, 2021
@bluca
Copy link
Member

bluca commented Jun 10, 2021

SemaphoreCI's unhappy:

======================================================================
ERROR: test_bridge_init (__main__.BridgeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest-lxc.rk05cu7n/downtmp/build.0dp/src/test/networkd-test.py", line 230, in setUp
    subprocess.check_call([NETWORKD_WAIT_ONLINE, '--timeout=5',
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--timeout=5', '--interface', 'mybridge', '--interface', 'port1', '--interface', 'port2']' returned non-zero exit status 1.

======================================================================
ERROR: test_bridge_port_priority (__main__.BridgeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest-lxc.rk05cu7n/downtmp/build.0dp/src/test/networkd-test.py", line 230, in setUp
    subprocess.check_call([NETWORKD_WAIT_ONLINE, '--timeout=5',
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--timeout=5', '--interface', 'mybridge', '--interface', 'port1', '--interface', 'port2']' returned non-zero exit status 1.

======================================================================
ERROR: test_bridge_port_property (__main__.BridgeTest)
Test the "[Bridge]" section keys
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest-lxc.rk05cu7n/downtmp/build.0dp/src/test/networkd-test.py", line 230, in setUp
    subprocess.check_call([NETWORKD_WAIT_ONLINE, '--timeout=5',
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--timeout=5', '--interface', 'mybridge', '--interface', 'port1', '--interface', 'port2']' returned non-zero exit status 1.

======================================================================
ERROR: test_coldplug_dhcp_ip4_only (__main__.DnsmasqClientTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest-lxc.rk05cu7n/downtmp/build.0dp/src/test/networkd-test.py", line 477, in test_coldplug_dhcp_ip4_only
    self.do_test(coldplug=True, ipv6=False, dhcp_mode='ipv4',
  File "/tmp/autopkgtest-lxc.rk05cu7n/downtmp/build.0dp/src/test/networkd-test.py", line 392, in do_test
    subprocess.check_call([NETWORKD_WAIT_ONLINE, '--interface',
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--interface', 'test_eth42', '--timeout=15']' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 35 tests in 162.406s

FAILED (errors=4, skipped=2)

@bluca bluca added ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Jun 10, 2021
@yuwata
Copy link
Member Author

yuwata commented Jun 10, 2021

Now, semaphore is green. Setting the green label again.

@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR labels Jun 10, 2021
@keszybz
Copy link
Member

keszybz commented Jun 10, 2021

bionic-s390x: looks possibly related:

Verify link states with Unmanaged= settings, cold-plug. ... ok

======================================================================
ERROR: test_bridge_init (__main__.BridgeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.KYHTbl/build.CRU/systemd/test/networkd-test.py", line 233, in setUp
    '--interface', 'port2'])
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--interface', 'mybridge', '--interface', 'port1', '--interface', 'port2']' returned non-zero exit status 1.

======================================================================
ERROR: test_bridge_port_priority (__main__.BridgeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.KYHTbl/build.CRU/systemd/test/networkd-test.py", line 233, in setUp
    '--interface', 'port2'])
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--interface', 'mybridge', '--interface', 'port1', '--interface', 'port2']' returned non-zero exit status 1.

======================================================================
ERROR: test_bridge_port_priority_set_zero (__main__.BridgeTest)
It should be possible to set the bridge port priority to 0
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.KYHTbl/build.CRU/systemd/test/networkd-test.py", line 233, in setUp
    '--interface', 'port2'])
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--interface', 'mybridge', '--interface', 'port1', '--interface', 'port2']' returned non-zero exit status 1.

======================================================================
ERROR: test_bridge_port_property (__main__.BridgeTest)
Test the "[Bridge]" section keys
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.KYHTbl/build.CRU/systemd/test/networkd-test.py", line 233, in setUp
    '--interface', 'port2'])
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--interface', 'mybridge', '--interface', 'port1', '--interface', 'port2']' returned non-zero exit status 1.

======================================================================
ERROR: test_coldplug_dhcp_ip4_only (__main__.DnsmasqClientTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.KYHTbl/build.CRU/systemd/test/networkd-test.py", line 478, in test_coldplug_dhcp_ip4_only
    online_timeout=15)
  File "/tmp/autopkgtest.KYHTbl/build.CRU/systemd/test/networkd-test.py", line 393, in do_test
    self.iface, '--timeout=%i' % online_timeout])
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/lib/systemd/systemd-networkd-wait-online', '--interface', 'test_eth42', '--timeout=15']' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 35 tests in 629.189s

FAILED (errors=5, skipped=2)
autopkgtest [11:54:35]: test networkd-test.py: -----------------------]
networkd-test.py     FAIL non-zero exit status 1

About the commit message: please say why the change is done, instead of just linking to an online discussion.

@keszybz keszybz added ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Jun 10, 2021
@yuwata
Copy link
Member Author

yuwata commented Jun 10, 2021

@bluca How can I get the journal of the failed CI results??

@bluca
Copy link
Member

bluca commented Jun 10, 2021

it's documented in the README in the test/ subfolder - get the link from the CI status here, and change log.gz with artifacts.tar.gz
in this case:

https://autopkgtest.ubuntu.com/results/autopkgtest-bionic-upstream-systemd-ci-systemd-ci/bionic/s390x/s/systemd-upstream/20210610_124704_acadd@/artifacts.tar.gz

@yuwata
Copy link
Member Author

yuwata commented Jun 10, 2021

@bluca Oh, it is documented!? I did not know that. Thanks!

@yuwata
Copy link
Member Author

yuwata commented Jun 10, 2021

Hmm, it does not contain anything about networkd-test.py failure...

@bluca
Copy link
Member

bluca commented Jun 10, 2021

Ah yes you are indeed right - that's because we don't collect any info about that test. For the "upstream" suite for example, we explicitly extract the journal files (you can see them in the "artifacts" directory of the tarball".

test/networkd-test.py would need to change to collect what needs to be collected, and copy it to $AUTOPKGTEST_ARTIFACTS if it is set (then it gets collected by autopkgtest automatically, and included in the tarball).

@yuwata
Copy link
Member Author

yuwata commented Jun 10, 2021

Hmm, I noticed that the issue can be found only on s390x... So, the issue is not a simple(?) timing issue.

@yuwata
Copy link
Member Author

yuwata commented Jun 11, 2021

Hmm,
#19815 -- ok
#19837 -- failed with some infra issue.
#19835 -- failed with networkd-test.py.

Is this a kernel issue??

@bluca bluca added this to the v249 milestone Jun 11, 2021
@yuwata yuwata closed this Jun 13, 2021
@yuwata yuwata deleted the test-network-wait-online branch June 13, 2021 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR tests
Development

Successfully merging this pull request may close these issues.

None yet

3 participants