forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0004-bottlerocket-fix-procfs-path-on-host.patch
31 lines (28 loc) · 1.38 KB
/
0004-bottlerocket-fix-procfs-path-on-host.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 41908954afbd0c56802b4116f43f2884124666ed Mon Sep 17 00:00:00 2001
From: Samuel Karp <skarp@amazon.com>
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