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

gNOI Cold Reboot - Integrated Docker and Makefile changes #20713

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,8 @@
url = https://github.com/Marvell-switching/sonic-platform-marvell.git
[submodule "platform/vpp"]
path = platform/vpp
url = https://github.com/sonic-net/sonic-platform-vpp.git
url = https://github.com/sonic-net/sonic-platform-vpp.git
[submodule "src/sonic-framework/gnoi"]
path = src/sonic-framework/gnoi
url = https://github.com/openconfig/gnoi

34 changes: 34 additions & 0 deletions dockers/docker-framework/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

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

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

RUN apt-get update && \
apt-get install -f -y \
libdbus-1-3 \
libdbus-c++-1-0v5

{% if docker_framework_debs.strip() -%}
# Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_framework_debs.split(' '), "/debs/") }}

# Install locally-built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_framework_debs.split(' ')) }}
{%- endif %}

RUN apt-get clean -y && \
apt-get autoclean - && \
apt-get autoremove -y && \
rm -rf /debs /var/lib/apt/lists/* /tmp/* ~/.cache/

COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
# COPY ["git_commits", "/usr"]


ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 4 additions & 0 deletions dockers/docker-framework/framework.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash


exec /usr/local/bin/framework --logtostderr
5 changes: 5 additions & 0 deletions dockers/docker-framework/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash


mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
54 changes: 54 additions & 0 deletions dockers/docker-framework/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[supervisord]
logfile_maxbytes=1MB
logfile_backups=2
loglevel=warn
nodaemon=true

[eventlistener:dependent-startup]
command=python3 -m supervisord_dependent_startup --log-level warn
autostart=true
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startretries=0
exitcodes=0,3
events=PROCESS_STATE
buffer_size=50

[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener --container-name framework
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog

[program:rsyslogd]
command=/usr/sbin/rsyslogd -n -iNONE
priority=1
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true

[program:start]
command=/usr/bin/start.sh
priority=2
autostart=false
autorestart=false
startsecs=0
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running

[program:rebootbackend]
command=/usr/bin/rebootbackend
priority=3
autostart=false
autorestart=true
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=start:exited
229 changes: 229 additions & 0 deletions files/build/versions/dockers/docker-framework/versions-deb-bookworm
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
adduser==4.118+deb11u1
apt==2.2.4
apt-utils==2.2.4
base-files==11.1+deb11u9
base-passwd==3.5.51
bash==5.1-2+deb11u1
bsdutils==1:2.36.1-8+deb11u2
ca-certificates==20210119
coreutils==8.32-4+b1
curl==7.74.0-1.3+deb11u11
dash==0.5.11+git20200708+dd9ef66-5
debconf==1.5.77
debian-archive-keyring==2021.1.1+deb11u1
debianutils==4.11.2
diffutils==1:3.7-5
dpkg==1.20.13
dpkg-dev==1.20.13
e2fsprogs==1.46.2-2
findutils==4.8.0-1
framework==1.0.0
framework-dbg==1.0.0
gcc-10-base==10.2.1-6
gcc-9-base==9.3.0-22
gdb==10.1-1.7
gdbserver==10.1-1.7
gpgv==2.2.27-2+deb11u2
grep==3.6-1+deb11u1
gzip==1.10-4+deb11u1
hostname==3.23
init-system-helpers==1.60
iproute2==5.10.0-4
jq==1.6-2.1
less==551-2+deb11u2
libabsl20200923==0~20200923.3-2
libacl1==2.2.53-10
libapt-pkg6.0==2.2.4
libatomic1==10.2.1-6
libattr1==1:2.4.48-6
libaudit-common==1:3.0-2
libaudit1==1:3.0-2
libbabeltrace1==1.5.8-1+b3
libblkid1==2.36.1-8+deb11u2
libboost-regex1.74.0==1.74.0-9
libboost-serialization1.74.0==1.74.0-9
libbpf0==1:0.3-3
libbrotli1==1.0.9-2+b2
libbsd0==0.11.3-1+deb11u1
libbz2-1.0==1.0.8-4
libc-ares2==1.17.1-1+deb11u3
libc-bin==2.31-13+deb11u10
libc6==2.31-13+deb11u10
libcap-ng0==0.7.9-2.2+b1
libcap2==1:2.44-1
libcap2-bin==1:2.44-1
libcbor0==0.5.0+dfsg-2
libcom-err2==1.46.2-2
libcrypt1==1:4.4.18-4
libcurl3-gnutls==7.74.0-1.3+deb11u11
libcurl4==7.74.0-1.3+deb11u11
libdaemon0==0.14-7.1
libdb5.3==5.3.28+dfsg1-0.8
libdbus-1-3==1.12.28-0+deb11u1
libdbus-c++-1-0v5==0.9.0-8.2
libdebconfclient0==0.260
libdebuginfod1==0.183-1
libdw1==0.183-1
libecore1==1.25.1-1
libedit2==3.1-20191231-2+b1
libeina1a==1.25.1-1
libelf1==0.183-1
libestr0==0.1.10-2.1+b1
libexpat1==2.2.10-2+deb11u5
libext2fs2==1.46.2-2
libfastjson4==0.99.9-1
libffi7==3.3-6
libfido2-1==1.6.0-2
libgcc-s1==10.2.1-6
libgcrypt20==1.8.7-6
libgdbm-compat4==1.19-2
libgdbm6==1.19-2
libglib2.0-0==2.66.8-1+deb11u3
libgmp10==2:6.2.1+dfsg-1+deb11u1
libgnutls30==3.7.1-5+deb11u4
libgpg-error0==1.38-2
libgpm2==1.20.7-8
libgrpc++1==1.30.2-3
libgrpc10==1.30.2-3
libgssapi-krb5-2==1.18.3-6+deb11u4
libhiredis0.14==0.14.1-1
libhiredis0.14-dbgsym==0.14.1-1
libhogweed6==3.7.3-1
libicu67==67.1-7
libidn2-0==2.3.0-5
libipt2==2.0.3-1
libjansson4==2.13.1-1.1
libjemalloc2==5.2.1-3
libjq1==1.6-2.1
libjs-jquery==3.5.1+dfsg+~3.5.5-7
libk5crypto3==1.18.3-6+deb11u4
libkeyutils1==1.6.1-2
libkrb5-3==1.18.3-6+deb11u4
libkrb5support0==1.18.3-6+deb11u4
libldap-2.4-2==2.4.57+dfsg-3+deb11u1
liblognorm5==2.0.5-1.1
liblua5.1-0==5.1.5-8.1+b3
liblz4-1==1.9.3-2
liblzf1==3.6-3
liblzma5==5.2.5-2.1~deb11u1
libmd0==1.0.3-3
libmnl0==1.0.4-3
libmount1==2.36.1-8+deb11u2
libmpdec3==2.5.1-1
libmpfr6==4.1.0-3
libncurses6==6.2+20201114-2+deb11u2
libncursesw6==6.2+20201114-2+deb11u2
libnettle8==3.7.3-1
libnghttp2-14==1.43.0-1+deb11u1
libnl-3-200==3.5.0-1
libnl-cli-3-200==3.5.0-1
libnl-genl-3-200==3.5.0-1
libnl-nf-3-200==3.5.0-1
libnl-route-3-200==3.5.0-1
libnorm1==1.5.9+dfsg-2
libnsl2==1.3.0-2
libonig5==6.9.6-1.1
libp11-kit0==0.23.22-1
libpam-modules==1.4.0-9+deb11u1
libpam-modules-bin==1.4.0-9+deb11u1
libpam-runtime==1.4.0-9+deb11u1
libpam0g==1.4.0-9+deb11u1
libpcre2-8-0==10.36-2+deb11u1
libpcre3==2:8.39-13
libperl5.32==5.32.1-4+deb11u3
libpgm-5.3-0==5.3.128~dfsg-2
libprocps8==2:3.3.17-5
libprotobuf-dev==3.21.12-3
libprotobuf-lite32==3.21.12-3
libprotobuf32==3.21.12-3
libprotoc32==3.21.12-3
libpsl5==0.21.0-1.2
libpython3-stdlib==3.9.2-3
libpython3.9==3.9.2-1
libpython3.9-minimal==3.9.2-1
libpython3.9-stdlib==3.9.2-1
libreadline8==8.1-1
librtmp1==2.4+20151223.gitfa8646d.1-2+b2
libsasl2-2==2.1.27+dfsg-2.1+deb11u1
libsasl2-modules-db==2.1.27+dfsg-2.1+deb11u1
libseccomp2==2.5.1-1+deb11u1
libselinux1==3.1-3
libsemanage-common==3.1-1
libsemanage1==3.1-1+b2
libsepol1==3.1-1
libsmartcols1==2.36.1-8+deb11u2
libsodium23==1.0.18-1
libsource-highlight-common==3.1.9-3
libsource-highlight4v5==3.1.9-3+b1
libsqlite3-0==3.34.1-3
libss2==1.46.2-2
libssh2-1==1.9.0-2
libssl1.1==1.1.1w-0+deb11u1
libstdc++6==10.2.1-6
libswsscommon==1.0.0
libswsscommon-dbgsym==1.0.0
libsystemd0==247.3-7+deb11u4
libtasn1-6==4.16.0-2+deb11u1
libtinfo6==6.2+20201114-2+deb11u2
libtirpc-common==1.3.1-1+deb11u1
libtirpc3==1.3.1-1+deb11u1
libudev1==247.3-7+deb11u4
libunistring2==0.9.10-4
libunwind8==1.3.2-2
libuuid1==2.36.1-8+deb11u2
libwrap0==7.6.q-31
libxtables12==1.8.7-1
libxxhash0==0.8.0-2
libyang==1.0.73
libyang-cpp==1.0.73
libzmq5==4.3.4-1+deb11u1
libzstd1==1.4.8+dfsg-2.1
login==1:4.8.1-1
logsave==1.46.2-2
lsb-base==11.1.0
lua-bitop==1.0.2-5
lua-cjson==2.1.0+dfsg-2.1
mawk==1.3.4.20200120-2
media-types==4.0.0
mount==2.36.1-8+deb11u2
ncurses-base==6.2+20201114-2+deb11u2
ncurses-bin==6.2+20201114-2+deb11u2
net-tools==1.60+git20181103.0eebece-1
netbase==6.3
openssh-client==1:8.4p1-5+deb11u3
openssl==1.1.1w-0+deb11u1
passwd==1:4.8.1-1
perl==5.32.1-4+deb11u3
perl-base==5.32.1-4+deb11u3
perl-modules-5.32==5.32.1-4+deb11u3
procps==2:3.3.17-5
protobuf-compiler==3.21.12-3
python-is-python3==3.9.2-1
python3==3.9.2-3
python3-distutils==3.9.2-1
python3-lib2to3==3.9.2-1
python3-minimal==3.9.2-3
python3-swsscommon==1.0.0
python3-yang==1.0.73
python3.9==3.9.2-1
python3.9-minimal==3.9.2-1
readline-common==8.1-1
redis-tools==5:6.0.16-1+deb11u2
rsyslog==8.2302.0-1~bpo11+1
sed==4.7-1
socat==1.7.4.1-3
sonic-build-hooks==1.0
sonic-db-cli==1.0.0
sonic-eventd==1.0.0-0
sshpass==1.09-1+b1
strace==5.10-1
sysvinit-utils==2.96-7+deb11u1
tar==1.34+dfsg-1+deb11u1
tzdata==2024a-0+deb11u1
util-linux==2.36.1-8+deb11u2
vim==2:8.2.2434-3+deb11u1
vim-common==2:8.2.2434-3+deb11u1
vim-runtime==2:8.2.2434-3+deb11u1
vim-tiny==2:8.2.2434-3+deb11u1
xxd==2:8.2.2434-3+deb11u1
zlib1g==1:1.2.11.dfsg-2+deb11u2
26 changes: 26 additions & 0 deletions files/build/versions/dockers/docker-framework/versions-py3
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
async-timeout==4.0.3
bitarray==1.5.3
ijson==2.6.1
ipaddress==1.0.23
j2cli==0.3.10
jinja2==3.1.4
jsondiff==2.0.0
lxml==4.9.1
markupsafe==2.1.5
natsort==6.2.1
netaddr==0.8.0
pip==24.0
pyang==2.6.0
pyangbind==0.8.1
pyyaml==5.4.1
redis==4.5.4
redis-dump-load==1.1
regex==2024.5.10
setuptools==58.1.0
six==1.16.0
supervisor==4.2.1
supervisord-dependent-startup==1.4.0
tabulate==0.8.2
toposort==1.10
wheel==0.40.0
xmltodict==0.12.0
Loading
Loading