Skip to content
Merged
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
22 changes: 21 additions & 1 deletion files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,27 @@
{%- if feature in ["lldp", "pmon", "radv", "snmp", "telemetry"] %}
"set_owner": "kube", {% else %}
"set_owner": "local", {% endif %} {% endif %}
"high_mem_alert": "disabled"
"high_mem_alert": "disabled",
{%- if feature in ["bgp", "swss", "pmon", "nat", "teamd", "dhcp_relay", "sflow", "l2mcd", "udld", "stp", "snmp", "lldp", "radv", "iccpd", "syncd", "vrrp", "mgmt-framework", "tam"] %}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dhcp_relay is now an application extension package. We should not have it hardcoded as we may have images with dhcp_relay and without it.
We need to add this new field here - https://github.com/Azure/sonic-utilities/blob/master/sonic_package_manager/service_creator/feature.py#L34.
And we need to add a new manifest variable to control whether "check_up_status" should be up true or false which will also be an indication whether docker implements marking the up_status flag in STATE_DB.

"check_up_status" : "false"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we need this initialization, cant we assume if check_up_status field is not present, it's false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is part of framework provision for dockers to set "true" against "check_up_status" flag.
For now, all these dockers check_up_status is set to 'false'. Later once these dockers implement the logic of marking the up_status flag in STATE_DB, can set it to 'true' eventually.

{%- else %}
"check_up_status" : "false"
{%- endif %}
}{% if not loop.last %},{% endif -%}
{% endfor %}
},
{%- set host_features = [("caclmgrd", false),
("cron", false),
("docker", false),
("hostcfgd", false)] %}
"HOST_FEATURE": {
{%- for host_feature, check_up_status in host_features %}
"{{host_feature}}": {
{%- if host_feature in ["caclmgrd", "hostcfgd"] %}
"check_up_status" : "false"
{%- else %}
"check_up_status" : "false"
{%- endif %}
}{% if not loop.last %},{% endif -%}
{% endfor %}
}
Expand Down
8 changes: 8 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,14 @@ echo "ntp.service" | sudo tee -a $GENERATED_SERVICE_FILE
sudo LANG=C cp $IMAGE_CONFIGS/warmboot-finalizer/finalize-warmboot.sh $FILESYSTEM_ROOT/usr/local/bin/finalize-warmboot.sh
sudo LANG=C cp $IMAGE_CONFIGS/warmboot-finalizer/warmboot-finalizer.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
echo "warmboot-finalizer.service" | sudo tee -a $GENERATED_SERVICE_FILE
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable warmboot-finalizer.service

# Copy sysmonitor files
sudo LANG=C cp $IMAGE_CONFIGS/sysmonitor/sysmonitor.py $FILESYSTEM_ROOT/usr/local/bin/sysmonitor.py
sudo LANG=C cp $IMAGE_CONFIGS/sysmonitor/sysmonitor.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
echo "sysmonitor.service" | sudo tee -a $GENERATED_SERVICE_FILE
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable sysmonitor.service


# Copy watchdog-control files
sudo LANG=C cp $IMAGE_CONFIGS/watchdog-control/watchdog-control.sh $FILESYSTEM_ROOT/usr/local/bin/watchdog-control.sh
Expand Down
Loading