[go: nahoru, domu]

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

utils: kata-manager: Ensure only one download URL #8374

Merged
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
15 changes: 12 additions & 3 deletions utils/kata-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ github_get_release_file_url()

[ -z "$download_url" ] && die "Cannot determine download URL for version $version ($url)"

# Check to ensure there is only a single matching URL
local expected_count=1

local count
count=$(echo "$download_url" | wc -l)

[ "$count" -eq "$expected_count" ] || \
die "expected $expected_count download URL but found $download_url"

echo "$download_url"
}

Expand Down Expand Up @@ -501,7 +510,7 @@ configure_containerd()

sudo grep -q "$kata_runtime_type" "$containerd_config" || {
sudo cp "$containerd_config" "${original}"
info "Backed up $containerd_config to $original"
info "Backed up containerd config file '$containerd_config' to '$original'"
}

local modified="false"
Expand Down Expand Up @@ -553,7 +562,7 @@ configure_containerd()
modified="true"
fi

[ "$modified" = "true" ] && info "Modified $containerd_config"
[ "$modified" = "true" ] && info "Modified containerd config file '$containerd_config'"
sudo systemctl enable containerd
sudo systemctl start containerd

Expand Down Expand Up @@ -657,7 +666,7 @@ configure_kata()
-e 's/^kernel_params = "\(.*\)"/kernel_params = "\1 agent.log=debug"/g' \
"$cfg_to"

info "Configured $kata_project for full debug (delete $cfg_to to use pristine $kata_project configuration)"
info "Configured $kata_project for full debug (delete '$cfg_to' to use pristine $kata_project configuration)"
}

handle_kata()
Expand Down
Loading