forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-bottlerocket-default-filesystem-locations.patch
115 lines (99 loc) · 4.73 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
113
114
From 9c29e409e68789b2bae933e5be4f0c8828a3f59a Mon Sep 17 00:00:00 2001
From: Samuel Karp <[email protected]>
Date: Wed, 8 Jul 2020 11:18:35 -0700
Subject: [PATCH 1/5] bottlerocket: default filesystem locations
Signed-off-by: Sean P. Kelly <[email protected]>
---
agent/config/config.go | 6 +++---
agent/config/config_unix.go | 6 +++---
agent/ecscni/plugin_linux.go | 2 +-
agent/ecscni/plugin_unsupported.go | 2 +-
agent/utils/license.go | 6 +++---
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/agent/config/config.go b/agent/config/config.go
index 4b308bb..5d0aa36 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 8f6b801..b8e7f93 100644
--- a/agent/config/config_unix.go
+++ b/agent/config/config_unix.go
@@ -29,10 +29,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`
// DefaultTaskCgroupV1Prefix is default cgroup v1 prefix for ECS tasks
DefaultTaskCgroupV1Prefix = "/ecs"
@@ -63,7 +63,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 aa56d0a..e8f71b4 100644
--- a/agent/ecscni/plugin_linux.go
+++ b/agent/ecscni/plugin_linux.go
@@ -33,7 +33,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 e156b75..55d1a3c 100644
--- a/agent/ecscni/plugin_unsupported.go
+++ b/agent/ecscni/plugin_unsupported.go
@@ -26,7 +26,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 6eccff6..324307c 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