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

[dhcpv6_relay] Fix dependency of dhcp-mon on VLAN with only v6 cfg is provided #13006

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

vivekrnv
Copy link
Contributor

@vivekrnv vivekrnv commented Dec 8, 2022

Signed-off-by: Vivek Reddy Karri [email protected]

Why I did it

  1. config vlan add 100
  2. config vlan member add Ethernet0
  3. config interface ip add Vlan100 <ip_addr>
  4. config load
{
        "DHCP_RELAY" :{
                "Vlan100" : {
                        "dhcpv6_servers" : ["fc02:2000::2"]
                }
        }
}
  1. Systemctl restart dhcp_relay

Behavior Seec

  1. dhcp_relay container doesn't start with the following log
Dec  8 21:19:47.779998 sonic  INFO dockerd[572]: time="2022-12-08T21:19:47.779415981+02:00" level=error msg="Error setting up exec command in container dhcp_relay: Container 4a64823d9a9a3617f5fdb8f9b54a10e6ebf003df1c3dafeea1606ca38a9ae0d8 is not running"
  1. Happened because of the wrong jinja formatting of supervisord.conf file which results in:
root@sonic:/home/admin# sonic-cfggen -d -t docker-dhcp-relay.supervisord.conf.j2
..............
..............

[group:dhcp-relay]
programs=dhcp6relay

[program:dhcp6relay]
command=/usr/sbin/dhcp6relay
priority=3
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=start:exited

[group:dhcpmon]
programs=dhcpmon-Vlan100

<missing [program:dhcp6relay] section for dhcpmon>

root@sonic:/home/admin#

With this change, the formatting is proper and the container starts as expected even without VLAN| dhcp6_servers field

[group:dhcp-relay]
programs=dhcp6relay

[program:dhcp6relay]
command=/usr/sbin/dhcp6relay
priority=3
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=start:exited

[group:dhcpmon]
programs=dhcpmon-Vlan100

[program:dhcpmon-Vlan100]
command=/usr/sbin/dhcpmon -id Vlan100 -iu Ethernet236 -im eth0
priority=4
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=

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

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

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

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

@vivekrnv vivekrnv requested a review from lguohan as a code owner December 8, 2022 20:05
@vivekrnv vivekrnv changed the title Fix dependency of dhcp-mon on VLAN with only v6 cfg is provided [dhcpv6_relay] Fix dependency of dhcp-mon on VLAN with only v6 cfg is provided Dec 8, 2022
@dgsudharsan
Copy link
Collaborator

@kellyyeh @jcaiMR @yxieca Can you please review this fix?

@dgsudharsan
Copy link
Collaborator

@kellyyeh @jcaiMR @yxieca Can we please merge this?

@kellyyeh kellyyeh merged commit 5624d15 into sonic-net:master Dec 9, 2022
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Dec 12, 2022
Signed-off-by: Vivek Reddy Karri <[email protected]>

Signed-off-by: Vivek Reddy Karri <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #13029

@liuh-80
Copy link
Contributor

liuh-80 commented Feb 2, 2023

202012 branch PR merged: #13040

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Feb 3, 2023
Signed-off-by: Vivek Reddy Karri <[email protected]>

Signed-off-by: Vivek Reddy Karri <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202211: #13634

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.

8 participants