Repository navigation
Field report: an AI agent installing netlab on a fresh Ubuntu 26.04 VM (plus ideas for making that easier) #4229
Replies: 6 comments 5 replies
Thanks a million! Can't tell you how much I appreciate it!
That was easy. Implemented in #4238 |
Trying not to reinvent the wheel: can you share the details of how you set that up? Thanks a million! |
Fixed in #4254. Thank you!
I already added similar instructions in #4254, will add them to the end of the installation script.
Fixed, we now have a 404 page.
Added. |
Follow-up from Oracle Linux 10.3I asked Claude Code to deploy and test FRR labs using both the containerlab and libvirt providers on an Oracle Linux 10.3 VM. Both eventually worked. The commands below are as reported by the agent. Two findings in netlabA blank line in
|
| Ubuntu 26.04.1 | Oracle Linux 10.3 | |
|---|---|---|
| Python and venv | Python 3.14.4, installed python3-venv, used --system-site-packages |
Python 3.12.16, venv worked with the supplied Python, isolated venv also tested |
| Docker and containerlab | Installed by the netlab scripts | Installed manually |
netlab install ansible |
Passed on 26.11 | Passed with #4230 |
netlab test clab and two-node FRR lab |
Passed | Passed |
netlab test libvirt and two-node FRR lab |
Untested | Passed with the host changes above |
I can't find that. Would you happen to have the URL saved somewhere?
Added in #4257
Good idea. One of the next things I'll be working on. |
The working notes point to the footnote related to |
Uh oh!
There was an error while loading. Please reload this page.
Prompted by the intro content blog post, I asked an AI coding agent (Claude Code) to install netlab on a fresh, disposable VM, build a two-node FRR lab, and ping between the nodes. It worked. This post describes what tripped it up and what might help both newcomers and agents. Use any of it, or none.
Setup and result
quay.io/frrouting/frr:10.7.1netlab install ubuntu,ansibleandcontainerlaball completed;netlab test clabpassednetlab up; ping worked in both directionsThe installation was smooth. Everything below is minor.
Problems actually hit
The Docker error message points to the wrong cause. Right after
netlab install containerlab, the shell does not yet have the newdockergroup. netlab then fails with:Docker was installed; the user just could not access the socket yet. A newcomer is likely to reinstall Docker. The checks in
netsim/providers/clab.ymlalready include(groups | grep -w clab_admins) || ...forclab_admins. A similardockergroup check before thedocker versioncheck (or a hint saying "if you just installed Docker, log out and back in") would make the cause clear."Log out and back in" is hard for an agent. An agent can't log out. It tried nested
sg docker -c "sg clab_admins -c ...", which loses one of the groups and produced the error above. Running commands in a fresh login shell (sudo -iu $USER bash -c '...') worked. One sentence about this in the docs would save agents (and some humans) a detour.python3-venvmissing gives an "ensurepip is not available" error. This was the agent's own mistake: it skipped the apt step, and the docs are correct. Still, this error text could go in a troubleshooting section, because that's what people will search for.Things noticed on netlab.tools
https://netlab.tools/llms.txtreturns HTTP 200, but the content is the home page HTML. So doesllms-full.txt, and so does any URL, e.g./no-such-page-xyz.txt: the site has no real 404s. Agents and crawlers will think anllms.txtexists and parse HTML instead. Proper 404s, and perhaps a realllms.txtgenerated from the Sphinx sources, would fix that.docs/install/ubuntu.mdvia raw.githubusercontent.com). That is the easiest format for agents to read. Anllms.txtpointing to those raw files would be enough.netsim/install/install.ymlalready says 24.04 and 26.04. A small sync would fix that.AGENTS.mdtargets contributors only, which is fine. Agents installing netlab for a user would benefit from a short pointer to an install page, or a separate file.Ideas (ordered by value-for-effort)
Fix the soft 404s / publish a real
llms.txt.A docker-group check or hint in
clab.yml(see problem 1). It's a few lines of YAML.An "installing with an AI agent" page or checklist. It could cover:
sudo -n true, Python ≥ 3.10,python3-venv,/dev/kvmfor libvirtnetlab install -y <script>, one script per command)Done ...line, andnetlab test clabending in "installed and working correctly"netlab up,netlab exec r1 ping ...,netlab down --cleanupThe same content could ship as a skill file (e.g. a Claude Code
SKILL.mdwrapper around agent-neutral Markdown).netlab install --dry-run: list the apt, pip and curl commands a script would run with sudo. Agents are expected to get user approval before system-wide changes, and this makes that easy. Cautious humans would like it too.A read-only
netlab doctor/netlab install --check. It would report: venv active, Ansible, Docker and containerlab presence, socket access, group membership in this session vs/etc/group, and KVM.netlab test clabanswers some of this, but it starts a three-node lab to do it.Non-Ubuntu distributions (not tested, from reading the code)
The install scripts are
apt-only (distro: [ubuntu, debian]). On a Red Hat-family system such as Oracle Linux (ID=ol,ID_LIKE="fedora"),netlab install containerlabfails cleanly with "We don't have containerlab installation script for your Linux distribution". That's a good failure mode. A user (or agent) is then on their own, though. A short "Red Hat family: manual steps" page, linked from that error message, would help. Likely problems on such a system:Requires-Python >=3.10I may try Oracle Linux 10 later and report back.
Thanks for netlab!
All reactions