Skip to content

Commit 59e8199

Browse files
Remove Persistent Drop Alerts Table and Debug Drop Monitor Stats from yang-models
These tables belongs to counters DB and hence should not need a yang model
1 parent bc22966 commit 59e8199

File tree

5 files changed

+0
-259
lines changed

5 files changed

+0
-259
lines changed

src/sonic-yang-models/doc/Configuration.md

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* [CRM DASH](#crm-dash)
2828
* [DEBUG_COUNTER and DEBUG_COUNTER_DROP_REASON](#debug_counter-and-debug_counter_drop_reason)
2929
* [DEBUG_DROP_MONITOR](#debug_drop_monitor)
30-
* [DEBUG_DROP_MONITOR_STATS](#debug_drop_monitor_stats)
3130
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
3231
* [Device Metadata](#device-metadata)
3332
* [Device neighbor metada](#device-neighbor-metada)
@@ -60,7 +59,6 @@
6059
* [NTP Global Configuration](#ntp-global-configuration)
6160
* [NTP Servers](#ntp-servers)
6261
* [Peer Switch](#peer-switch)
63-
* [PERSISTENT_DROP_ALERTS](#persistent_drop_alerts)
6462
* [Policer](#policer)
6563
* [Port](#port)
6664
* [Port Channel](#port-channel)
@@ -1042,30 +1040,6 @@ be modified via the CLI.
10421040
}
10431041
```
10441042

1045-
### DEBUG_DROP_MONITOR_STATS
1046-
This table stores metadata related to packet drops for the configured drop counters. This metadata is used by the configurable drop count monitoring feature to detect persistent
1047-
drops.
1048-
1049-
key = DEBUG_DROP_MONITOR_STATS:name|port
1050-
name = name of a counter in DEBUG_COUNTER_TABLE
1051-
port = Any of the ingress/egress ports supported by the counter
1052-
prev_drop_count = The last recorded drop count on this port by the configured drop counter
1053-
incidents = A vector of incidents recorded on this drop counter which are within the configured time window
1054-
1055-
For more details on incidents refer to drop_counters_HLD.md
1056-
1057-
```
1058-
{
1059-
"DEBUG_DROP_MONITOR_STATS": {
1060-
"DEBUG_0|Ethernet0": {
1061-
"prev_drop_count": "10",
1062-
"incidents": ['1746495767', '1746556475']
1063-
}
1064-
}
1065-
}
1066-
```
1067-
1068-
10691043
### DEFAULT_LOSSLESS_BUFFER_PARAMETER
10701044

10711045
This table stores the default lossless buffer parameters for dynamic buffer calculation.
@@ -2024,27 +1998,6 @@ Below is an exmaple of the peer switch table configuration.
20241998
}
20251999
```
20262000
2027-
### PERSISTENT_DROP_ALERTS
2028-
This table records the persistent drops detected on the configured drop counters
2029-
2030-
key = PERSISTENT_DROP_ALERTS:name|timestamp
2031-
name = Name of the counter in DEBUG_COUNTER table
2032-
timestamp = Unix timestamp when the alert was triggered
2033-
message = Message describing the persistent drop and the interface affected by it
2034-
2035-
For more details on the how persistent drops are detected refer to drop_counters_HLD.md
2036-
```
2037-
{
2038-
"PERSISTENT_DROP_ALERTS": {
2039-
"DEBUG_1|1746556475": {
2040-
"message": "Persistent packet drops detected on Ethernet1"
2041-
},
2042-
"DEBUG_1|1746495543": {
2043-
"message": "Persistent packet drops detected on Ethernet0"
2044-
}
2045-
}
2046-
}
2047-
20482001
### Policer
20492002
20502003
Below is an example of the policer table configuration.

src/sonic-yang-models/tests/files/sample_config_db.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,22 +2231,6 @@
22312231
}
22322232
},
22332233

2234-
"DEBUG_DROP_MONITOR_STATS": {
2235-
"DEBUG_4|Ethernet0": {
2236-
"prev_drop_count": "20",
2237-
"incidents": ["1746495767", "1746556475"]
2238-
}
2239-
},
2240-
2241-
"PERSISTENT_DROP_ALERTS": {
2242-
"DEBUG_4|1746556475": {
2243-
"message": "Persistent packet drops detected on Ethernet1"
2244-
},
2245-
"DEBUG_4|1746495543": {
2246-
"message": "Persistent packet drops detected on Ethernet0"
2247-
}
2248-
},
2249-
22502234
"QUEUE": {
22512235
"Ethernet0|0": {
22522236
"scheduler": "TEST@0",

src/sonic-yang-models/tests/yang_model_tests/tests/debug_counter.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,5 @@
2828
"INVALID_DEBUG_DROP_MONITOR_STATUS": {
2929
"desc": "Configure invalid value for status.",
3030
"eStrKey": "InvalidValue"
31-
},
32-
"VALID_DEBUG_DROP_MONITOR_STATS": {
33-
"desc": "Configure DEBUG_DROP_MONITOR_STATS with valid config."
34-
},
35-
"INVALID_PREV_DROP_COUNT_FOR_DROP_MONITOR_STATS": {
36-
"desc": "Configure negative prev_drop_count in DEBUG_DROP_MONITOR_STATS.",
37-
"eStrKey": "InvalidValue"
38-
},
39-
"NONEXIST_DEBUG_COUNTER_FOR_DROP_MONITOR_STATS":{
40-
"desc": "Add a drop monitor stats for a non-existent counter",
41-
"eStr": "The counter does not exist in the DEBUG_COUNTER table"
42-
},
43-
"VALID_PERSISTENT_DROP_ALERTS": {
44-
"desc": "Configure valid persistent drop alerts"
45-
},
46-
"INVALID_PERSISTENT_DROP_ALERTS": {
47-
"desc": "Add a persistent alert for a non-existent counter",
48-
"eStr": "The counter does not exist in the DEBUG_COUNTER table"
4931
}
5032
}

src/sonic-yang-models/tests/yang_model_tests/tests_config/debug_counter.json

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -179,123 +179,5 @@
179179
}
180180
}
181181
}
182-
},
183-
"VALID_DEBUG_DROP_MONITOR_STATS": {
184-
"sonic-debug-counter:sonic-debug-counter": {
185-
"sonic-debug-counter:DEBUG_COUNTER": {
186-
"DEBUG_COUNTER_LIST": [
187-
{
188-
"name": "Counter 1",
189-
"type": "SWITCH_INGRESS_DROPS"
190-
}
191-
]
192-
},
193-
"sonic-debug-counter:DEBUG_DROP_MONITOR_STATS": {
194-
"DEBUG_DROP_MONITOR_STATS_LIST": [
195-
{
196-
"name": "Counter 1",
197-
"port": "Ethernet0",
198-
"prev_drop_count": "20",
199-
"incidents": ["1746556475", "1746495767"]
200-
}
201-
]
202-
}
203-
}
204-
},
205-
"INVALID_PREV_DROP_COUNT_FOR_DROP_MONITOR_STATS": {
206-
"sonic-debug-counter:sonic-debug-counter": {
207-
"sonic-debug-counter:DEBUG_COUNTER": {
208-
"DEBUG_COUNTER_LIST": [
209-
{
210-
"name": "Counter 1",
211-
"type": "SWITCH_INGRESS_DROPS"
212-
}
213-
]
214-
},
215-
"sonic-debug-counter:DEBUG_DROP_MONITOR_STATS": {
216-
"DEBUG_DROP_MONITOR_STATS_LIST": [
217-
{
218-
"name": "Counter 1",
219-
"port": "Ethernet0",
220-
"prev_drop_count": "-1",
221-
"incidents": ["1746556475", "1746495767"]
222-
}
223-
]
224-
}
225-
}
226-
},
227-
"NONEXIST_DEBUG_COUNTER_FOR_DROP_MONITOR_STATS": {
228-
"sonic-debug-counter:sonic-debug-counter": {
229-
"sonic-debug-counter:DEBUG_COUNTER": {
230-
"DEBUG_COUNTER_LIST": [
231-
{
232-
"name": "Counter 1",
233-
"type": "SWITCH_INGRESS_DROPS"
234-
}
235-
]
236-
},
237-
"sonic-debug-counter:DEBUG_DROP_MONITOR_STATS": {
238-
"DEBUG_DROP_MONITOR_STATS_LIST": [
239-
{
240-
"name": "Counter 2",
241-
"port": "Ethernet0",
242-
"prev_drop_count": "10",
243-
"incidents": ["1746556475", "1746495767"]
244-
}
245-
]
246-
}
247-
}
248-
},
249-
"VALID_PERSISTENT_DROP_ALERTS": {
250-
"sonic-debug-counter:sonic-debug-counter": {
251-
"sonic-debug-counter:DEBUG_COUNTER": {
252-
"DEBUG_COUNTER_LIST": [
253-
{
254-
"name": "Counter 1",
255-
"type": "SWITCH_INGRESS_DROPS"
256-
}
257-
]
258-
},
259-
"sonic-debug-counter:PERSISTENT_DROP_ALERTS": {
260-
"PERSISTENT_DROP_ALERTS_LIST": [
261-
{
262-
"name": "Counter 1",
263-
"timestamp": "1746495767",
264-
"message": "Persistent packet drops detected on Ethernet0"
265-
},
266-
{
267-
"name": "Counter 1",
268-
"timestamp": "1746495764",
269-
"message": "Persistent packet drops detected on Ethernet1"
270-
}
271-
]
272-
}
273-
}
274-
},
275-
"INVALID_PERSISTENT_DROP_ALERTS": {
276-
"sonic-debug-counter:sonic-debug-counter": {
277-
"sonic-debug-counter:DEBUG_COUNTER": {
278-
"DEBUG_COUNTER_LIST": [
279-
{
280-
"name": "Counter 1",
281-
"type": "SWITCH_INGRESS_DROPS"
282-
}
283-
]
284-
},
285-
"sonic-debug-counter:PERSISTENT_DROP_ALERTS": {
286-
"PERSISTENT_DROP_ALERTS_LIST": [
287-
{
288-
"name": "Counter 2",
289-
"timestamp": "1746495767",
290-
"message": "Persistent packet drops detected on Ethernet0"
291-
},
292-
{
293-
"name": "Counter 2",
294-
"timestamp": "1746495764",
295-
"message": "Persistent packet drops detected on Ethernet1"
296-
}
297-
]
298-
}
299-
}
300182
}
301183
}

src/sonic-yang-models/yang-models/sonic-debug-counter.yang

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -97,38 +97,6 @@ module sonic-debug-counter {
9797
}
9898
}
9999

100-
container DEBUG_DROP_MONITOR_STATS {
101-
description "Stores stats relevant to packet drops, this metadata is used to detect persistent drops.";
102-
103-
list DEBUG_DROP_MONITOR_STATS_LIST {
104-
key "name port";
105-
106-
leaf name {
107-
/* Counter must first be created in DEBUG_COUNTER_TABLE before we can add reasons to it */
108-
must "(current() = ../../../DEBUG_COUNTER/DEBUG_COUNTER_LIST[name=current()]/name)" {
109-
error-message "The counter does not exist in the DEBUG_COUNTER table";
110-
}
111-
type string;
112-
description "Name of the debug counter";
113-
}
114-
115-
leaf port {
116-
type string;
117-
description "Name of the port or interface";
118-
}
119-
120-
leaf prev_drop_count {
121-
type uint64;
122-
description "Stores the last known drop count value";
123-
}
124-
125-
leaf-list incidents {
126-
type uint64;
127-
description "Stores incidents that occured in the current time window";
128-
}
129-
}
130-
}
131-
132100
container DEBUG_DROP_MONITOR {
133101
container CONFIG {
134102
description "Stores configuration for debug drop monitor in CONFIG_DB";
@@ -140,33 +108,5 @@ module sonic-debug-counter {
140108
}
141109
}
142110
}
143-
144-
container PERSISTENT_DROP_ALERTS {
145-
description
146-
"Top-level container for persistent packet drop alerts.";
147-
148-
list PERSISTENT_DROP_ALERTS_LIST {
149-
key "name timestamp";
150-
151-
leaf name {
152-
/* Counter must first be created in DEBUG_COUNTER_TABLE before we can add reasons to it */
153-
must "(current() = ../../../DEBUG_COUNTER/DEBUG_COUNTER_LIST[name=current()]/name)" {
154-
error-message "The counter does not exist in the DEBUG_COUNTER table";
155-
}
156-
type string;
157-
description "Name of the debug counter";
158-
}
159-
160-
leaf timestamp {
161-
type uint64;
162-
description "Unix timestamp of when the persistent drop alert was recorded.";
163-
}
164-
165-
leaf message {
166-
type string;
167-
description "Descriptive message about the packet drop incident.";
168-
}
169-
}
170-
}
171111
}
172112
}

0 commit comments

Comments
 (0)