-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow individual config_db per host via ztp.json #358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR should ensure that AgentX is enabled on the leaves.
@mreiger yesterday brought up that it might be good to add a comment to the documentation that with this approach it is not possible to simply add something new to the |
Co-authored-by: Robert Volkmann <[email protected]>
Description
Initially, this PR was intended to enable a ZTP-only deployment for SONiC switches, such that all configuration currently handled by the
sonic
role could be managed entirely by ZTP. The motivation behind a ZTP-only approach is that the template for theconfig_db.json
has become quite complicated and difficult to debug recently, because many special cases needed to be handled. With aztp.json
file it is possible to provide an individualconfig_db.json
for each switch, which makes templating obsolete.The downside to this way of provisioning is that the SONiC config cannot be changed via CI anymore, but only by resetting the switch completely. For the
config_db.json
, this seems fine to me, as it reduces the risk of breaking the switch by providing an invalid breakout config for example. However, providing thefrr.conf
file via ZTP doesn't seem a good idea to me and it would have introduced a lot of redundancy, because thesonic
role also renders thefrr.conf
.Therefore, I decided to make
ztp.json
only provide theconfig_db.json
and some setup scripts, but leave the rest to thesonic
role. To avoid conflicts with theconfig_db.json
rendered by thesonic
role, I introduced a new variablesonic_render_config_db_template
which defaults totrue
, to not break existing deployments.Noteworthy