-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Auto Techsupport] Event driven Techsupport Changes #8670
Merged
Merged
Changes from 32 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
436f4ec
AUTO_TECHUPPORT yang model added
vivekrnv c88529f
auto TS changes
vivekrnv ba435fb
Flag added to slave.mk
vivekrnv 9c68bc2
auto_ts model updated
vivekrnv 995034b
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
vivekrnv acca347
init_cfg is modified
vivekrnv 09dd71a
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
vivekrnv f2754d6
YANG model edited
vivekrnv 9128b6e
init_cfg edit
vivekrnv 91a1468
init_cfg corrected
vivekrnv ea0966e
tests modified
vivekrnv 3531d47
Made the Compile time flag interactive
vivekrnv 2359bb8
exit-listener updated
vivekrnv b375827
Yang model updated
vivekrnv 750afc9
Table Name Change for proc_exit_event
vivekrnv 8324fc3
Yang Updated for comments
vivekrnv 7479a1f
Merge Conflict Resolved
vivekrnv e10bf07
init_cfg and YANG updated
vivekrnv ae855e0
Script updated for backward compatibility
vivekrnv 301fb48
Description tag added to YANG
vivekrnv 9b29fca
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
vivekrnv fc7b979
Indentation changes and minor edits
vivekrnv 6dd95b8
YANG model updated
vivekrnv d0c70ed
init_cfg edited
vivekrnv c822b76
init_cfg updated
vivekrnv 8bc38f9
YANG Models Updated
vivekrnv 661065c
Merge branch 'master' into event_driven_ts
vivekrnv 1f957c9
Updated the YANG model
vivekrnv 2b79d52
Merge branch 'event_driven_ts' of https://github.com/vivekreddynv/son…
vivekrnv 798b6b5
YANG updated
vivekrnv eaf28a2
Supervisor Proc exit listener dependency removed
vivekrnv ee95b7a
Updated description
vivekrnv f19eb34
Merge branch 'master' into event_driven_ts
vivekrnv c32e68f
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
vivekrnv 559a5e2
Comment Updated
vivekrnv 27a674b
Merge branch 'Azure:master' into event_driven_ts
vivekrnv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/sonic-yang-models/tests/yang_model_tests/tests/auto_techsupport.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"AUTO_TECHSUPPORT_TEST":{ | ||
"desc": "Configure auto techsupport params in AUTO_TECHSUPPORT Table" | ||
}, | ||
"AUTO_TECHSUPPORT_WRONG_STATE_VALUE": { | ||
"desc": "Configure state key with invalid value", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"AUTO_TECHSUPPORT_INVALID_RATE_LIMIT_FORMAT": { | ||
"desc" : "Configure cooloff with a value of invalid format", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"AUTO_TECHSUPPORT_OUT_OF_RANGE_DECIMAL": { | ||
"desc" : "Configure a value for core-uage outside the range [0, 100)", | ||
"eStr": "Value \"100.00\" does not satisfy the constraint \"0..99.99\" (range, length, or pattern)." | ||
}, | ||
"AUTO_TECHSUPPORT_VALID_DECIMAL_VALUE": { | ||
"desc" : "Configure a value for max_techsupport_size inside the range [0, 100)" | ||
}, | ||
"AUTO_TECHSUPPORT_INVALID_FRACTION_DIGITS": { | ||
"desc" : "Configure a value for max_techsupport_size inside the range [0, 100) but with 3 fractional digits", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"AUTO_TECHSUPPORT_RATE_LIMIT_INTERVAL_TEST": { | ||
"desc" : "Configure and test the valid configuration" | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
src/sonic-yang-models/tests/yang_model_tests/tests_config/auto_techsupport.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"AUTO_TECHSUPPORT_TEST": { | ||
"sonic-auto_techsupport:sonic-auto_techsupport": { | ||
"sonic-auto_techsupport:AUTO_TECHSUPPORT": { | ||
"sonic-auto_techsupport:GLOBAL": { | ||
"state" : "enabled", | ||
"rate_limit_interval" : "180", | ||
"max_techsupport_limit" : "10.0", | ||
"max_core_limit" : "5.0", | ||
"since" : "2 days ago" | ||
} | ||
} | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_WRONG_STATE_VALUE": { | ||
"sonic-auto_techsupport:sonic-auto_techsupport": { | ||
"sonic-auto_techsupport:AUTO_TECHSUPPORT": { | ||
"sonic-auto_techsupport:GLOBAL": { | ||
"state" : "start", | ||
"rate_limit_interval" : "180", | ||
"max_techsupport_limit" : "10.0", | ||
"max_core_limit" : "5.0", | ||
"since" : "2 days ago" | ||
} | ||
} | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_INVALID_RATE_LIMIT_FORMAT": { | ||
"sonic-auto_techsupport:sonic-auto_techsupport": { | ||
"sonic-auto_techsupport:AUTO_TECHSUPPORT": { | ||
"sonic-auto_techsupport:GLOBAL": { | ||
"rate_limit_interval" : "whatever" | ||
} | ||
} | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_OUT_OF_RANGE_DECIMAL": { | ||
"sonic-auto_techsupport:sonic-auto_techsupport": { | ||
"sonic-auto_techsupport:AUTO_TECHSUPPORT": { | ||
"sonic-auto_techsupport:GLOBAL": { | ||
"max_core_limit" : "100.00", | ||
"rate_limit_interval" : "180" | ||
} | ||
} | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_VALID_DECIMAL_VALUE": { | ||
"sonic-auto_techsupport:sonic-auto_techsupport": { | ||
"sonic-auto_techsupport:AUTO_TECHSUPPORT": { | ||
"sonic-auto_techsupport:GLOBAL": { | ||
"max_techsupport_limit" : "11.23", | ||
"max_core_limit" : "99.99" | ||
} | ||
} | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_INVALID_FRACTION_DIGITS": { | ||
"sonic-auto_techsupport:sonic-auto_techsupport": { | ||
"sonic-auto_techsupport:AUTO_TECHSUPPORT": { | ||
"sonic-auto_techsupport:GLOBAL": { | ||
"max_techsupport_limit" : "11.111", | ||
"max_core_limit" : "99.99" | ||
} | ||
} | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_RATE_LIMIT_INTERVAL_TEST": { | ||
"sonic-auto_techsupport:sonic-auto_techsupport": { | ||
"sonic-auto_techsupport:AUTO_TECHSUPPORT_FEATURE": { | ||
"AUTO_TECHSUPPORT_FEATURE_LIST": [ | ||
{ | ||
"feature_name" : "bgp", | ||
"state" : "enabled", | ||
"rate_limit_interval" : "600" | ||
}, | ||
{ | ||
"feature_name" : "swss", | ||
"state" : "disabled", | ||
"rate_limit_interval" : "400" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
113 changes: 113 additions & 0 deletions
113
src/sonic-yang-models/yang-models/sonic-auto_techsupport.yang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
module sonic-auto_techsupport { | ||
|
||
yang-version 1.1; | ||
|
||
namespace "http://github.com/Azure/sonic-auto_techsupport"; | ||
prefix auto_techsupport; | ||
|
||
import sonic-types { | ||
prefix stypes; | ||
} | ||
|
||
description "Event Driven Techsupport & CoreDump Mgmt Capability in SONiC OS"; | ||
|
||
revision 2021-08-09 { | ||
description "First Revision"; | ||
} | ||
|
||
typedef decimal-repr { | ||
type decimal64 { | ||
fraction-digits 2; | ||
range 0.0..99.99; | ||
} | ||
} | ||
|
||
container sonic-auto_techsupport { | ||
|
||
container AUTO_TECHSUPPORT { | ||
|
||
description "AUTO_TECHSUPPORT part of config_db.json"; | ||
|
||
container GLOBAL { | ||
|
||
leaf state { | ||
description "Knob to make techsupport invocation event-driven based on core-dump generation"; | ||
type stypes:admin_mode; | ||
} | ||
|
||
leaf rate_limit_interval { | ||
description "Minimum time in seconds between two successive techsupport invocations. Configure 0 to explicitly disable"; | ||
type uint16; | ||
} | ||
|
||
leaf max_techsupport_limit { | ||
/* | ||
A value between (0,100) should be specified. | ||
Upto two decimal places will be used in the calculation | ||
The actual value in bytes is calculate based on the available space in the filesystem hosting /var/dump | ||
When the limit is crossed, the older core files are incrementally deleted | ||
*/ | ||
description "Max Limit in percentage for the cummulative size of ts dumps. No cleanup is performed if the value isn't configured or is 0.0"; | ||
type decimal-repr; | ||
} | ||
|
||
leaf max_core_limit { | ||
/* | ||
A value between (0,100) should be specified. | ||
Upto two decimal places will be used in the calculation | ||
The actual value in bytes is calculated based on the available space in the filesystem hosting /var/core | ||
When the limit is crossed, the older core files are deleted | ||
*/ | ||
description "Max Limit in percentage for the cummulative size of core dumps. No cleanup is performed if the value isn't congiured or is 0.0"; | ||
type decimal-repr; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. range 0.0..99.99? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. commented above |
||
} | ||
|
||
leaf since { | ||
/* | ||
Any valid date string of the formats specified here (https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html) | ||
can be used. | ||
*/ | ||
description "Only collect the logs & core-dumps generated since the time provided. A default value of '2 days ago' is used if this value is not set explicitly or a non-valid string is provided"; | ||
type string { | ||
length 1..255; | ||
} | ||
} | ||
} | ||
/* end of container GLOBAL */ | ||
} | ||
/* end of container AUTO_TECHSUPPORT */ | ||
|
||
container AUTO_TECHSUPPORT_FEATURE { | ||
|
||
description "AUTO_TECHSUPPORT_FEATURE part of config_db.json"; | ||
|
||
list AUTO_TECHSUPPORT_FEATURE_LIST { | ||
|
||
key "feature_name"; | ||
|
||
leaf feature_name { | ||
description "The name of this feature"; | ||
/* TODO: Leafref once the FEATURE YANG is added*/ | ||
type string { | ||
length 1..255; | ||
} | ||
} | ||
|
||
leaf state { | ||
description "Enable auto techsupport invocation on the processes running inside this feature"; | ||
type stypes:admin_mode; | ||
} | ||
|
||
leaf rate_limit_interval { | ||
description "Rate limit interval for the corresponding feature. Configure 0 to explicitly disable"; | ||
type uint16; | ||
} | ||
|
||
} | ||
/* end of AUTO_TECHSUPPORT_FEATURE_LIST */ | ||
} | ||
/* end of container AUTO_TECHSUPPORT_FEATURE */ | ||
} | ||
/* end of top level container */ | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value is between (0, 100) here. But decimal-repr range is from 0.0 to 99.99, can you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was intended to be b/w 0.0 to 99.99. As for the comment
(A value between (0,100) should be specified, Upto two decimal places will be used in the calculation)
, I've used open brackets to signify the value is between 0 & 100. and the next comment suggests that upto two decimal places are used. So, i think this is clear. Although, let me know, if i have to re-write comments to make them clearThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open brackets does not include 0 and 100? Please update comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the comment