[services][mgmt-framework] delay mgmt-framework service on boot (#5226)
management framework provides management plane services like rest and CLI which is not needed right after boot, instead by delaying this service we give some more CPU for data plane and control plane services on fast/warm boot. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
This commit is contained in:
parent
7d3ec60b1f
commit
b31050d60e
@ -29,7 +29,7 @@
|
||||
("syncd", "enabled", false, "enabled"),
|
||||
("teamd", "enabled", false, "enabled")] %}
|
||||
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", false, "enabled")) %}{% endif %}
|
||||
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", false, "enabled")) %}{% endif %}
|
||||
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", true, "enabled")) %}{% endif %}
|
||||
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", false, "enabled")) %}{% endif %}
|
||||
{%- if include_restapi == "y" %}{% do features.append(("restapi", "enabled", false, "enabled")) %}{% endif %}
|
||||
{%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", false, "enabled")) %}{% endif %}
|
||||
|
@ -10,5 +10,3 @@ ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
|
||||
ExecStart=/usr/bin/{{docker_container_name}}.sh wait
|
||||
ExecStop=/usr/bin/{{docker_container_name}}.sh stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
9
files/build_templates/mgmt-framework.timer
Normal file
9
files/build_templates/mgmt-framework.timer
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Delays management framework container until SONiC has started
|
||||
|
||||
[Timer]
|
||||
OnBootSec=3min 30 sec
|
||||
Unit=mgmt-framework.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
@ -542,11 +542,17 @@ sudo LANG=C cp $SCRIPTS_DIR/sonic-netns-exec $FILESYSTEM_ROOT/usr/bin/sonic-netn
|
||||
# It implements delayed start of services
|
||||
sudo cp $BUILD_TEMPLATES/snmp.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
|
||||
echo "snmp.timer" | sudo tee -a $GENERATED_SERVICE_FILE
|
||||
|
||||
{% if include_system_telemetry == 'y' %}
|
||||
sudo cp $BUILD_TEMPLATES/telemetry.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
|
||||
echo "telemetry.timer" | sudo tee -a $GENERATED_SERVICE_FILE
|
||||
{% endif %}
|
||||
|
||||
{% if include_mgmt_framework == 'y' %}
|
||||
sudo cp $BUILD_TEMPLATES/mgmt-framework.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
|
||||
echo "mgmt-framework.timer" | sudo tee -a $GENERATED_SERVICE_FILE
|
||||
{% endif %}
|
||||
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python-dev
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get clean -y
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get autoremove -y
|
||||
|
Loading…
Reference in New Issue
Block a user