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

Feature/add k8s event interpretation #382

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Robertation256
Copy link

Currently, Acto waits for system convergence by observing a silence of K8s events within a configured
time window. Such a wait of convergence is performed after applying each test case to ensure that the
collected states reflect the system's final states. However, such a wait can be futile when the input CR
carries faulty mutations (ie. invalid container image urls) or represents un-schedulable resources given the
test cluster topology and hardware constraints. In these cases, the cluster gets stuck in an unhealthy state
and corresponding K8s events will not cease to exist, causing Acto to wait until the configured timeout
(480 seconds by default). Therefore, this PR aims to interpret K8s events received during the
convergence wait and identify opportunities for aborting the wait to accelerate the total test runtime.

runner.run_without_collect(resource_file_path)
cluster.delete_cluster(cluster_name, kube_config_path)

assert(log_test_predicate(log_file_path))
Copy link
Author

Choose a reason for hiding this comment

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

Test to see if an abort is triggered by examining the log file, since I haven't been able to find a cleaner way to test that.

k8s_event_watcher_config = {
"default_threshold": 3,
"abort_predicates": [
# a full list of kubelet emitted reason can be found at https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/events/event.go
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the documentation

@tylergu
Copy link
Member

tylergu commented May 1, 2024

@Robertation256 Thanks for the PR! Could you follow this doc to format the code? https://github.com/xlab-uiuc/acto/blob/main/docs/development.md

If you use vscode, installing the black, pylint, and isort should be enough. The github pre-commit hook can also perform the tasks

@Robertation256
Copy link
Author

@Robertation256 Thanks for the PR! Could you follow this doc to format the code? https://github.com/xlab-uiuc/acto/blob/main/docs/development.md

If you use vscode, installing the black, pylint, and isort should be enough. The github pre-commit hook can also perform the tasks

Done!

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.

2 participants