Configuration Rollback
event manager applet
Section titled “event manager applet”[Command] event manager applet* String*****no event manager applet* String*
[Purpose] Create Configuration Rollback Event
[View] System Configuration View
[Usage Scenario] During the initial deployment, a stable configuration is established with guaranteed connectivity. In subsequent usage, the configuration may be modified—for example, using ACLs or modifying interface VLANs to switch broadcast domains and redirect traffic to another network segment. However, this new network segment has not undergone long-term validation and may lack stability. It is necessary to monitor the status of LACP or physical interfaces. Should the status of the LAG group or any physical interface be detected as down, the configuration should be rolled back to the initial deployment state.
[Use Cases]
sonic(config)# event manager applet testaction cli command
Section titled “action cli command”[Command] action* action-idcli command String* no action* action-id*
[Purpose] Preconfigured Configuration Commands
[Parameter]
| Parameter | Description |
|---|---|
| *action-id * | Preconfigured command ID |
| *String * | Preconfiguration cli command |
[View] Applet Configuration View
[Comment] Actionid shall be an integer or positive floating-point number starting from 0, with smaller numbers executed first. If there are spaces in the preconfiguration command delivered as a String, double quotation marks must be added. The rollback commands consist of a set of command lines defined by the user, who shall ensure the correct execution order of these command lines.
[Use Cases]
sonic(config)# event manager applet testsonic(config-event-applet-test)# action 1 cli command "interface ethernet 1"sonic(config-event-applet-test)# action 2 cli command "shutdown"warning enable
Section titled “warning enable”[Command] warning enable no warning enable
[Purpose] Configuration rollback syslog logging
[View] Applet Configuration View
[Use Cases]
sonic(config)# event manager applet testsonic(config-event-applet-test)# warning enabledown event applet
Section titled “down event applet”[Command] down event applet* String*no down event applet[Purpose] Bind interface to rollback event [View] Interface Configuration View [Use Cases]
sonic(config)# interface ethernet 3sonic(config-if-3)# down event applet test