Skip to content
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

[202012][reload] Improve reload by using sonic.target #1509

Merged
merged 2 commits into from
Mar 19, 2021

Conversation

stepanblyschak
Copy link
Contributor

Signed-off-by: Stepan Blyshchak stepanb@nvidia.com

- What I did

To remove the list of hardcoded order-dependent lists of services to stop/restart/reset-failed.

- How I did it

Used sonic.target to stop/restart/reset-failed.

- How to verify it

Execute config reload and observe the services do restart.

- Previous command output (if the output of a command-line utility has changed)

admin@r-tigon-11:~$ sudo config reload -y
Executing stop of service telemetry...
Executing stop of service swss...
Executing stop of service lldp...
Executing stop of service bgp...
Executing stop of service hostcfgd...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Executing reset-failed of service bgp...
Executing reset-failed of service dhcp_relay...
Executing reset-failed of service hostcfgd...
Executing reset-failed of service hostname-config...
Executing reset-failed of service interfaces-config...
Executing reset-failed of service lldp...
Executing reset-failed of service ntp-config...
Executing reset-failed of service pmon...
Executing reset-failed of service radv...
Executing reset-failed of service rsyslog-config...
Executing reset-failed of service snmp...
Executing reset-failed of service swss...
Executing reset-failed of service syncd...
Executing reset-failed of service teamd...
Executing reset-failed of service telemetry...
Executing restart of service hostname-config...
Executing restart of service interfaces-config...
Executing restart of service ntp-config...
Executing restart of service rsyslog-config...
Executing restart of service swss...
Executing restart of service bgp...
Executing restart of service lldp...
Executing restart of service hostcfgd...
Executing restart of service telemetry...
Reloading Monit configuration ...
Reinitializing monit daemon

- New command output (if the output of a command-line utility has changed)

admin@r-tigon-11:~$ sudo config reload -y
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Resetting failed status on bgp.service
Resetting failed status on dhcp_relay.service
Resetting failed status on hostcfgd.service
Resetting failed status on hostname-config.service
Resetting failed status on interfaces-config.service
Resetting failed status on lldp.service
Resetting failed status on mgmt-framework.timer
Resetting failed status on nat.service
Resetting failed status on ntp-config.service
Resetting failed status on pmon.service
Resetting failed status on radv.service
Resetting failed status on rsyslog-config.service
Resetting failed status on sflow.service
Resetting failed status on swss.service
Resetting failed status on syncd.service
Resetting failed status on teamd.service
Resetting failed status on telemetry.timer
Restarting SONiC target ...
Reloading Monit configuration ...
Reinitializing monit daemon

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Mar 16, 2021

This pull request introduces 1 alert when merging 4cf7123 into 110d88c - view on LGTM.com

new alerts:

  • 1 for Syntax error

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@stepanblyschak
Copy link
Contributor Author

retest this please

1 similar comment
@stepanblyschak
Copy link
Contributor Author

retest this please

@daall daall merged commit 6202d61 into sonic-net:202012 Mar 19, 2021
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
756dd9c8123cd06dc581d9b2eb236334deee1850 (HEAD -> 201911, origin/201911)
[201911 sonic-swss] Flushing FDB entries before removing BridgePort (sonic-net#1516)
e3f22ea6685104a819440ecc0efe89c4bd3a0003 [201911/portsorch] Add
correct stat list for port buffer drop counters (sonic-net#1509)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants