vendor: drop the hardcoded /etc/network mount for SKIP_INIT containers

Override _mount_binds in VendorDockerVM: for GNS3_SKIP_INIT containers the
/etc/network volume (GNS3's own network config consumed by init.sh's ifup)
is dead weight — init.sh never runs and the NOS manages its own
interfaces. The override removes the bind, filters /etc/network out of
self._volumes (keeping GNS3_VOLUMES and the bridge/fix passes consistent)
and deletes the host-side skeleton directory created by the base class.
Without GNS3_SKIP_INIT the mount is kept, matching base behaviour.
_persistent_volumes() is removed — the mount override is now the single
filter point.
This commit is contained in:
YueGuobin committed 2026-08-13 02:05:17 +08:00
1 parent 46e863b975
commit f5554d816a
2 files changed
+32 -21

No files matched your search

+8 -6
View File
@@ -241,12 +241,14 @@ host ──Docker bind mount──▶ /gns3volumes/etc/opt/srlinux (always m
> host-side root-owned, and an unprivileged GNS3 process cannot chown them
> from the host. Container-side root (with GNS3's `UsernsMode: host`) can.
With `GNS3_SKIP_INIT`, `/etc/network` is skipped by both vendor passes
(`VendorDockerVM._persistent_volumes()`): it holds GNS3's own network config
for init.sh's `ifup`, which never runs for SKIP_INIT containers — the NOS
manages its own interfaces. The Docker mount itself is left alone (shared
`_mount_binds`, hardcoded at `docker_vm.py` `_mount_binds()`); only the
vendor-side bridge/fix passes skip it.
With `GNS3_SKIP_INIT`, GNS3's hardcoded `/etc/network` volume (see
`docker_vm.py` `_mount_binds()`) is dropped entirely by
`VendorDockerVM._mount_binds()`: it holds GNS3's own network config for
init.sh's `ifup`, which never runs for SKIP_INIT containers — the NOS
manages its own interfaces. The override removes the bind, filters the
volume out of `self._volumes`, and deletes the host-side skeleton directory
the base class just created. Without `GNS3_SKIP_INIT` the mount is kept
(behaviour matches the base class).
### Lifecycle summary