Skip to content

Commit c938c0d

Browse files
adding graceful shutdown commands at a portchannel level (sonic-net#60)
1 parent 9e045ea commit c938c0d

File tree

1 file changed

+57
-14
lines changed

1 file changed

+57
-14
lines changed

L2/PortChannel/Portchannel_Enhancements.md

+57-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
### Portchannel Enhancements in SONiC
33

44
# High Level Design Document
5-
#### Rev 0.1
5+
#### Rev 0.2
66

77
# Table of Contents
88
* [List of Tables](#list-of-tables)
@@ -62,6 +62,7 @@
6262
| Rev | Date | Author | Change Description |
6363
|:---:|:-----------:|:------------------:|-----------------------------------|
6464
| 0.1 | 04/22/2020 | Madhukar K | Initial version |
65+
| 0.2 | 07/25/2020 | Madhukar K | Adding portchannel level commands |
6566

6667
# About this Manual
6768
This document provides details on Port Channel enhancements in SONiC.
@@ -84,7 +85,7 @@ This document describes the high level design of Port Channel enhancements in SO
8485
- Upon enabling PortChannel graceful shutdown mode, all the portchannels in the system should be operationally down and stop traffic transmission and reception.
8586

8687
### 1.1.2 Configuration and Management Requirements
87-
Provide configuration to enable/disable Port Channel graceful shutdown mode with the KLISH and click CLI.
88+
Provide configuration to enable/disable Port Channel graceful shutdown mode globally and at portchannel level with the KLISH and click CLI.
8889

8990
### 1.1.3 Scalability Requirements
9091
All the supported portchannels in the device should enable/disable graceful shutdown mode upon user trigger.
@@ -108,13 +109,14 @@ In MCLAG topologies, one of the two MCLAG nodes is put into graceful shutdown mo
108109

109110
## 2.2 Functional Description
110111
In MCLAG topologies, the Port Channel graceful shutdown mode allows users to upgrade the switch software by forwarding the data through the peer MCLAG switch. The goal is to maintain the data connectivity while the software is being upgraded on one of the MCLAG nodes. In order to achieve this, all the portchannels in that MCLAG node are brought down operationally when the device enters the Port Channel graceful shutdown mode.
111-
In the Port Channel graceful shutdown mode
112+
In the Port Channel graceful shutdown mode:
112113

113114
- any newly created portchannel will be operationally down
114115
- existing portchannel memberships(of the ports) can be changed by the user
115116
- existing portchannels can be deleted by the user
116117

117-
The Port Channel graceful shutdown mode cannot be enabled/disabled for individual portchannels; it applies to all the portchannels present in the system.
118+
The Port Channel graceful shutdown mode can be enabled/disabled for individual portchannels; portchannel level configuration is applicable only if Port Channel graceful shutdown is enabled globally.
119+
Note: User should disable the Port Channel graceful shutdown at the portchannel level before enabling globally, if a given portchannel is desired to be operationally up.
118120

119121
# 3 Design
120122

@@ -126,12 +128,22 @@ On SONiC device, when user wants to upgrade the firmware or resolve any issue on
126128
- since the LACP state machine for all the member ports is stopped, the portchannels that are operationally up become down
127129
- LACPDUs received on the member ports of the portchannels are silently discarded
128130
- If user triggers a config save followed with a reload (config-reload or cold-reboot) - after reload, the device will come up with all the configured portchannels in graceful shutdown mode. The portchannels will be operationally down.
131+
- the portchannels that have portchannel level graceful shutdown disabled are not altered; they continue to be in the same operational status
129132

130133
Upon exiting the Port Channel graceful shutdown mode:
131134
- LACP state machine is started afresh for all the portchannel member ports that are link up
132135
- LACPDUs are transmitted and received on the all the portchannel member ports that are link up
133136
- Portchannels will be operationally up if the LACP convergence succeeds
134137

138+
If the graceful-shutdown is enabled globally:
139+
- If there is no configuration at the portchannel level - all the portchannels in the system are brought DOWN
140+
- If graceful-shutdown is disabled on a given portchannel(say PortChannel5) - all the portchannels except PortChannel5 are brought DOWN
141+
- enable graceful-shutdown on the portchannel which had graceful-shutdown disabled - PortChannel5 is brought DOWN
142+
143+
If the graceful-shutdown is disabled globally:
144+
- If graceful-shutdown is enabled at a portchannel level - this is a NO-OP; the portchannel continues to be UP
145+
- If graceful-shutdown is disabled at a portchannel level - this is a NO-OP; the portchannel continues to be UP
146+
135147
### 3.1.1 Teamd configuration
136148
The user will be able to enable/disable the Port Channel graceful shutdown mode.
137149

@@ -143,8 +155,12 @@ Team Manager listens to the enable/disable modes of the Port Channel graceful sh
143155
## 3.2 DB Changes
144156
### 3.2.1 CONFIG DB
145157
A new table PORTCHANNEL_GLOBAL is introduced. In the PORTCHANNEL_GLOBAL table:
146-
- the "graceful_shutdown_mode" field is set to "enable" if user enables the Port Channel graceful shutdown mode
147-
- the "graceful_shutdown_mode" field is set to "disable" if user disables the Port Channel graceful shutdown mode
158+
- the "graceful_shutdown_mode" field is set to "enable" if user enables the Port Channel graceful shutdown mode globally
159+
- the "graceful_shutdown_mode" field is set to "disable" if user disables the Port Channel graceful shutdown mode globally
160+
161+
In the PORTCHANNEL table:
162+
- the "graceful_shutdown_mode" field is set to "enable" if user enables the Port Channel graceful shutdown mode at the portchannel level
163+
- the "graceful_shutdown_mode" field is set to "disable" if user disables the Port Channel graceful shutdown mode at the portchannel level
148164

149165
### 3.2.2 APP DB
150166
No new tables are needed.
@@ -182,31 +198,48 @@ Not applicable.
182198

183199
Click CLI
184200

185-
Enable/disable the Port Channel graceful shutdown mode.
201+
Enable/disable the Port Channel graceful shutdown mode globally:
186202
```
187203
root@sonic:/home/admin# config portchannel graceful-shutdown <enable/disable>
188204
```
189205

206+
Enable/disable the Port Channel graceful shutdown mode for a given portchannel:
207+
```
208+
root@sonic:/home/admin# config portchannel graceful-shutdown <enable/disable> <portchannel-name>
209+
```
210+
190211
KLISH CLI
191212

192-
Enable PortChannel graceful shutdown mode:
213+
Enable PortChannel graceful shutdown mode globally:
193214
```
194215
sonic(config)# portchannel graceful-shutdown
195216
```
196217

197-
Disable PortChannel graceful shutdown mode:
218+
Enable PortChannel graceful shutdown mode for a given portchannel:
219+
```
220+
sonic(config)# interface PortChannel 6
221+
sonic(conf-if-po6)# graceful-shutdown
222+
```
223+
224+
Disable PortChannel graceful shutdown mode globally:
198225
```
199226
sonic(config)# no portchannel graceful-shutdown
200227
```
201228

229+
Disable PortChannel graceful shutdown mode for a given portchannel:
230+
```
231+
sonic(config)# interface PortChannel 6
232+
sonic(conf-if-po6)# no graceful-shutdown
233+
```
234+
202235
### 3.6.4 Show Commands
203236
KLISH CLI
204237

205238
The output of show interface portchannel is modified to display:
206239
1. Portchannel graceful shutdown mode
207240
2. LACP Fallback operational status, if fallback is enabled.
208241

209-
Graceful shutdown is disabled. Fallback config is enabled; it is non-operational.
242+
Graceful shutdown is disabled. Fallback config is enabled; it is non-operational:
210243
```
211244
sonic# show interface PortChannel
212245
PortChannel5 is up, line protocol is down, mode LACP
@@ -232,7 +265,7 @@ sonic#
232265
233266
```
234267

235-
Graceful shutdown is disabled. Fallback config is enabled; it is operational.
268+
Graceful shutdown is disabled. Fallback config is enabled; it is operational:
236269
```
237270
sonic# show interface PortChannel
238271
PortChannel5 is up, line protocol is up, mode LACP
@@ -258,7 +291,7 @@ sonic#
258291
259292
```
260293

261-
Graceful shutdown is enabled. Fallback is disabled.
294+
Graceful shutdown is enabled. Fallback is disabled:
262295
```
263296
sonic# show interface PortChannel
264297
PortChannel5 is up, line protocol is down, mode LACP
@@ -289,18 +322,28 @@ No new debug commands are added.
289322
### 3.6.6 Rest API Support
290323
PATCH
291324

292-
Enable graceful shutdown mode:
325+
Enable graceful shutdown mode globally:
293326
```
294327
/openconfig-aggregate-ext:aggregate/config/graceful-shutdown-mode
295328
```
296329

330+
Enable graceful shutdown mode for a given portchannel:
331+
```
332+
/openconfig-interfaces:interfaces/interface={name}/openconfig-if-aggregate:aggregation/config/openconfig-interfaces-ext:graceful-shutdown-mode
333+
```
334+
297335
GET
298336

299-
Get graceful shutdown mode:
337+
Get global graceful shutdown mode:
300338
```
301339
/openconfig-aggregate-ext:aggregate/config/graceful-shutdown-mode
302340
```
303341

342+
Get graceful shutdown mode for a given portchannel:
343+
```
344+
/openconfig-interfaces:interfaces/interface={name}/openconfig-if-aggregate:aggregation/config/openconfig-interfaces-ext:graceful-shutdown-mode
345+
```
346+
304347
Get LACP fallback operational status:
305348
```
306349
/openconfig-interfaces:interfaces/interface={name}/openconfig-if-aggregate:aggregation/state/openconfig-interfaces-ext:fallback

0 commit comments

Comments
 (0)