forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-bottlerocket-default-filesystem-locations.patch
113 lines (97 loc) · 4.62 KB
/
0001-bottlerocket-default-filesystem-locations.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
From c6cbf43d62a587b7a7672b726c4513005c9b77e8 Mon Sep 17 00:00:00 2001
From: Samuel Karp <skarp@amazon.com>
Date: Wed, 8 Jul 2020 11:18:35 -0700
Subject: [PATCH 1/5] bottlerocket: default filesystem locations
---
agent/config/config.go | 6 +++---
agent/config/config_unix.go | 4 ++--
agent/ecscni/plugin.go | 2 +-
agent/utils/license.go | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/agent/config/config.go b/agent/config/config.go
index 3178c63f2..810eb31b4 100644
--- a/agent/config/config.go
+++ b/agent/config/config.go
@@ -51,7 +51,7 @@ const (
AgentPrometheusExpositionPort = 51680
// defaultConfigFileName is the default (json-formatted) config file
- defaultConfigFileName = "/etc/ecs_container_agent/config.json"
+ defaultConfigFileName = "/etc/ecs/ecs.config.json"
// DefaultClusterName is the name of the default cluster.
DefaultClusterName = "default"
@@ -118,13 +118,13 @@ const (
minimumNumImagesToDeletePerCycle = 1
// defaultCNIPluginsPath is the default path where cni binaries are located
- defaultCNIPluginsPath = "/amazon-ecs-cni-plugins"
+ defaultCNIPluginsPath = "/usr/libexec/amazon-ecs-agent"
// DefaultMinSupportedCNIVersion denotes the minimum version of cni spec required
DefaultMinSupportedCNIVersion = "0.3.0"
// pauseContainerTarball is the path to the pause container tarball
- pauseContainerTarballPath = "/images/amazon-ecs-pause.tar"
+ pauseContainerTarballPath = "/usr/lib/amazon-ecs-agent/amazon-ecs-pause.tar"
// DefaultTaskMetadataSteadyStateRate is set as 40. This is arrived from our benchmarking
// results where task endpoint can handle 4000 rps effectively. Here, 100 containers
diff --git a/agent/config/config_unix.go b/agent/config/config_unix.go
index 080f18c4d..ef14970ce 100644
--- a/agent/config/config_unix.go
+++ b/agent/config/config_unix.go
@@ -27,10 +27,10 @@ const (
// AgentCredentialsAddress is used to serve the credentials for tasks.
AgentCredentialsAddress = "" // this is left blank right now for net=bridge
// defaultAuditLogFile specifies the default audit log filename
- defaultCredentialsAuditLogFile = "/log/audit.log"
+ defaultCredentialsAuditLogFile = "/var/log/ecs/audit.log"
// defaultRuntimeStatsLogFile stores the path where the golang runtime stats are periodically logged
- defaultRuntimeStatsLogFile = `/log/agent-runtime-stats.log`
+ defaultRuntimeStatsLogFile = `/var/log/ecs/agent-runtime-stats.log`
// DefaultTaskCgroupPrefix is default cgroup prefix for ECS tasks
DefaultTaskCgroupPrefix = "/ecs"
@@ -56,7 +56,7 @@ func DefaultConfig() Config {
DockerEndpoint: "unix:///var/run/docker.sock",
ReservedPorts: []uint16{SSHPort, DockerReservedPort, DockerReservedSSLPort, AgentIntrospectionPort, AgentCredentialsPort},
ReservedPortsUDP: []uint16{},
- DataDir: "/data/",
+ DataDir: "/var/lib/ecs/data",
DataDirOnHost: "/var/lib/ecs",
DisableMetrics: BooleanDefaultFalse{Value: ExplicitlyDisabled},
ReservedMemory: 0,
diff --git a/agent/ecscni/plugin_linux.go b/agent/ecscni/plugin_linux.go
index 6fc0111d..d3ef6641 100644
--- a/agent/ecscni/plugin_linux.go
+++ b/agent/ecscni/plugin_linux.go
@@ -32,7 +32,7 @@ import (
const (
vpcCNIPluginInterfaceType = "vlan"
// vpcCNIPluginPath is the path of the cni plugin's log file.
- vpcCNIPluginPath = "/log/vpc-branch-eni.log"
+ vpcCNIPluginPath = "/var/log/ecs/vpc-branch-eni.log"
)
// newCNIGuard returns a new instance of CNI guard for the CNI client.
diff --git a/agent/ecscni/plugin_unsupported.go b/agent/ecscni/plugin_unsupported.go
index 6289877a..fcebedfe 100644
--- a/agent/ecscni/plugin_unsupported.go
+++ b/agent/ecscni/plugin_unsupported.go
@@ -25,7 +25,7 @@ import (
const (
// vpcCNIPluginPath is the path of the cni plugin's log file.
- vpcCNIPluginPath = "/log/vpc-branch-eni.log"
+ vpcCNIPluginPath = "/var/log/ecs/vpc-branch-eni.log"
)
// newCNIGuard returns a new instance of CNI guard for the CNI client.
diff --git a/agent/utils/license.go b/agent/utils/license.go
index 6eccff6ac..324307cd3 100644
--- a/agent/utils/license.go
+++ b/agent/utils/license.go
@@ -24,9 +24,9 @@ type LicenseProvider interface {
type licenseProvider struct{}
const (
- licenseFile = "LICENSE"
- noticeFile = "NOTICE"
- thirdPartyFile = "THIRD-PARTY"
+ licenseFile = "/usr/share/licenses/ecs-agent/LICENSE"
+ noticeFile = "/usr/share/licenses/ecs-agent/NOTICE"
+ thirdPartyFile = "/usr/share/licenses/ecs-agent/THIRD-PARTY"
)
var readFile = ioutil.ReadFile
--
2.32.0