Skip to content

Commit 2c5c8a2

Browse files
authored
Addressed special characters in md file (#1129)
Due to special characters present in the md file. There was an page deployment error in workflow. This PR is updated with the fix for special characters present in the md file.
1 parent bf6fa10 commit 2c5c8a2

File tree

1 file changed

+42
-33
lines changed

1 file changed

+42
-33
lines changed

doc/syslog/syslog-rate-limit-design.md

+42-33
Original file line numberDiff line numberDiff line change
@@ -106,58 +106,67 @@ New tables shall be added to CONFIG DB to store the rate limit configuration. in
106106
}
107107
},
108108
"SYSLOG_CONFIG_FEATURE": {
109-
{%- for feature, _, _, _ in features %}
109+
{\%- for feature, _, _, _ in features \%}
110110
"{{feature}}": {
111111
"rate_limit_interval" : "300",
112112
"rate_limit_burst": "20000"
113-
}{%if not loop.last %},{% endif -%}
114-
{% endfor %}
113+
}{\%if not loop.last \%},{\% endif -\%}
114+
{\% endfor \%}
115115
}
116+
117+
NOTE: An extra backslash is added in front of % in the above code snippet. Remove the backslash while using the actual code in SONiC.
118+
116119
...
117120
```
118121

119122
#### rsyslog.conf.j2
120123

121124
```
122-
{% if SYSLOG_CONFIG is defined %}
123-
{% if 'GLOBAL' in SYSLOG_CONFIG %}
124-
{% if 'rate_limit_interval' in SYSLOG_CONFIG['GLOBAL']%}
125-
{% set rate_limit_interval = SYSLOG_CONFIG['GLOBAL']['rate_limit_interval'] %}
126-
{% endif %}
127-
{% if 'rate_limit_burst' in SYSLOG_CONFIG['GLOBAL']%}
128-
{% set rate_limit_burst = SYSLOG_CONFIG['GLOBAL']['rate_limit_burst'] %}
129-
{% endif %}
130-
{% endif %}
131-
{% endif %}
132-
133-
{% if rate_limit_interval is defined %}
125+
{\% if SYSLOG_CONFIG is defined \%}
126+
{\% if 'GLOBAL' in SYSLOG_CONFIG \%}
127+
{\% if 'rate_limit_interval' in SYSLOG_CONFIG['GLOBAL']\%}
128+
{\% set rate_limit_interval = SYSLOG_CONFIG['GLOBAL']['rate_limit_interval'] \%}
129+
{\% endif \%}
130+
{\% if 'rate_limit_burst' in SYSLOG_CONFIG['GLOBAL']\%}
131+
{\% set rate_limit_burst = SYSLOG_CONFIG['GLOBAL']['rate_limit_burst'] \%}
132+
{\% endif \%}
133+
{\% endif \%}
134+
{\% endif \%}
135+
136+
{\% if rate_limit_interval is defined \%}
134137
$SystemLogRateLimitInterval {{ rate_limit_interval }}
135-
{% endif %}
136-
{% if rate_limit_burst is defined %}
138+
{\% endif \%}
139+
{\% if rate_limit_burst is defined \%}
137140
$SystemLogRateLimitBurst {{ rate_limit_burst }}
138-
{% endif %}
141+
{\% endif \%}
142+
143+
NOTE: An extra backslash is added in front of % in the above code snippet. Remove the backslash while using the actual code in SONiC.
144+
139145
```
140146

141147
#### rsyslog-container.conf.j2
142148

143149
```
144-
{% if SYSLOG_CONFIG_FEATURE is defined %}
145-
{% if container_name in SYSLOG_CONFIG_FEATURE %}
146-
{% if 'rate_limit_interval' in SYSLOG_CONFIG_FEATURE[container_name]%}
147-
{% set rate_limit_interval = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_interval'] %}
148-
{% endif %}
149-
{% if 'rate_limit_burst' in SYSLOG_CONFIG_FEATURE[container_name]%}
150-
{% set rate_limit_burst = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_burst'] %}
151-
{% endif %}
152-
{% endif %}
153-
{% endif %}
154-
155-
{% if rate_limit_interval is defined %}
150+
{\% if SYSLOG_CONFIG_FEATURE is defined \%}
151+
{\% if container_name in SYSLOG_CONFIG_FEATURE \%}
152+
{\% if 'rate_limit_interval' in SYSLOG_CONFIG_FEATURE[container_name]\%}
153+
{\% set rate_limit_interval = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_interval'] \%}
154+
{\% endif \%}
155+
{\% if 'rate_limit_burst' in SYSLOG_CONFIG_FEATURE[container_name]\%}
156+
{\% set rate_limit_burst = SYSLOG_CONFIG_FEATURE[container_name]['rate_limit_burst'] \%}
157+
{\% endif \%}
158+
{\% endif \%}
159+
{\% endif\%}
160+
161+
{\% if rate_limit_interval is defined \%}
156162
$SystemLogRateLimitInterval {{ rate_limit_interval }}
157-
{% endif %}
158-
{% if rate_limit_burst is defined %}
163+
{\% endif \%}
164+
{\% if rate_limit_burst is defined \%}
159165
$SystemLogRateLimitBurst {{ rate_limit_burst }}
160-
{% endif %}
166+
{\% endif \%}
167+
168+
NOTE: An extra backslash is added in front of % in the above code snippet. Remove the backslash while using the actual code in SONiC.
169+
161170
```
162171

163172
#### docker_image_ctl.j2

0 commit comments

Comments
 (0)