Skip to content

Commit

Permalink
Make pmon feature delayed flag as jinja template (#19657)
Browse files Browse the repository at this point in the history
* Fix the Loopback0 IPv6 address of LC's in chassis not reachable from
peer device's

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Added change to have flag

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Assign the metric vaule for Ipv6 default route learnt via RA message to
higher value so that BGP learnt default route is higher priority.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Add alternate name for bridge interface on supversior in chassis systrem

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Update service_checker.py

* Update init_cfg.json.j2 to handle global scope for lldp feature

* Update sonic-feature.yang

* Added support to parse "AssociatedSliceStr" attribute of minigraph and
save as `slice_type` as part of DEVICE_METADATA

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Revert "Added support to parse "AssociatedSliceStr" attribute of minigraph and"

This reverts commit 0f2d26d.

* Added support to parse "AssociatedSliceStr" attribute of minigraph and
 save as `slice_type` as part of DEVICE_METADATA for Chassis Device type

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Update minigraph.py

* pmon need not be delayed for SpineRouter/T2.
pmon need to enable asap to detect ASIC's on Supervisor.
pmonm need to enable asap for bring-up of 400G ports on LC's fast
becuase of CMIS state machine present in PMON.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Updated Yang model for Feature delay from boolean to string

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Fix Build Error

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Fix build error

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Update true/false to True/False

---------

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Co-authored-by: Abhishek Dosi <abdosi@microsoft.com>
Co-authored-by: abdosi <58047199+abdosi@users.noreply.github.com>
  • Loading branch information
3 people authored and mssonicbld committed Jul 26, 2024
1 parent 8091016 commit b0f7c9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{%- set features = [("bgp", "{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] or ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['supervisor']) %}disabled{% else %}enabled{% endif %}", false, "enabled"),
("database", "always_enabled", false, "always_enabled"),
("lldp", "enabled", true, "enabled"),
("pmon", "enabled", true, "enabled"),
("pmon", "enabled", "{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %}False{% else %}True{% endif %}", "enabled"),
("snmp", "enabled", true, "enabled"),
("swss", "enabled", false, "enabled"),
("syncd", "enabled", false, "enabled")] %}
Expand Down Expand Up @@ -70,7 +70,7 @@
{%- for feature, state, delayed, autorestart in features %}
"{{feature}}": {
"state": "{{state}}",
"delayed" : {{delayed | lower()}},
"delayed" : "{{delayed}}",
{%- if feature in ["lldp"] %}
"has_global_scope": {% raw %}"{% if ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['linecard']) %}False{% else %}True{% endif %}"{% endraw %},
"has_per_asic_scope": {% raw %}"{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] or ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['supervisor']) %}False{% else %}True{% endif %}"{% endraw %},
Expand Down
7 changes: 6 additions & 1 deletion src/sonic-yang-models/yang-models/sonic-feature.yang
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ module sonic-feature{
type string;
}

typedef feature-delay-status {
description "configuration to set the feature has delay scope as True/False";
type string;
}

container sonic-feature {

container FEATURE {
Expand Down Expand Up @@ -60,7 +65,7 @@ module sonic-feature{
leaf delayed {
description "This configuration identicates if the feature needs to be delayed until
system initialization";
type stypes:boolean_type;
type feature-delay-status;
default "false";
}

Expand Down

0 comments on commit b0f7c9c

Please sign in to comment.