Commit cac1e17 1 parent 0601b3a commit cac1e17 Copy full SHA for cac1e17
File tree 3 files changed +12
-2
lines changed
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -66,14 +66,15 @@ RUN apt-get -y purge \
66
66
find / | grep -E "__pycache__" | xargs rm -rf && \
67
67
rm -rf /debs /python-wheels ~/.cache
68
68
69
+ COPY ["docker-snmp-init.sh", "/usr/bin/"]
69
70
COPY ["start.sh", "/usr/bin/"]
70
71
COPY ["snmp_yml_to_configdb.py", "/usr/bin/"]
71
- COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
72
72
COPY ["*.j2", "/usr/share/sonic/templates/"]
73
73
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
74
74
COPY ["critical_processes", "/etc/supervisor"]
75
75
76
76
# Although exposing ports is not needed for host net mode, keep it for possible bridge mode
77
77
EXPOSE 161/udp 162/udp
78
78
79
- ENTRYPOINT ["/usr/local/bin/supervisord"]
79
+ RUN chmod +x /usr/bin/docker-snmp-init.sh
80
+ ENTRYPOINT ["/usr/bin/docker-snmp-init.sh"]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Generate supervisord.conf based on device metadata
3
+ mkdir -p /etc/supervisor/conf.d/
4
+ sonic-cfggen -d -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
5
+ exec /usr/local/bin/supervisord
Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ dependent_startup=true
50
50
dependent_startup_wait_for=start:exited
51
51
52
52
[program:snmp-subagent]
53
+ {% if DEVICE_METADATA ['localhost' ]['switch_type' ] == 'chassis-packet' %}
54
+ command=/usr/bin/env python3 -m sonic_ax_impl --enable_dynamic_frequency
55
+ {% else %}
53
56
command=/usr/bin/env python3 -m sonic_ax_impl
57
+ {% endif %}
54
58
priority=4
55
59
autostart=false
56
60
autorestart=false
You can’t perform that action at this time.
0 commit comments