Skip to content

Commit

Permalink
gNOI Warm Reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
rkavitha-hcl committed Nov 5, 2024
1 parent 8f47704 commit 9f5d286
Show file tree
Hide file tree
Showing 160 changed files with 460 additions and 44,268 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,3 @@
[submodule "src/sonic-framework/gnoi"]
path = src/sonic-framework/gnoi
url = https://github.com/openconfig/gnoi
[submodule "gnoi"]
path = gnoi
url = https://github.com/openconfig/gnoi
1 change: 1 addition & 0 deletions dockers/docker-framework/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
# COPY ["git_commits", "/usr"]


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


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


mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
10 changes: 0 additions & 10 deletions dockers/docker-framework/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running

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

[program:rebootbackend]
command=/usr/bin/rebootbackend
priority=3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
adduser==3.118+deb11u1
adduser==4.118+deb11u1
apt==2.2.4
apt-utils==2.2.4
base-files==11.1+deb11u9
Expand Down Expand Up @@ -226,4 +226,4 @@ 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
zlib1g==1:1.2.11.dfsg-2+deb11u2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
debian-archive.trafficmanager.net_debian-security_dists_bullseye-security==2024-05-10T08:02:59Z
debian-archive.trafficmanager.net_debian-security_dists_bullseye-security==2024-05-10T08:02:59Z
debian-archive.trafficmanager.net_debian_dists_bullseye-backports==2024-05-10T02:16:16Z
debian-archive.trafficmanager.net_debian_dists_bullseye-updates==2024-05-10T02:16:16Z
2 changes: 1 addition & 1 deletion files/build/versions/dockers/docker-framework/versions-py3
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ supervisord-dependent-startup==1.4.0
tabulate==0.8.2
toposort==1.10
wheel==0.40.0
xmltodict==0.12.0
xmltodict==0.12.0
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,4 @@ ucf==3.0043
uuid-dev==2.36.1-8+deb11u2
x11-common==1:7.7+22
xz-utils==5.2.5-2.1~deb11u1

2 changes: 2 additions & 0 deletions files/build_templates/framework.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Before=ntp-config.service
StartLimitIntervalSec=1200
StartLimitBurst=3


[Service]
User={{ sonicadmin_user }}
ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
Expand All @@ -16,5 +17,6 @@ ExecStop=/usr/bin/{{docker_container_name}}.sh stop
Restart=always
RestartSec=30


[Install]
WantedBy=sonic.target
2 changes: 1 addition & 1 deletion files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{%- elif include_system_eventd == "y" %}
{% do features.append(("eventd", "enabled", false, "enabled")) %}
{%- endif %}
"FEATURE": {
"FEATURE": {
{# delayed field if set, will start the feature systemd .timer unit instead of .service unit #}
{%- for feature, state, delayed, autorestart in features %}
"{{feature}}": {
Expand Down
6 changes: 4 additions & 2 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ $(DOCKER_SONIC_VS)_DEPENDS += $(SYNCD_VS) \
$(LIBYANG_CPP) \
$(LIBYANG_PY3) \
$(SONIC_UTILITIES_DATA) \
$(SONIC_HOST_SERVICES_DATA)
$(SONIC_HOST_SERVICES_DATA) \
$(FRAMEWORK)

$(DOCKER_SONIC_VS)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
$(SONIC_PLATFORM_COMMON_PY3) \
Expand All @@ -24,7 +25,8 @@ ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SONIC_VS)_DEPENDS += $(LIBSWSSCOMMON_DBG) \
$(LIBSAIREDIS_DBG) \
$(LIBSAIVS_DBG) \
$(SYNCD_VS_DBG)
$(SYNCD_VS_DBG) \
$(FRAMEWORK_DBG)
endif

ifeq ($(SONIC_ROUTING_STACK), frr)
Expand Down
2 changes: 2 additions & 0 deletions platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ supervisorctl start tunnelmgrd

supervisorctl start fabricmgrd

supervisorctl start rebootbackend

# Start arp_update when VLAN exists
VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
if [ "$VLAN" != "" ]; then
Expand Down
1 change: 1 addition & 0 deletions rules/docker-framework.dep
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ $(DOCKER_FRAMEWORK)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_FRAMEWORK)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_FRAMEWORK)_DEP_FILES := $(DEP_FILES)


$(eval $(call add_dbg_docker,$(DOCKER_FRAMEWORK),$(DOCKER_FRAMEWORK_DBG)))
5 changes: 3 additions & 2 deletions rules/docker-framework.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ SONIC_DOCKER_DBG_IMAGES += $(DOCKER_FRAMEWORK_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_FRAMEWORK_DBG)

$(DOCKER_FRAMEWORK)_CONTAINER_NAME = framework
$(DOCKER_FRAMEWORK)_RUN_OPT += --privileged -t
$(DOCKER_FRAMEWORK)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
#$(DOCKER_FRAMEWORK)_RUN_OPT += --privileged -t
$(DOCKER_FRAMEWORK)_RUN_OPT += -v /var/run/dbus:/var/run/dbus:rw
$(DOCKER_FRAMEWORK)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_FRAMEWORK)_GIT_REPOSITORIES += "sonic-swss"
$(DOCKER_FRAMEWORK)_GIT_REPOSITORIES += "sonic-swss-common"

Expand Down
2 changes: 1 addition & 1 deletion rules/framework.dep
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ $(FRAMEWORK)_CACHE_MODE := GIT_CONTENT_SHA
$(FRAMEWORK)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(ENABLE_ASAN)
$(FRAMEWORK)_DEP_FILES := $(DEP_FILES)
$(FRAMEWORK)_SMDEP_FILES := $(foreach path, $(SMDEP_PATHS), $($(path)))
$(FRAMEWORK)_SMDEP_PATHS := $(SPATH)
$(FRAMEWORK)_SMDEP_PATHS := $(SPATH)
5 changes: 3 additions & 2 deletions rules/framework.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

FRAMEWORK = framework_1.0.0_$(CONFIGURED_ARCH).deb
$(FRAMEWORK)_SRC_PATH = $(SRC_PATH)/sonic-framework
$(FRAMEWORK)_DEPENDS += $(LIBSWSSCOMMON_DEV)
$(FRAMEWORK)_DEPENDS += $(LIBSWSSCOMMON_DEV) \
$(PROTOBUF) $(PROTOBUF_LITE) $(PROTOBUF_DEV) $(PROTOBUF_COMPILER)

$(FRAMEWORK)_RDEPENDS += $(LIBSWSSCOMMON)
$(FRAMEWORK)_RDEPENDS += $(LIBSWSSCOMMON) $(PROTOBUF)
SONIC_DPKG_DEBS += $(FRAMEWORK)

FRAMEWORK_DBG = framework-dbg_1.0.0_$(CONFIGURED_ARCH).deb
Expand Down
Loading

0 comments on commit 9f5d286

Please sign in to comment.