fix(controller): keep IOL runner containers off the kernel datapath

The unix-socket container gate matched GNS3_UNIX_SOCKET_NIO in the node
environment only, but the IOL runner reaches the same wiring through the
GNS3_IOL_RUNNER marker: the compute selects IOLDockerVM on it, and that
class forces the AF_UNIX socket pairs whatever the generic knob says —
and the documented environment for those nodes carries only the marker.
Such a container was therefore handed a kernel link its compute cannot
serve. The plain case failed at link creation (no veth end to enslave);
on the switch fast path it was worse — the switch defers a join against a
missing anchor by design (a link to a stopped node must not fail), so the
cable was silently dead instead of merely slow.

Match both markers, through the shared is_iol_runner_environment helper so
the controller and the compute select the same way. Verified live on a
real server: docker↔IOL-XE and switch↔IOL-XE links stay relay while the
docker↔switch control link still takes the kernel datapath.
This commit is contained in:
YueGuobin committed 2026-10-06 00:21:09 +08:00
1 parent a40503e44b
commit caa054986f
2 files changed
+51 -7

No files matched your search

+9 -4
View File
@@ -20,6 +20,7 @@ import asyncio
import logging
from gns3server.config import Config
from gns3server.utils.application_id import is_iol_runner_environment
from gns3server.utils.kernel_anchor import kernel_anchor_name
from gns3server.utils.packet_filter_validation import (
KERNEL_UNSUPPORTED_FILTERS,
@@ -56,14 +57,18 @@ log = logging.getLogger(__name__)
def _is_unix_socket_docker(node):
"""
Best-effort detection of vendor containers bridged through AF_UNIX
socket pairs (GNS3_UNIX_SOCKET_NIO in their environment): they have no
host-side interface to enslave into a kernel bridge. The compute side
socket pairs: they have no host-side interface to enslave into a kernel
bridge. Two ways in — the generic GNS3_UNIX_SOCKET_NIO knob, or the IOL
runner marker, whose class (IOLDockerVM, selected on GNS3_IOL_RUNNER)
forces the unix-socket wiring whatever the knob says. The compute side
independently rejects kernel-datapath NIOs on these containers, so a
missed detection here only surfaces as a clearer-late error.
missed detection surfaces as a clearer-late error — except on the switch
fast path, where an absent anchor is deferred forever by design (a link
to a stopped node must not fail), making the miss a silently dead cable.
"""
environment = (node.properties or {}).get("environment") or ""
return "GNS3_UNIX_SOCKET_NIO" in environment
return "GNS3_UNIX_SOCKET_NIO" in environment or is_iol_runner_environment(environment)
class UDPLink(Link):