Skip to content

Commit 6f2aa0e

Browse files
committed
Add tmpfs 0777 mode to try to fix es permission issues
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent ec09ebb commit 6f2aa0e

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches:
77
- 'main'
8-
- 'ddelnano/update-gha-oracle-runners'
8+
- 'dependabot/go_modules/golang.org/x/crypto-0.45.0'
99
schedule:
1010
# Run at 23:09 PST (07:09 UTC) every sunday. Github suggests not running actions on the hour.
1111
- cron: '9 7 * * 0'

src/utils/testingutils/docker/elastic.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,33 @@ func SetupElastic() (*elastic.Client, func(), error) {
6363
}, func(config *docker.HostConfig) {
6464
config.AutoRemove = true
6565
config.RestartPolicy = docker.RestartPolicy{Name: "no"}
66+
// Tmpfs is much faster than the default docker mounts.
67+
config.Mounts = []docker.HostMount{
68+
{
69+
Target: "/opt/elasticsearch/volatile/data",
70+
Type: "tmpfs",
71+
TempfsOptions: &docker.TempfsOptions{
72+
SizeBytes: 100 * 1024 * 1024,
73+
Mode: 0777,
74+
},
75+
},
76+
{
77+
Target: "/opt/elasticsearch/volatile/logs",
78+
Type: "tmpfs",
79+
TempfsOptions: &docker.TempfsOptions{
80+
SizeBytes: 100 * 1024 * 1024,
81+
Mode: 0777,
82+
},
83+
},
84+
{
85+
Target: "/tmp",
86+
Type: "tmpfs",
87+
TempfsOptions: &docker.TempfsOptions{
88+
SizeBytes: 100 * 1024 * 1024,
89+
Mode: 0777,
90+
},
91+
},
92+
}
6693
config.CPUCount = 1
6794
config.Memory = 1024 * 1024 * 1024
6895
config.MemorySwap = 0

0 commit comments

Comments
 (0)