Skip to content

Commit

Permalink
sysready
Browse files Browse the repository at this point in the history
Bring in all global functions under Sysmonitor class
Add unit test code coverage for sysmonitor code
Formatted the code
  • Loading branch information
sg893052 committed May 8, 2022
1 parent 470d735 commit 426c6cf
Show file tree
Hide file tree
Showing 7 changed files with 670 additions and 0 deletions.
6 changes: 6 additions & 0 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"has_global_scope": {% if feature + '.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
"has_per_asic_scope": {% if feature + '@.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
"auto_restart": "{{autorestart}}",
{# Set check_up_status to true here when app readiness will be marked in state db #}
{# For now, to support the infrastrucure, setting the check_up_status to false for bgp,swss,pmon #}
{# Once apps like bgp,synd supports app readiness, then bgp,syncd can set check_up_status to true #}
{%- if feature in ["bgp", "swss", "pmon"] %}
"check_up_status" : "false",
{%- endif %}
{%- if include_kubernetes == "y" %}
{%- if feature in ["lldp", "pmon", "radv", "snmp", "telemetry"] %}
"set_owner": "kube", {% else %}
Expand Down
3 changes: 3 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -864,3 +864,6 @@ sudo cp $BUILD_SCRIPTS_DIR/mask_disabled_services.py $FILESYSTEM_ROOT/tmp/
sudo chmod a+x $FILESYSTEM_ROOT/tmp/mask_disabled_services.py
sudo LANG=C chroot $FILESYSTEM_ROOT /tmp/mask_disabled_services.py
sudo rm -rf $FILESYSTEM_ROOT/tmp/mask_disabled_services.py


sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-dbus
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=rc-local.service database.service

[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/local/bin/determine-reboot-cause

[Install]
Expand Down
7 changes: 7 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-feature.yang
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ module sonic-feature{
type feature-owner;
default "local";
}

leaf check_up_status {
description "This configuration controls the system ready tool to check
the app ready/up status";
type boolean;
default false;
}
}
}
}
Expand Down
Loading

0 comments on commit 426c6cf

Please sign in to comment.