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

Modifying ZTP to adapt to force config reload #29

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

dgsudharsan
Copy link
Contributor

DO NOT MERGE THIS until sonic-net/sonic-utilities#1664 is merged
Added force config reload in ZTP to avoid newly introduced system checks when in ztp mode.

@dgsudharsan
Copy link
Contributor Author

@rajendra-dendukuri Can you please review this?

Copy link
Collaborator

@rajendra-dendukuri rajendra-dendukuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to validate if the "config reload" command did what it was supposed to do and all the services are operational, before we declare success in the ZTP step. Adding -f in ztp defeats the purpose of adding these checks. Isn't it?

@dgsudharsan
Copy link
Contributor Author

dgsudharsan commented Jun 21, 2021

Don't we want to validate if the "config reload" command did what it was supposed to do and all the services are operational, before we declare success in the ZTP step. Adding -f in ztp defeats the purpose of adding these checks. Isn't it?

The purpose of the check is to perform system checks before the 'config reload' command is executed and not after. In the scenarios where user explicitly gives config reload, when services are starting up (immediately after config reload or reboot of the device) there are some issues as some services have problems being partially initialized during processing of configurations. Hence to restrict the user from giving 'config reload' command when the system has had one recently, these checks were introduced. However, from ZTP point of view since we are internally issuing the 'config reload' on receiving a config file, and before receiving the configuration file there isn't not much configuration to be processed (except the interface configs which I believe would have been processed and the links are up), I would prefer we do a force. The reason I want force here is if there are some failed services (like say reboot determination service) or the delayed services have not started up(like snmp), It shouldn't stop ZTP from happening. So I wanted to retain the current behavior of ZTP. If there are any issues faced during config reload execution part of ZTP prior, it would be good to consider this but without any issues I don't want to change ZTP behavior.

@rajendra-dendukuri rajendra-dendukuri merged commit 4475750 into sonic-net:master Jun 22, 2021
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