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

Improve wkdev-enter usability #14

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all 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
4 changes: 2 additions & 2 deletions scripts/host-only/wkdev-enter
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ argsparse_use_option =exec "Treat all remaining non-option arguments (
argsparse_use_option =name: "Name of container" default:wkdev

argsparse_use_option max-retries: "Maximum number of <wait>+<try-to-enter> cycles" type:uint default:10
argsparse_use_option sleep-duration: "Amount of seconds to sleep before attempting to enter the container (during first-time container run)" type:uint default:10
argsparse_use_option sleep-duration: "Amount of seconds to sleep before attempting to enter the container (during first-time container run)" type:uint default:20

argsparse_usage_description="$(cat <<EOF
<< Purpose >>
Expand Down Expand Up @@ -119,7 +119,7 @@ run() {
run_podman_silent ${podman_arguments[@]} exec "${container_name}" test -f "$(get_init_done_file)" && break

retries=$((retries+1))
[ ${retries} -eq 10 ] && _abort_ "Container does not start, please investigate"
[ ${retries} -eq ${max_retries} ] && _abort_ "Container does not start, please investigate using 'podman logs -f ${container_name}'"

echo " Retry ${retries}/${max_retries} in ${sleep_duration_in_seconds} seconds..."
sleep ${sleep_duration_in_seconds}
Expand Down