From 41908954afbd0c56802b4116f43f2884124666ed Mon Sep 17 00:00:00 2001 From: Samuel Karp Date: Fri, 26 Mar 2021 17:48:28 -0700 Subject: [PATCH] bottlerocket: fix procfs path on host Bottlerocket runs the ECS agent directly on the host rather than in a container. In other environments, the ECS agent runs in a container with `/host` mounted as the host's root filesystem and can read the host's `procfs` at `/host/proc`. Because Bottlerocket does not run the ECS agent in a container, the ECS agent can directly read the host's `procfs` at `/proc`. --- agent/ecscni/types_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/ecscni/types_linux.go b/agent/ecscni/types_linux.go index 6d6ce35..1f2d091 100644 --- a/agent/ecscni/types_linux.go +++ b/agent/ecscni/types_linux.go @@ -47,7 +47,7 @@ const ( // ECSServiceConnectPluginName is the binary of the service connect plugin ECSServiceConnectPluginName = "ecs-serviceconnect" // NetnsFormat is used to construct the path to cotainer network namespace - NetnsFormat = "/host/proc/%s/ns/net" + NetnsFormat = "/proc/%s/ns/net" // Starting with CNI plugin v0.8.0 (this PR https://github.com/containernetworking/cni/pull/698) // NetworkName has to be non-empty field for network config. // We do not actually make use of the field, hence passing in a placeholder string to fulfill the API spec -- 2.40.1