Skip to content

Commit 8a1f6cd

Browse files
committed
1 parent a4514a1 commit 8a1f6cd

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/__tests__/configure-environment.test.js

+15
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ describe('configure-docker module test suite', () => {
2424
'sudo apt-get install -y conntrack'
2525
);
2626
});
27+
test('disables fs protection (HOST_JUJU_LOCK_PERMISSION with minikube 1.31)', () => {
28+
expect(logExecSync).toHaveBeenCalledWith(
29+
'sudo sysctl fs.protected_regular=0'
30+
);
31+
});
2732
test('waits for docker to be ready', () => {
2833
expect(logExecSync).toHaveBeenCalledWith(
2934
"docker version -f '{{.Server.Version}} - {{.Client.Version}}'"
@@ -43,6 +48,11 @@ describe('configure-docker module test suite', () => {
4348
'sudo apt-get install -y conntrack'
4449
);
4550
});
51+
test('disables fs protection (HOST_JUJU_LOCK_PERMISSION with minikube 1.31)', () => {
52+
expect(logExecSync).toHaveBeenCalledWith(
53+
'sudo sysctl fs.protected_regular=0'
54+
);
55+
});
4656
test('installs cni plugins', () => {
4757
expect(download.installCniPlugins).toHaveBeenCalledTimes(1);
4858
});
@@ -63,6 +73,11 @@ describe('configure-docker module test suite', () => {
6373
'sudo apt-get install -y conntrack'
6474
);
6575
});
76+
test('disables fs protection (HOST_JUJU_LOCK_PERMISSION with minikube 1.31)', () => {
77+
expect(logExecSync).toHaveBeenCalledWith(
78+
'sudo sysctl fs.protected_regular=0'
79+
);
80+
});
6681
test('installs cni plugins', () => {
6782
expect(download.installCniPlugins).toHaveBeenCalledTimes(1);
6883
});

src/configure-environment.js

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const configureEnvironment = async (inputs = {}) => {
2626
core.info('Updating Environment configuration to support Minikube');
2727
logExecSync('sudo apt update -y');
2828
logExecSync('sudo apt-get install -y conntrack');
29+
// Resolves: Exiting due to HOST_JUJU_LOCK_PERMISSION: Failed to start host: boot lock: unable to open /tmp/juju-xxnnn: permission denied
30+
logExecSync('sudo sysctl fs.protected_regular=0');
2931
if (driver === 'docker') {
3032
core.info('Waiting for Docker to be ready');
3133
await waitForDocker();

0 commit comments

Comments
 (0)