-
Notifications
You must be signed in to change notification settings - Fork 43
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
base: main
Are you sure you want to change the base?
Feature/add k8s event interpretation #382
Conversation
runner.run_without_collect(resource_file_path) | ||
cluster.delete_cluster(cluster_name, kube_config_path) | ||
|
||
assert(log_test_predicate(log_file_path)) |
There was a problem hiding this comment.
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.
acto/utils/k8s_event_watcher.py
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the documentation
@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! |
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.