Eth hotplug check cable and routable before pinging (Bugfix)#1694
Merged
Eth hotplug check cable and routable before pinging (Bugfix)#1694
Conversation
57979a5 to
bc55608
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1694 +/- ##
==========================================
+ Coverage 48.99% 49.27% +0.27%
==========================================
Files 372 373 +1
Lines 40321 40472 +151
Branches 6811 6841 +30
==========================================
+ Hits 19757 19943 +186
+ Misses 19842 19803 -39
- Partials 722 726 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pieqq
requested changes
Jan 23, 2025
Collaborator
pieqq
left a comment
There was a problem hiding this comment.
Thanks for undertaking this big change!
I noticed you used your own retry mechanism for different functions in the script. I recommend using the retry decorator available in checkbox-support (see comments inline below).
efb2cf2 to
2c74500
Compare
stanley31huang
pushed a commit
that referenced
this pull request
Mar 28, 2025
Some of the machines (most of the IOT devices) can't ping after plugging the eth cable. Some of the machines (most of the PC devices) can ping after plugging the eth cable. In Desktop image, the networking renderer is Networkmanager. It will delay to turn down the eth interface and keep the ip (will not send req to DHCP to get the IP) when unpluggin the cable. - If the tester remove the cable and connect the cable immediatly, the test case can be pass (This is the work around method for the original script) - If the tester remove the cable, make sure the NetworkMangager trun the eth interface down, and reconnect the cable back. In this situation, some of the device will get the ip slowly and this test case will fail. But it really can get the original ip and available to ping. In Server/UC image, the networking renderer is systemd-networkd. It will immediatly turn the interface down when unplugging the cable. - If the tester remove the cable and reconnect the cable immedatly, this test case will still fail. But it really can get the original ip and available to ping. Changes Need to make sure the networking renderer actually not routable if remove the cable; it actually routable if reconnect the cable before ping. Flow 1. Check interface cable state (make sure this eth interface is existed) 2. Ask Tester to remove the eth cable 3. check cable is remove 4. check network renderer is Not routable 5. Ask Tester to reconnect the eth cable 6. check cable is connect 7. check network renderer is routable 8. Ping the gateway Fix #1197 Fix #1260
mreed8855
pushed a commit
that referenced
this pull request
Jul 31, 2025
Some of the machines (most of the IOT devices) can't ping after plugging the eth cable. Some of the machines (most of the PC devices) can ping after plugging the eth cable. In Desktop image, the networking renderer is Networkmanager. It will delay to turn down the eth interface and keep the ip (will not send req to DHCP to get the IP) when unpluggin the cable. - If the tester remove the cable and connect the cable immediatly, the test case can be pass (This is the work around method for the original script) - If the tester remove the cable, make sure the NetworkMangager trun the eth interface down, and reconnect the cable back. In this situation, some of the device will get the ip slowly and this test case will fail. But it really can get the original ip and available to ping. In Server/UC image, the networking renderer is systemd-networkd. It will immediatly turn the interface down when unplugging the cable. - If the tester remove the cable and reconnect the cable immedatly, this test case will still fail. But it really can get the original ip and available to ping. Changes Need to make sure the networking renderer actually not routable if remove the cable; it actually routable if reconnect the cable before ping. Flow 1. Check interface cable state (make sure this eth interface is existed) 2. Ask Tester to remove the eth cable 3. check cable is remove 4. check network renderer is Not routable 5. Ask Tester to reconnect the eth cable 6. check cable is connect 7. check network renderer is routable 8. Ping the gateway Fix #1197 Fix #1260
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some of the machines (most of the IOT devices) can't ping after plugging the eth cable.
Some of the machines (most of the PC devices) can ping after plugging the eth cable.
In Desktop image, the networking renderer is Networkmanager
It will delay to turn down the eth interface and keep the ip (will not send req to DHCP to get the IP) when unpluggin the cable.
In Server/UC image, the networking renderer is systemd-networkd
It will immediatly turn the interface down when unplugging the cable.
Change
Need to make sure the networking renderer actually not routable if remove the cable; it actually routable if reconnect the cable before ping.
Flow
1, Check interface cable state (make sure this eth interface is existed)
2. Ask Tester to remove the eth cable
3. check cable is remove
4. check network renderer is Not routable
5. Ask Tester to reconnect the eth cable
6. check cable is connect
7. check network renderer is routable
8. Ping the gateway
Resolved issues
#1197 ethernet/hotplug-{{ interface }} fails without potential latency
#1260 ethernet/hotplug-.* failed due to unable to ping the host
Tests
PC Desktop image with NetworkManager: https://certification.canonical.com/hardware/202411-35941/submission/409179/
IOT UC image with systemd-networkd: https://certification.canonical.com/hardware/202307-31859/submission/409181/