Skip to content

utils_net: Replace dhclient with dhcpcd#4079

Closed
chloerh wants to merge 1 commit intoavocado-framework:masterfrom
chloerh:dhcpcd
Closed

utils_net: Replace dhclient with dhcpcd#4079
chloerh wants to merge 1 commit intoavocado-framework:masterfrom
chloerh:dhcpcd

Conversation

@chloerh
Copy link
Copy Markdown
Contributor

@chloerh chloerh commented Mar 13, 2025

Test result:

 (1/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.default: STARTED
 (1/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.default: PASS (66.31 s)
 (2/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.multiqueue.nwfilter: STARTED
 (2/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.multiqueue.nwfilter: PASS (68.87 s)
 (3/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.default: STARTED
 (3/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.default: PASS (73.19 s)
 (4/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.multiqueue.default: STARTED
 (4/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.multiqueue.default: PASS (75.30 s)
 (5/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.unprivileged.default: STARTED
 (5/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.unprivileged.default: PASS (76.15 s)
RESULTS    : PASS 5 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

Comment thread virttest/utils_net.py Outdated
cmd = (
'tmux -c "ip link set {1} nomaster; ip link delete {0}; pkill dhclient; '
'sleep 5; dhclient {1}"'.format(linux_bridge_name, iface_name)
'tmux -c "ip link set {1} nomaster; ip link delete {0}; dhcpcd -k {1}; '
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

”dhcpcd -k“ could be better, release process for all interfaces.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After discussion and research, we found if without $interface specified, it needs dhcpcd.service by manually started. And "dhcpcd -k" makes the serivce stopped, so need restart it again.
Furthermore, "dhcpcd $interface" can do simultaneous operation on different interfaces without the " already running - exiting" obstacles as "dhclient" cmd.
So using dhcpcd with $interface specified is a good usage choice. Let's keep it.
Thanks haijiao.

@chloerh chloerh marked this pull request as draft March 19, 2025 09:20
@chloerh
Copy link
Copy Markdown
Contributor Author

chloerh commented Mar 24, 2025

Update result

(1/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.default: STARTED
(1/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.default: PASS (55.98 s)
(2/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.multiqueue.nwfilter: STARTED
(2/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.linux_br.multiqueue.nwfilter: PASS (59.37 s)
(3/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.default: STARTED
(3/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.default: PASS (70.26 s)
(4/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.multiqueue.default: STARTED
(4/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.ovs_br.multiqueue.default: PASS (71.54 s)
(5/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.unprivileged.default: STARTED
(5/5) type_specific.local.virtual_network.connectivity_check.bridge_interface.unprivileged.default: PASS (69.73 s)
RESULTS : PASS 5 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@chloerh chloerh force-pushed the dhcpcd branch 2 times, most recently from ca95094 to ce56723 Compare March 25, 2025 09:14
Signed-off-by: Haijiao Zhao <haizhao@redhat.com>
@nanli1
Copy link
Copy Markdown
Contributor

nanli1 commented Jul 7, 2025

@chloerh hi haijiao , could this be megred?

@chloerh
Copy link
Copy Markdown
Contributor Author

chloerh commented Jul 30, 2025

@chloerh hi haijiao , could this be megred?

@nanli1 this pr will cause lots of failures (network connection break), maybe I should close this one and you guys could come up with better solutions

@chloerh chloerh closed this Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants