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] make DHCP relay an extension #6531

Merged
merged 66 commits into from
Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
a624e0c
[dockers] Tag all docker images with a version number
stepanblyschak Sep 14, 2020
875650f
[dockers] Tag all docker images with a version number
stepanblyschak Sep 14, 2020
954cad9
[dockers] label SONiC Docker with manifest
stepanblyschak Nov 3, 2020
855fa60
[dockers] add package name to manifest
stepanblyschak Nov 16, 2020
44685ba
remove swss dependency from dhcp-relay & router-advertiser
stepanblyschak Nov 16, 2020
d337e08
Merge branch 'master' of github.com:azure/sonic-buildimage into docke…
stepanblyschak Jan 5, 2021
5eb48a9
Merge branch 'master' of github.com:azure/sonic-buildimage into docke…
stepanblyschak Jan 5, 2021
99d9d12
Merge branch 'master' of github.com:azure/sonic-buildimage into docke…
stepanblyschak Jan 13, 2021
ed1bd3f
remove sonic-sdk added by mistake in this change
stepanblyschak Jan 13, 2021
50237b4
Merge branch 'master' into dockers_version_tags
stepanblyschak Jan 13, 2021
caf5c9e
Merge branch 'master' of github.com:azure/sonic-buildimage into docke…
stepanblyschak Jan 18, 2021
9bc4464
[dhcp-relay] make DHCP relay an extension
stepanblyschak Jan 18, 2021
efc69f5
[slave.mk] align lines in dependencies
stepanblyschak Jan 20, 2021
31d4bbf
Merge branch 'master' of github.com:azure/sonic-buildimage into docke…
stepanblyschak Jan 21, 2021
823eede
[docker-macsec] add version number for docker-macsec
stepanblyschak Jan 21, 2021
bdf0113
Merge branch 'dockers_version_tags' of github.com:stepanblyschak/soni…
stepanblyschak Jan 21, 2021
05df4ed
[docker-macsec] add manifest for macsec docker
stepanblyschak Jan 21, 2021
e966fef
[slave.mk] fix missing comma
stepanblyschak Jan 21, 2021
d79293e
[slave.mk] fix missing comma
stepanblyschak Jan 21, 2021
a90f9b4
[slave.mk] fix missing comma
stepanblyschak Jan 21, 2021
74cd875
[sonic_debian_extension.j2] use --enable instead of --enabled
stepanblyschak Jan 21, 2021
2e5f097
[slave.mk] fix target path
stepanblyschak Jan 21, 2021
e1b2c29
[docker-dhcp-relay] add cli to docker
stepanblyschak Jan 21, 2021
db7ef7d
[docker-dhcp-relay] add cli to docker
stepanblyschak Jan 21, 2021
e0735d2
[sonic_debian_extension.j2] fix merge conflict markers
stepanblyschak Jan 25, 2021
4897003
align install from tarball command
stepanblyschak Jan 28, 2021
2066aa9
[dockers] use single manifest template
stepanblyschak Jan 29, 2021
113bf30
[dockers] use single manifest template
stepanblyschak Jan 29, 2021
d6abc30
[docker-dhcp-relay] define manifest parameters in makefile
stepanblyschak Jan 29, 2021
422c245
tag SONiC images the old way
stepanblyschak Jan 30, 2021
5dd9278
Merge branch 'dockers_version_tags' into dockers_manifest
stepanblyschak Jan 30, 2021
888a0ea
check if docker has correct manifest after loading it
stepanblyschak Jan 30, 2021
8ad8a05
address review comment
stepanblyschak Feb 10, 2021
53631d7
fix checking manifest
stepanblyschak Feb 15, 2021
a0d3124
Merge branch 'master' into dockers_manifest
stepanblyschak Mar 18, 2021
9d76601
Merge branch 'master' of github.com:azure/sonic-buildimage into docke…
stepanblyschak Mar 24, 2021
3de0cb3
remove obsolete file
stepanblyschak Mar 25, 2021
a665d73
Merge branch 'dockers_manifest' of github.com:stepanblyschak/sonic-bu…
stepanblyschak Mar 25, 2021
b2f8fc9
remove obsolete field from manifest. will be replaced by base-os comp…
stepanblyschak Mar 29, 2021
46d75eb
Merge branch 'master' of github.com:azure/sonic-buildimage into docke…
stepanblyschak Mar 30, 2021
13f3453
Merge branch 'master' into dhcp-relay-ext
stepanblyschak Apr 2, 2021
84bf4dd
fix review comments
stepanblyschak Apr 9, 2021
b427b71
fix review comments
stepanblyschak Apr 12, 2021
92ad8b1
add comment
stepanblyschak Apr 12, 2021
57ec2f2
remove not needed ARG in dockerfiles
stepanblyschak Apr 15, 2021
c74ea21
Merge branch 'master' into dockers_manifest
stepanblyschak Apr 20, 2021
119b47c
Merge branch 'dockers_manifest' of github.com:stepanblyschak/sonic-bu…
stepanblyschak Apr 21, 2021
7c11312
tests for cli plugins
stepanblyschak Apr 21, 2021
662aa3d
add tests
stepanblyschak Apr 21, 2021
628071f
Merge branch 'master' into dhcp-relay-ext
stepanblyschak Apr 29, 2021
66e2333
default-owner to set-owner
stepanblyschak Apr 29, 2021
60076ed
fix lgtm warnings
stepanblyschak Apr 30, 2021
368e9d3
Merge branch 'master' of github.com:azure/sonic-buildimage into dhcp-…
stepanblyschak Apr 30, 2021
0d5b19e
fix review comments
stepanblyschak May 5, 2021
dffcee0
add coverage report
May 7, 2021
c1f7e32
[sonic-app-ext] support app extensions installation during build
May 12, 2021
7cc9102
Merge branch 'master' of github.com:azure/sonic-buildimage into app-e…
stepanblyschak May 31, 2021
abe88c0
bring back dhcp_relay
stepanblyschak May 31, 2021
82b52be
Merge branch 'master' into dhcp-relay-ext
stepanblyschak May 31, 2021
9807d93
introduce _INSTALL_PYTHON_WHEELS and _INSTALL_DEBS to not install son…
stepanblyschak Jun 11, 2021
fa1b606
Merge branch 'app-ext-build' of github.com:stepanblyschak/sonic-build…
stepanblyschak Jun 11, 2021
306feba
add install targets for dhcp-relay
stepanblyschak Jun 11, 2021
a2e33be
Merge branch 'master' into dhcp-relay-ext
stepanblyschak Jun 24, 2021
fe19b0e
Merge branch 'master' into dhcp-relay-ext
stepanblyschak Jul 2, 2021
42f8b36
remove obsolete changes added back by mistake during upstream merge
stepanblyschak Jul 12, 2021
c86bb45
add missing INCLUDE_DHCP_RELAY condition
stepanblyschak Jul 14, 2021
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ target/
*-dbg
*dbg.j2
*.img
*.pyc

# Autogenerated Dockerfiles
sonic-slave*/Dockerfile
sonic-slave*/Dockerfile.user
dockers/*/Dockerfile
platform/*/docker-*/Dockerfile

# Autogenerated manifest files
dockers/*/manifest.json
platform/*/docker-*/manifest.json

# Installer-related files and directories
installer/x86_64/platforms/

Expand Down
1 change: 1 addition & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ SONIC_BUILD_INSTRUCTION := make \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
renukamanavalan marked this conversation as resolved.
Show resolved Hide resolved
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
TELEMETRY_WRITABLE=$(TELEMETRY_WRITABLE) \
EXTRA_DOCKER_TARGETS=$(EXTRA_DOCKER_TARGETS) \
Expand Down
4 changes: 4 additions & 0 deletions dockers/docker-database/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Make apt-get non-interactive
Expand Down Expand Up @@ -60,4 +62,6 @@ COPY ["critical_processes", "/etc/supervisor"]
COPY ["files/update_chassisdb_config", "/usr/local/bin/"]
COPY ["flush_unused_database", "/usr/local/bin/"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/docker-database-init.sh"]
5 changes: 5 additions & 0 deletions dockers/docker-dhcp-relay/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FROM docker-config-engine-buster

ARG docker_container_name
ARG image_version
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Make apt-get non-interactive
Expand Down Expand Up @@ -32,5 +34,8 @@ COPY ["docker_init.sh", "start.sh", "/usr/bin/"]
COPY ["docker-dhcp-relay.supervisord.conf.j2", "port-name-alias-map.txt.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]
COPY ["cli", "/cli/"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/bin/docker_init.sh"]
84 changes: 84 additions & 0 deletions dockers/docker-dhcp-relay/cli/config/plugins/dhcp_relay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import click
import utilities_common.cli as clicommon

@click.group(cls=clicommon.AbbreviationGroup, name='dhcp_relay')
def vlan_dhcp_relay():
pass

@vlan_dhcp_relay.command('add')
@click.argument('vid', metavar='<vid>', required=True, type=int)
@click.argument('dhcp_relay_destination_ip', metavar='<dhcp_relay_destination_ip>', required=True)
@clicommon.pass_db
def add_vlan_dhcp_relay_destination(db, vid, dhcp_relay_destination_ip):
""" Add a destination IP address to the VLAN's DHCP relay """

ctx = click.get_current_context()

if not clicommon.is_ipaddress(dhcp_relay_destination_ip):
ctx.fail('{} is invalid IP address'.format(dhcp_relay_destination_ip))

vlan_name = 'Vlan{}'.format(vid)
vlan = db.cfgdb.get_entry('VLAN', vlan_name)
if len(vlan) == 0:
ctx.fail("{} doesn't exist".format(vlan_name))

dhcp_relay_dests = vlan.get('dhcp_servers', [])
if dhcp_relay_destination_ip in dhcp_relay_dests:
click.echo("{} is already a DHCP relay destination for {}".format(dhcp_relay_destination_ip, vlan_name))
return

dhcp_relay_dests.append(dhcp_relay_destination_ip)
vlan['dhcp_servers'] = dhcp_relay_dests
db.cfgdb.set_entry('VLAN', vlan_name, vlan)
click.echo("Added DHCP relay destination address {} to {}".format(dhcp_relay_destination_ip, vlan_name))
try:
click.echo("Restarting DHCP relay service...")
clicommon.run_command("systemctl stop dhcp_relay", display_cmd=False)
clicommon.run_command("systemctl reset-failed dhcp_relay", display_cmd=False)
clicommon.run_command("systemctl start dhcp_relay", display_cmd=False)
except SystemExit as e:
ctx.fail("Restart service dhcp_relay failed with error {}".format(e))

@vlan_dhcp_relay.command('del')
@click.argument('vid', metavar='<vid>', required=True, type=int)
@click.argument('dhcp_relay_destination_ip', metavar='<dhcp_relay_destination_ip>', required=True)
@clicommon.pass_db
def del_vlan_dhcp_relay_destination(db, vid, dhcp_relay_destination_ip):
""" Remove a destination IP address from the VLAN's DHCP relay """

ctx = click.get_current_context()

if not clicommon.is_ipaddress(dhcp_relay_destination_ip):
ctx.fail('{} is invalid IP address'.format(dhcp_relay_destination_ip))

vlan_name = 'Vlan{}'.format(vid)
vlan = db.cfgdb.get_entry('VLAN', vlan_name)
if len(vlan) == 0:
ctx.fail("{} doesn't exist".format(vlan_name))

dhcp_relay_dests = vlan.get('dhcp_servers', [])
if not dhcp_relay_destination_ip in dhcp_relay_dests:
ctx.fail("{} is not a DHCP relay destination for {}".format(dhcp_relay_destination_ip, vlan_name))

dhcp_relay_dests.remove(dhcp_relay_destination_ip)
if len(dhcp_relay_dests) == 0:
del vlan['dhcp_servers']
else:
vlan['dhcp_servers'] = dhcp_relay_dests
db.cfgdb.set_entry('VLAN', vlan_name, vlan)
click.echo("Removed DHCP relay destination address {} from {}".format(dhcp_relay_destination_ip, vlan_name))
try:
click.echo("Restarting DHCP relay service...")
clicommon.run_command("systemctl stop dhcp_relay", display_cmd=False)
clicommon.run_command("systemctl reset-failed dhcp_relay", display_cmd=False)
clicommon.run_command("systemctl start dhcp_relay", display_cmd=False)
except SystemExit as e:
ctx.fail("Restart service dhcp_relay failed with error {}".format(e))


def register(cli):
cli.commands['vlan'].add_command(vlan_dhcp_relay)


if __name__ == '__main__':
vlan_dhcp_relay()
22 changes: 22 additions & 0 deletions dockers/docker-dhcp-relay/cli/show/plugins/dhcp_relay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from natsort import natsorted
from .. import vlan


def get_dhcp_helper_address(ctx, vlan):
cfg, _ = ctx
vlan_dhcp_helper_data, _, _ = cfg
vlan_config = vlan_dhcp_helper_data.get(vlan)
if not vlan_config:
return ""

dhcp_helpers = vlan_config.get('dhcp_servers', [])

return '\n'.join(natsorted(dhcp_helpers))


vlan.VlanBrief.COLUMNS.append(('DHCP Helper Address', get_dhcp_helper_address))

Choose a reason for hiding this comment

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

Would this be problematic, plugins changing parent data structures ? There probably needs to be better mechanisms for this ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would it be better if VlanBrief had a public class method:

def register_column(column_name, column_data_callback)

And a comment that this API is in use by plugins to register additional columns?



def register(cli):
pass

4 changes: 4 additions & 0 deletions dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

ARG frr_user_uid
ARG frr_user_gid

Expand Down Expand Up @@ -59,4 +61,6 @@ RUN chmod a+x /usr/bin/TSA && \
chmod a+x /usr/bin/TSB && \
chmod a+x /usr/bin/TSC

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/bin/docker_init.sh"]
5 changes: 5 additions & 0 deletions dockers/docker-fpm-gobgp/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker-fpm-quagga

ARG docker_container_name
ARG manifest

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -27,4 +30,6 @@ COPY ["daemons", "/etc/quagga/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-fpm-quagga/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM docker-config-engine

ARG docker_container_name
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Make apt-get non-interactive
Expand Down Expand Up @@ -36,4 +38,6 @@ COPY ["*.j2", "/usr/share/sonic/templates/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-iccpd/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

## Make apt-get non-interactive
Expand Down Expand Up @@ -31,4 +33,6 @@ RUN apt-get clean -y && \
apt-get autoremove -y && \
rm -rf /debs

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-lldp/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest
ARG image_version

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Make apt-get non-interactive
Expand Down Expand Up @@ -49,4 +51,6 @@ COPY ["lldpmgrd", "/usr/bin/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/bin/docker-lldp-init.sh"]
4 changes: 4 additions & 0 deletions dockers/docker-nat/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

Choose a reason for hiding this comment

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

Should the J2 file changes be in a different PR, let this PR be just the dhcp-relay changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These changes are in #5939.
It is not simple to generate a PR which touches changes done in other PR.
So after #5939 is merged this diff will be shown as only DHCL relay changes.


RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

RUN echo
Expand Down Expand Up @@ -35,4 +37,6 @@ COPY ["critical_processes", "/etc/supervisor"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Make apt-get non-interactive
Expand Down Expand Up @@ -75,4 +77,6 @@ COPY ["critical_processes", "/etc/supervisor/"]
# Copy all Jinja2 template files into the templates folder
COPY ["*.j2", "/usr/share/sonic/templates/"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/bin/docker-init.sh"]
4 changes: 4 additions & 0 deletions dockers/docker-platform-monitor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest
ARG image_version

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Make apt-get non-interactive
Expand Down Expand Up @@ -91,4 +93,6 @@ COPY ["ssd_tools/*", "/usr/bin/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/bin/docker_init.sh"]
4 changes: 4 additions & 0 deletions dockers/docker-router-advertiser/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest
ARG image_version

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Make apt-get non-interactive
Expand Down Expand Up @@ -37,4 +39,6 @@ COPY ["radvd.conf.j2", "wait_for_link.sh.j2", "docker-router-advertiser.supervis
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/bin/docker-init.sh"]
4 changes: 4 additions & 0 deletions dockers/docker-sflow/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

## Make apt-get non-interactive
Expand Down Expand Up @@ -32,4 +34,6 @@ COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]
COPY ["port_index_mapper.py", "/usr/bin"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-snmp/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest
ARG image_version

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

# Enable -O for all Python calls
Expand Down Expand Up @@ -77,4 +79,6 @@ COPY ["critical_processes", "/etc/supervisor"]
# Although exposing ports is not needed for host net mode, keep it for possible bridge mode
EXPOSE 161/udp 162/udp

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-sonic-mgmt-framework/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

## Make apt-get non-interactive
Expand Down Expand Up @@ -53,4 +55,6 @@ RUN apt-get remove -y g++ python3-dev
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-sonic-restapi/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-stretch

ARG docker_container_name
ARG manifest

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

## Make apt-get non-interactive
Expand All @@ -25,4 +27,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-sonic-telemetry/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest
ARG image_version

RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

## Make apt-get non-interactive
Expand Down Expand Up @@ -32,4 +34,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

LABEL com.azure.sonic.manifest="$manifest"

ENTRYPOINT ["/usr/local/bin/supervisord"]
Loading