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

e2e: fix log parsing in podpools test05-prometheus-metrics #844

Merged
merged 1 commit into from Jun 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,7 +1,11 @@
# Test reporting Prometheus metrics from podpools

cleanup() {
vm-command "kubectl get pods -A | grep -E ' pod[0-9]' | while read namespace pod rest; do kubectl -n \$namespace delete pod \$pod --now; done"
}

parse-commandoutput-log_pool_cpuset() {
log_pool_cpuset=$(awk -F[:,] "{print \$6}" <<< "$COMMAND_OUTPUT")
log_pool_cpuset=$(awk -F 'cpus:|, ' "{print \$2}" <<< "$COMMAND_OUTPUT")
out "parsed: log_pool_cpuset=$log_pool_cpuset"
}

Expand Down Expand Up @@ -84,13 +88,15 @@ out "### Multicontainer pod, no annotations. Runs on shared CPUs."
CPUREQ="" CPULIM=""
CONTCOUNT=2 create podpools-busybox
report allowed
vm-command "curl --silent $metrics_url"
vm-command "curl --silent $metrics_url | grep -v ^cgroup_"
verify-log-vs-metrics pod4:pod4c1 0 20

out ""
out "### Multicontainer pod in kube-system namespace. Runs on reserved CPUs."
CPUREQ="" CPULIM=""
namespace=kube-system CONTCOUNT=3 create podpools-busybox
report allowed
vm-command "curl --silent $metrics_url"
vm-command "curl --silent $metrics_url | grep -v ^cgroup_"
verify-log-vs-metrics pod5:pod5c1 0 20

cleanup