Add Arrcus ArcOS as a containerlab device (best-effort)#3681
Conversation
ipspace
left a comment
There was a problem hiding this comment.
Before going into the details: I think you should change the configuration deployment method.
It looks like you're generating a bash script that takes a config and runs confd_cli to deploy it. If that's the case, you don't need Ansible -- netlab can generate bash scripts, map them to the container, and then execute them inside the container. You can also map templates into container files to create scripts (like what you have in the shell command) that are then executed.
FRR uses the "run a bash script" approach together with "let's add a shebang when needed" trick. cRPD maps a template to a container script to generate the deployment script (/config/netlab/netlab-config.sh).
More @ https://netlab.tools/dev/config/deploy/#linux-configuration-scripts
|
Next major item: we don't have per-platform integration tests (what you added in The device implementations are tested with regular integration tests (see https://netlab.tools/dev/integration-tests/). If you want to test the validation plugins, you'll find some tests in |
| global afi-safi IPV6_UNICAST | ||
| {% endif %} | ||
| {% for a in bgp.advertise|default([]) %} | ||
| {% if a.ipv4 is defined %} |
There was a problem hiding this comment.
One more generic comment -- I strongly recommend you use the same indentation trick we use in other Jinja2 templates to make the templates more readable. Unfortunately, that's the best I could come up with, and it looks like some vendors picked it up as well.
For example:
{% for x %}
{% if y is defined %}
{% endif %}
{% endfor %}
Modernize the legacy ArcOS stub into a full containerlab (arrcus_arcos) device: initial, ospf (v2/v3), bgp, isis, vrf, vlan, lag, gateway (VRRP), dhcp/relay, bfd, routing (static/prefix/policy), mpls (LDP), sr (SR-MPLS via IS-IS), srv6, vxlan and evpn (L2VNI) configuration templates, plus OpenConfig JSON validation plugins (ospf/bgp/isis/routing). Configuration is deployed with netlab native "sh" config mode: each module is rendered into /config/netlab/NN-<module>.sh with a #!/config/netlab/netlab-config.sh shebang and executed via docker exec, which hands the rendered config to the mapped wrapper templates/provider/clab/arcos/netlab-config.j2 to load through confd_cli (load merge / commit). This is the same mapped-script deploy pattern Juniper cRPD uses; no Ansible is involved in the deploy path. ansible_connection: docker is retained only for the validation/collect path, since the tested build has SSH/NETCONF/gNMI disabled. Drop the legacy Ansible deploy-config task and the unused libvirt domain template (the device is clab-only).
Install guide, caveats, platform table entry and release note for the ArcOS containerlab device, documenting the native sh-mode confd_cli deploy path and the docker-exec validation model.
|
Thanks for the review, Ivan — all three addressed. 1. Deploy method. Switched the ArcOS device from the Ansible deploy task to netlab's native container-script ( 2. Platform tests. Removed 3. Jinja2 indentation. Applied the readable nested-indentation convention (tag keyword indented with the block) across the ArcOS templates. Rebased onto current |
Add Arrcus ArcOS as a containerlab device (best-effort)
This PR adds Arrcus ArcOS as a netlab device. ArcOS runs as a native
containerlab node (
kind: arrcus_arcos) — there is no vrnetlab packaging and noVagrant box. Support level is best-effort.
Connection and validation model — no core change
ArcOS ships the official
arrcus.arcosAnsible collection (the project-recommendednetwork_climodel), but every published version (2.0.13–2.0.18) hangs against thetested container image: its cliconf/terminal plugins issue a
config terminal/arcos_climode-switch that this build'sconfd_clirejects. Configuration istherefore deployed over Ansible's built-in
dockerconnection plugin (docker execrunningconfd_cliload merge/commit) — the same patternsonic_clabalready uses. The device keeps a commented-outnetwork_cliblock toswitch to once a working collection version ships.
netlab validatereads device state over the same docker-exec path(
show <path> | display json | confd_cli, parsed as OpenConfig JSON bynetsim/validate/**/arcos.py). This is netlab's standard device-side show-commandvalidation — no
ansiblevalidation action and no change to any core file.netsim/cli/connect.py,netsim/cli/validate.py,netsim/augment/validate.py,netsim/attributes.yml,netsim/templates/provider/clab/clab.j2, andtests.pyareuntouched (byte-identical to
dev). This is a pure device addition.The tested image boots with SSH/NETCONF/gNMI disabled and refuses to enable
interfaces until the factory admin-user password is changed; both are handled with
the native
netlab_start_execgroup_var (containerlab's post-startexec:) — nocustom deploy code.
Module coverage
initial,ospf(v2/v3),bgp,isis,vrf(+ospf/isis/bgp),vlan,lag,gateway(VRRP),dhcp/relay,bfd,routing(static/prefix-set/policy),mpls(LDP),sr(SR-MPLS via IS-IS),srv6,vxlan, andevpn(L2VNI).Honest limitations are documented in
docs/caveats.md(e.g. EVPN symmetric IRB/L3VNI,VRF route-target leaking, and OSPFv2 area authentication are genuinely unsupported and
not declared; MPLS/SR/SRv6 bring up the control plane only on the native container;
DHCP relay renders but its datapath is not exercised on a clab-only host, so ArcOS is
omitted from the DHCP support table).
Verification
Verified on real ArcOS containers (image
arcos:8.2.1A.P2), containerlab provider,against this branch:
02-ospf— OSPFv2 adjacency03-bgp— eBGP session + prefixes04-isis— IS-IS adjacency + reachability05-routing— static routeproto static) installed and loopback-to-loopback ping 0% lossospf+bfd+vrfnetlab initialcommits every module cleanly (idempotent on re-run) andnetlab collectretrieves the running configuration. The rendered CLI and the show/get pathsused by the validators were cross-checked against the vendor ArcOS S8.5.1A CLI
reference.
Files
netsim/devices/arcos.ymlnetsim/ansible/tasks/{deploy-config,fetch-config}/arcos.ymlnetsim/ansible/templates/*/arcos.j2(16 modules)netsim/validate/arcos.py+netsim/validate/{ospf,bgp,isis,routing}/arcos.py(adds the
netsim/validate/routing/package)tests/integration/platform/arcos/docs/platforms.md,docs/caveats.md,docs/install/arcos.md,docs/release/26.07.mdThis PR also removes
netsim/templates/provider/libvirt/arcos-domain.j2, an orphanedlibvirt domain template from a much older, never-completed ArcOS device (no
netsim/devices/arcos.ymlever existed for it); the new device is containerlab-only.ArcOS is a commercial NOS, so users supply their own container image (as with
sros/dellos10/arubacx).