forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0005-bottlerocket-fix-procfs-path-on-host.patch
31 lines (28 loc) · 1.39 KB
/
0005-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 a2d84c6d919ac637150ac36e0b5f104213f7dcc5 Mon Sep 17 00:00:00 2001
From: Samuel Karp <[email protected]>
Date: Fri, 26 Mar 2021 17:48:28 -0700
Subject: [PATCH 5/5] 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 6d6ce353..1f2d0914 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.25.1