Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added 15 min timeout on mk8s status #54

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions dist/bootstrap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5509,7 +5509,10 @@ function microk8s_init(addons) {
return __awaiter(this, void 0, void 0, function* () {
// microk8s needs some additional things done to ensure it's ready for Juju.
// Add the given addons if any were given.
yield exec_as_microk8s("microk8s status --wait-ready");
if (!(yield exec_as_microk8s("microk8s status --wait-ready --timeout 900"))) {
core.setFailed("Timed out waiting for microk8s to be ready");
beliaev-maksim marked this conversation as resolved.
Show resolved Hide resolved
return false;
}
if (addons) {
yield exec_as_microk8s("sudo microk8s enable " + addons);
}
Expand Down Expand Up @@ -5829,4 +5832,4 @@ module.exports = require("util");;
/******/ // Load entry module and return exports
/******/ return __nccwpck_require__(1098);
/******/ })()
;
;
5 changes: 4 additions & 1 deletion src/bootstrap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ async function retry_until_rc(cmd: string, expected_rc=0, maxRetries=12, timeout
async function microk8s_init(addons) {
// microk8s needs some additional things done to ensure it's ready for Juju.
// Add the given addons if any were given.
await exec_as_microk8s("microk8s status --wait-ready");
if (! await exec_as_microk8s("microk8s status --wait-ready --timeout 900")){
core.setFailed("Timed out waiting for microk8s to be ready")
beliaev-maksim marked this conversation as resolved.
Show resolved Hide resolved
return false;
}
if (addons) {
await exec_as_microk8s("sudo microk8s enable " + addons);
}
Expand Down