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: add test for dynamic balloons configuration update #831

Merged
merged 1 commit into from Jun 20, 2022

Conversation

askervin
Copy link
Contributor

  • Add new test that changes balloons and CPU configurations using a
    config map.
  • Refactor verify-metrics functions to a common source file.

@askervin
Copy link
Contributor Author

Needs balloons configuration update patch from PR #830.

@askervin askervin force-pushed the 5JD_e2e_balloons_config_update branch from 0d5740e to 4588475 Compare June 14, 2022 07:07
@askervin askervin marked this pull request as ready for review June 14, 2022 07:36
Comment on lines 6 to 21
cleanup() {
kubectl delete pods --all --now
( kubectl delete namespace $testns )
( kubectl delete btype1ns0 )
terminate cri-resmgr
terminate cri-resmgr-agent
vm-command "cri-resmgr -reset-policy; cri-resmgr -reset-config"
}

apply-configmap() {
vm-put-file $(instantiate balloons-configmap.yaml) balloons-configmap.yaml
vm-command "cat balloons-configmap.yaml"
kubectl apply -f balloons-configmap.yaml
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... shouldn't it be something like:

cleanup() {
    vm-command "kubectl delete pods --all --now; \
        kubectl delete pods -n $testns --all --now; \
        kubectl delete pods -n btype1ns0 --all --now; \
        kubectl delete namespace $testns || :; \
        kubectl delete namespace btype1ns0 || :"
    terminate cri-resmgr
    terminate cri-resmgr-agent
    vm-command "cri-resmgr -reset-policy; cri-resmgr -reset-config"
}

apply-configmap() {
    vm-put-file $(instantiate balloons-configmap.yaml) balloons-configmap.yaml
    vm-command "cat balloons-configmap.yaml"
    vm-command "kubectl apply -f balloons-configmap.yaml"
}

BTYPE0_CPUCLASS="classC" BTYPE1_SKIP=1 BTYPE2_CPUCLASS="classB" BTYPE2_NAMESPACE0='"*"' apply-configmap
verify-metrics-has-line 'btype0\[0\].*pod0:pod0c0.*cpu_class="classC"'
verify-metrics-has-line 'btype2\[0\].*pod1:pod1c0.*cpu_class="classB"'
verify-metrics-has-line 'btype2\[0\].*pod2:pod2c0.*cpu_class="classB"'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And do a final

cleanup

here at the end too, please.

- Add new test that changes balloons and CPU configurations using a
  config map.
- Refactor verify-metrics functions to a common source file.
@askervin askervin force-pushed the 5JD_e2e_balloons_config_update branch from 4588475 to 85abe96 Compare June 17, 2022 12:18
Copy link
Contributor

@klihub klihub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@klihub klihub merged commit aed43d6 into intel:master Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants