[dhcp_server] Add dhcprelayd for dhcp_server feature#16947
Merged
yxieca merged 11 commits intosonic-net:masterfrom Nov 2, 2023
Merged
[dhcp_server] Add dhcprelayd for dhcp_server feature#16947yxieca merged 11 commits intosonic-net:masterfrom
yxieca merged 11 commits intosonic-net:masterfrom
Conversation
04d9912 to
c0b9a32
Compare
Blueve
reviewed
Oct 20, 2023
Blueve
reviewed
Oct 20, 2023
c0b9a32 to
be6db23
Compare
yaqiangz
commented
Oct 23, 2023
938450c to
4339e09
Compare
4339e09 to
6f3e5c9
Compare
Blueve
reviewed
Oct 26, 2023
dockers/docker-dhcp-relay/cli-plugin-tests/test_show_dhcp_relay.py
Outdated
Show resolved
Hide resolved
Blueve
reviewed
Oct 26, 2023
Blueve
reviewed
Oct 26, 2023
...-config-engine/tests/sample_output/py2/docker-dhcp-relay-enable-dhcp-server.supervisord.conf
Outdated
Show resolved
Hide resolved
Blueve
reviewed
Oct 26, 2023
Blueve
reviewed
Oct 26, 2023
Blueve
reviewed
Oct 26, 2023
Blueve
reviewed
Oct 26, 2023
Blueve
reviewed
Oct 26, 2023
Blueve
reviewed
Oct 26, 2023
91192e4 to
8027951
Compare
8027951 to
867d1b0
Compare
8ae3baa to
085076c
Compare
085076c to
1a2f642
Compare
Blueve
approved these changes
Nov 2, 2023
Contributor
Author
|
@yxieca Could you pls help to signoff and merge this PR? |
lixiaoyuner
pushed a commit
to lixiaoyuner/sonic-buildimage
that referenced
this pull request
Feb 6, 2024
…sonic-buildimage into internal 1. Resolve conflicts (introduced by this public PR: [sonic-net#16947](sonic-net#16947)) in `dockers/docker-dhcp-relay/Dockerfile.j2`: ``` <<<<<<< HEAD RUN apt-get install -y dnsmasq gcc python3-dev RUN pip3 install psutil RUN apt-get purge -y gcc python3-dev ======= {% if docker_dhcp_relay_whls.strip() %} # Copy locally-built Python wheel dependencies {{ copy_files("python-wheels/", docker_dhcp_relay_whls.split(' '), "/python-wheels/") }} # Install locally-built Python wheel dependencies {{ install_python_wheels(docker_dhcp_relay_whls.split(' ')) }} {% endif %} >>>>>>> 274d320 ``` Accepted both changes, after resolved: ``` RUN apt-get install -y dnsmasq gcc python3-dev RUN pip3 install psutil RUN apt-get purge -y gcc python3-dev {% if docker_dhcp_relay_whls.strip() %} # Copy locally-built Python wheel dependencies {{ copy_files("python-wheels/", docker_dhcp_relay_whls.split(' '), "/python-wheels/") }} # Install locally-built Python wheel dependencies {{ install_python_wheels(docker_dhcp_relay_whls.split(' ')) }} {% endif %} ``` 2. Because dnsmasq (used for ipv4 dhcp_server previously) exist in internal repo but not exist in public master repo, which would cause new added test case added by [sonic-net#16947](sonic-net#16947) in sonic-config-engine would fail. Also, we expect that dnsmasq is not running if "dhcp_server" feature is enabled. So I **add support for new added test case** and **modify template to avoid run dnsmasq when dhcp_server feature is enabled** in below commit:  Related work items: sonic-net#350, sonic-net#803, sonic-net#2858, sonic-net#16945, sonic-net#16996, sonic-net#17047, sonic-net#17053, sonic-net#17056, sonic-net#17057, sonic-net#17068
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.
Why I did it
Add support in dhcp_relay container for dhcp_server_ipv4 feature. HLD: sonic-net/SONiC#1282
Work item tracking
How I did it
install psutilandinstall sonic_dhcp_serverpython wheels in Dockerfile.j2dhcpmon(dhcpv4 relay counter) anddchrelayprocesses. And monitor config_db change.dhcpmon(dhcpv4 relay counter) anddchrelayprocess, instead run dhcprelayd process.1.1 For dhcp_server disabled, remove repeated blank lines in expected output file.
1.2 For dhcp_server enabled, add new UT.
How to verify it
Which release branch to backport (provide reason below if selected)
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)