Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made pmon feature delayed flag as jinja template #19482

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7a3d7e5
Fix the Loopback0 IPv6 address of LC's in chassis not reachable from
abdosi Aug 3, 2023
b5b08cf
Merge remote-tracking branch 'upstream/master'
abdosi Aug 17, 2023
8d9dbb6
Added change to have flag
abdosi Aug 17, 2023
d04bc54
Merge remote-tracking branch 'upstream/master'
abdosi Aug 23, 2023
264d912
Merge remote-tracking branch 'upstream/master'
abdosi Aug 25, 2023
957cd71
Merge remote-tracking branch 'upstream/master'
abdosi Aug 31, 2023
4e8b101
Assign the metric vaule for Ipv6 default route learnt via RA message to
abdosi Aug 31, 2023
05ec92a
Merge remote-tracking branch 'upstream/master'
abdosi Sep 8, 2023
fcbd38d
Add alternate name for bridge interface on supversior in chassis systrem
abdosi Sep 8, 2023
76019a7
Merge remote-tracking branch 'upstream/master'
abdosi Sep 8, 2023
6ad8644
Merge branch 'sonic-net:master' into master
abdosi Oct 28, 2023
7bb9243
Merge branch 'sonic-net:master' into master
abdosi Jan 18, 2024
fbaab85
Update service_checker.py
abdosi Jan 18, 2024
6c5ed3a
Update init_cfg.json.j2 to handle global scope for lldp feature
abdosi Apr 26, 2024
d17cde2
Merge branch 'sonic-net:master' into master
abdosi May 24, 2024
33a03e1
Update sonic-feature.yang
abdosi May 29, 2024
ed933ed
Merge remote-tracking branch 'origin/master'
abdosi May 31, 2024
93ee8f2
Merge remote-tracking branch 'upstream/master'
abdosi May 31, 2024
b110783
Merge remote-tracking branch 'upstream/master'
abdosi May 31, 2024
0f2d26d
Added support to parse "AssociatedSliceStr" attribute of minigraph and
abdosi May 31, 2024
c676b70
Revert "Added support to parse "AssociatedSliceStr" attribute of mini…
abdosi May 31, 2024
c862d61
Added support to parse "AssociatedSliceStr" attribute of minigraph and
abdosi May 31, 2024
5ba4ab2
Merge remote-tracking branch 'upstream/master'
abdosi Jun 3, 2024
d7705ee
Update minigraph.py
abdosi Jun 3, 2024
121ba2a
Merge remote-tracking branch 'upstream/master'
abdosi Jun 4, 2024
1a5c764
Merge branch 'master' of https://github.com/abdosi/sonic-buildimage
abdosi Jun 4, 2024
f8196ec
Merge remote-tracking branch 'upstream/master'
abdosi Jul 5, 2024
01d4ff0
pmon need not be delayed for SpineRouter/T2.
abdosi Jul 5, 2024
47bde91
Merge branch 'sonic-net:master' into master
abdosi Jul 12, 2024
a5a41dd
Updated Yang model for Feature delay from boolean to string
abdosi Jul 12, 2024
a9a38de
Fix Build Error
abdosi Jul 13, 2024
3411eb5
Fix build error
abdosi Jul 13, 2024
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
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 @@ -38,7 +38,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"),
Copy link
Contributor

@mlok-nokia mlok-nokia Jul 22, 2024

Choose a reason for hiding this comment

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

This PR works with PR sonic-net/sonic-host-services#135
But delayed value "true/false" in init_cfg.json.j2 is not matched the expected value which in the featured line 79 in sonic-net/sonic-host-services#135 change. The defined value should be "True/False".
This change causes the system fails to start PMON

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, I suppose it's because of the removal of 'lower()' function, not sure why Abhishek changed this behavior.
Let me draft another PR and see.

Copy link
Contributor

Choose a reason for hiding this comment

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

("snmp", "enabled", true, "enabled"),
("swss", "enabled", false, "enabled"),
("syncd", "enabled", false, "enabled")] %}
Expand Down Expand Up @@ -71,7 +71,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
Loading