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

[dhcp_relay] Only check parent dhcrelay process in dhcprelayd #20551

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

yaqiangz
Copy link
Contributor

@yaqiangz yaqiangz commented Oct 21, 2024

Why I did it

In master and 202405 branch, dhcp_relay container was updated to Bookworm, hence isc-dhcp-relay was updated from 4.4.1 to 4.4.3. In this version, isc-dhcp-relay would create child process to proceed when there is network io, hence dhcprelayd would get duplicated dhcrelay process when checking

2024 Oct  2 03:28:58.972742 sonic ERR dhcp_relay#dhcprelayd: Running processes is not as expected! Runnning: [['/usr/sbin/dhcrelay', '-d', '-m', 'discard', '-a', '%h:%p', '%P', '--name-alias-map-file', '/tmp/port-name-alias-map.txt', '-id', 'Vlan1000', '-iu', 'PortChannel101', '-iu', 'PortChannel102', '-iu', 'PortChannel103', '-iu', 'PortChannel104', '192.0.0.1', '192.0.0.2', '192.0.0.3', '192.0.0.4', '192.0.0.5', '192.0.0.6', '192.0.0.7', '192.0.0.8', '192.0.0.9', '192.0.0.10', '192.0.0.11', '192.0.0.12', '192.0.0.13', '192.0.0.14', '192.0.0.15', '192.0.0.16', '192.0.0.17', '192.0.0.18', '192.0.0.19', '192.0.0.20', '192.0.0.21', '192.0.0.22', '192.0.0.23', '192.0.0.24', '192.0.0.25', '192.0.0.26', '192.0.0.27', '192.0.0.28', '192.0.0.29', '192.0.0.30', '192.0.0.31', '192.0.0.32', '192.0.0.33', '192.0.0.34', '192.0.0.35', '192.0.0.36', '192.0.0.37', '192.0.0.38', '192.0.0.39', '192.0.0.40', '192.0.0.41', '192.0.0.42', '192.0.0.43', '192.0.0.44', '192.0.0.45', '192.0.0.46', '192.0.0.47', '192.0.0.48'], ['/usr/sbin/dhcrelay', '-d', '-m', 'discard', '-a', '%h:%p', '%P', '--name-alias-map-file', '/tmp/port-name-alias-map.txt', '-id', 'Vlan1000', '-iu', 'PortChannel101', '-iu', 'PortChannel102', '-iu', 'PortChannel103', '-iu', 'PortChannel104', '192.0.0.1', '192.0.0.2', '192.0.0.3', '192.0.0.4', '192.0.0.5', '192.0.0.6', '192.0.0.7', '192.0.0.8', '192.0.0.9', '192.0.0.10', '192.0.0.11', '192.0.0.12', '192.0.0.13', '192.0.0.14', '192.0.0.15', '192.0.0.16', '192.0.0.17', '192.0.0.18', '192.0.0.19', '192.0.0.20', '192.0.0.21', '192.0.0.22', '192.0.0.23', '192.0.0.24', '192.0.0.25', '192.0.0.26', '192.0.0.27', '192.0.0.28', '192.0.0.29', '192.0.0.30', '192.0.0.31', '192.0.0.32', '192.0.0.33', '192.0.0.34', '192.0.0.35', '192.0.0.36', '192.0.0.37', '192.0.0.38', '192.0.0.39', '192.0.0.40', '192.0.0.41', '192.0.0.42', '192.0.0.43', '192.0.0.44', '192.0.0.45', '192.0.0.46', '192.0.0.47', '192.0.0.48']]. Expected: [['/usr/sbin/dhcrelay', '-d', '-m', 'discard', '-a', '%h:%p', '%P', '--name-alias-map-file', '/tmp/port-name-alias-map.txt', '-id', 'Vlan1000', '-iu', 'PortChannel101', '-iu', 'PortChannel102', '-iu', 'PortChannel103', '-iu', 'PortChannel104', '192.0.0.1', '192.0.0.2', '192.0.0.3', '192.0.0.4', '192.0.0.5', '192.0.0.6', '192.0.0.7', '192.0.0.8', '192.0.0.9', '192.0.0.10', '192.0.0.11', '192.0.0.12', '192.0.0.13', '192.0.0.14', '192.0.0.15', '192.0.0.16', '192.0.0.17', '192.0.0.18', '192.0.0.19', '192.0.0.20', '192.0.0.21', '192.0.0.22', '192.0.0.23', '192.0.0.24', '192.0.0.25', '192.0.0.26', '192.0.0.27', '192.0.0.28', '192.0.0.29', '192.0.0.30', '192.0.0.31', '192.0.0.32', '192.0.0.33', '192.0.0.34', '192.0.0.35', '192.0.0.36', '192.0.0.37', '192.0.0.38', '192.0.0.39', '192.0.0.40', '192.0.0.41', '192.0.0.42', '192.0.0.43', '192.0.0.44', '192.0.0.45', '192.0.0.46', '192.0.0.47', '192.0.0.48']]
Work item tracking
  • Microsoft ADO (number only): 29969786

How I did it

Only check parent dhcp_relay process

How to verify it

  1. UT
  2. Run https://github.com/sonic-net/sonic-mgmt/blob/master/tests/dhcp_relay/test_dhcp_relay_stress.py with latest dhcprelayd

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • 202405

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@yaqiangz
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yaqiangz yaqiangz marked this pull request as ready for review October 22, 2024 06:20
@yaqiangz yaqiangz requested a review from lguohan as a code owner October 22, 2024 06:20
@yaqiangz yaqiangz requested a review from Blueve October 22, 2024 07:36
@yaqiangz
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage (Test onboarding dualtor testcases by Elastictest - optional)

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage (Test onboarding dualtor testcases by Elastictest - optional)

Copy link

No pipelines are associated with this pull request.

@yaqiangz
Copy link
Contributor Author

Hi @yxieca could you please help to merge this PR?

@yxieca yxieca merged commit 0e419bb into sonic-net:master Oct 25, 2024
21 of 22 checks passed
@yaqiangz
Copy link
Contributor Author

Hi @bingwang-ms could you please help to approve the backport request?

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Oct 25, 2024
…net#20551)

Why I did it
In master and 202405 branch, dhcp_relay container was updated to Bookworm, hence isc-dhcp-relay was updated from 4.4.1 to 4.4.3. In this version, isc-dhcp-relay would create child process to proceed when there is network io, hence dhcprelayd would get duplicated dhcrelay process when checking

How I did it
Only check parent dhcp_relay process

How to verify it
UT
Run https://github.com/sonic-net/sonic-mgmt/blob/master/tests/dhcp_relay/test_dhcp_relay_stress.py with latest dhcprelayd
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #20616

mssonicbld pushed a commit that referenced this pull request Oct 25, 2024
Why I did it
In master and 202405 branch, dhcp_relay container was updated to Bookworm, hence isc-dhcp-relay was updated from 4.4.1 to 4.4.3. In this version, isc-dhcp-relay would create child process to proceed when there is network io, hence dhcprelayd would get duplicated dhcrelay process when checking

How I did it
Only check parent dhcp_relay process

How to verify it
UT
Run https://github.com/sonic-net/sonic-mgmt/blob/master/tests/dhcp_relay/test_dhcp_relay_stress.py with latest dhcprelayd
rkavitha-hcl pushed a commit to rkavitha-hcl/sonic-buildimage that referenced this pull request Nov 15, 2024
…net#20551)

Why I did it
In master and 202405 branch, dhcp_relay container was updated to Bookworm, hence isc-dhcp-relay was updated from 4.4.1 to 4.4.3. In this version, isc-dhcp-relay would create child process to proceed when there is network io, hence dhcprelayd would get duplicated dhcrelay process when checking

How I did it
Only check parent dhcp_relay process

How to verify it
UT
Run https://github.com/sonic-net/sonic-mgmt/blob/master/tests/dhcp_relay/test_dhcp_relay_stress.py with latest dhcprelayd
aidan-gallagher pushed a commit to aidan-gallagher/sonic-buildimage that referenced this pull request Nov 16, 2024
…net#20551)

Why I did it
In master and 202405 branch, dhcp_relay container was updated to Bookworm, hence isc-dhcp-relay was updated from 4.4.1 to 4.4.3. In this version, isc-dhcp-relay would create child process to proceed when there is network io, hence dhcprelayd would get duplicated dhcrelay process when checking

How I did it
Only check parent dhcp_relay process

How to verify it
UT
Run https://github.com/sonic-net/sonic-mgmt/blob/master/tests/dhcp_relay/test_dhcp_relay_stress.py with latest dhcprelayd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants