netlab icon indicating copy to clipboard operation
netlab copied to clipboard

[BUG] Fix configuration deployment on devices using Ansible task lists

Open ipspace opened this issue 9 months ago • 2 comments

#1933 would add several dummy templates and task lists to get around the safeguards we put in place that broke the devices that do not use the mainstream "config template + potentially module-specific deployment".

At least the following things have to be fixed:

  • Do not check for template if the device metadata (probably group variable) tells you it's OK not to have a template.
  • Figure out why the generic deploy-config gets involved.
  • Create a reference implementation in tests/platform-integration that can be used to verify whether things work as they should

Optional:

  • Add IGP information to the loopback interface to allow the IGP configuration task lists (or templates) to use netlab_interfaces
  • Document how one could use a Jinja2 template to transform the data structure into something a device is willing to accept (to get rid of awkward data manipulation in Ansible task lists).

ipspace avatar Feb 17 '25 13:02 ipspace

I am a little surprised at this - in my experience, whenever something deviates from how things are done on most other platforms, it's "we are not going to change things just because of this one exotic corner case you're dealing with"

It should be possible to change the FortiOS code to use Jinja2 templates to generate Ansible task lists (as you pointed out, similar to how SR Linux templates generate YAML files)

jbemmel avatar Feb 17 '25 15:02 jbemmel

in my experience, whenever something deviates from how things are done on most other platforms, it's "we are not going to change things just because of this one exotic corner case you're dealing with"

For the (public) record: the only contributor I remember having pointless discussions with was you, and those discussions were usually along these lines:

  • My device does things differently than anyone else in the industry (I won't go into how many things we changed to accommodate SR Linux)
  • I couldn't be bothered to read the documentation, and things don't work the way I think they should (even though the documentation clearly states they will not work)
  • I have my own ideas how network protocols work, and they don't match what netlab is doing (BTW, thanks for the material for a half-dozen blog posts ;)

Meanwhile, other people successfully solved the challenges of the devices they decided to work with without asking for feature flags or changes in core functionality.

That brings me to another point: when you encountered a personal challenge (like the old way of configuring VLANs on an ancient Dell OS10), you expected us to change the core functionality of the tool or device templates even though there are tons of other ways to customize netlab's behavior, and you keep bringing up the "we should (also) be doing things that way" at every opportunity.

On the other hand, whenever you could document that netlab does not do what documentation claims it should do, the defects were promptly fixed.

Which brings me to why I care about a device nobody from the netlab team touched for years: we promised (as in "documented") those things work, and we broke that promise.

It should be possible to change the FortiOS code to use Jinja2 templates to generate Ansible task lists (as you pointed out, similar to how SR Linux templates generate YAML files)

That might be another option. Still, we don't work regularly with any other device that behaves similarly to FortiOS, so we need a testable reference implementation for that behavior anyway.

ipspace avatar Feb 17 '25 16:02 ipspace