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

docker-lldp: Sonic devices advertise themeselves as simple "debian" over lldp instead of sonic #6114

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dockers/docker-lldp/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ COPY ["start.sh", "/usr/bin/"]
COPY ["waitfor_lldp_ready.sh", "/usr/bin/"]
COPY ["supervisord.conf.j2", "/usr/share/sonic/templates/"]
COPY ["lldpd.conf.j2", "/usr/share/sonic/templates/"]
COPY ["lldpdSysDescr.conf.j2", "/usr/share/sonic/templates/"]
COPY ["lldpd", "/etc/default/"]
COPY ["lldpmgrd", "/usr/bin/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-lldp/lldpdSysDescr.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configure system description "SONiC Software Version: SONiC.{{ build_version }} - HwSku: {{ DEVICE_METADATA['localhost']['hwsku'] }} - Distribution: Debian {{ debian_version }} - Kernel: {{ kernel_version }}"
8 changes: 7 additions & 1 deletion dockers/docker-lldp/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env bash
CFGGEN_PARAMS=" \
-d \
-t /usr/share/sonic/templates/lldpd.conf.j2 \
-y /etc/sonic/sonic_version.yml \
-t /usr/share/sonic/templates/lldpdSysDescr.conf.j2 \
"
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want the lldod.conf an lldpdSysDescr.conf to be int a single file? if not, you could rewrite as:

CFGGEN_PARAMS=" \
    -d \
    -t /usr/share/sonic/templates/lldpd.conf.j2,<file path> \
    -y /etc/sonic/sonic_version.yml \
    -t /usr/share/sonic/templates/lldpdSysDescr.conf.j2,<file path> \
"


if [ "${RUNTIME_OWNER}" == "" ]; then
RUNTIME_OWNER="kube"
Expand All @@ -10,7 +16,7 @@ then
${CTR_SCRIPT} -f lldp -o ${RUNTIME_OWNER} -v ${IMAGE_VERSION}
fi

sonic-cfggen -d -t /usr/share/sonic/templates/lldpd.conf.j2 > /etc/lldpd.conf
sonic-cfggen $CFGGEN_PARAMS > /etc/lldpd.conf

mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
Expand Down