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

TAS policy update #60

Closed
togashidm opened this issue Sep 16, 2021 · 2 comments
Closed

TAS policy update #60

togashidm opened this issue Sep 16, 2021 · 2 comments

Comments

@togashidm
Copy link
Contributor

An issue has appeared when trying to update a running TAS policy. If the target values in the policy specs under some strategy rule are changed, the new value should replace the old value. However, the new value is added as a new rule to that strategy. This issue is being investigated with the already raised issue #56 for which a resolution is to be released in the coming weeks.

@killianmuldoon
Copy link
Contributor

@togashidm is there more detail on this issue? It would be good if there are steps to recreate

@togashidm
Copy link
Contributor Author

Some more details on the issue. TAS running with the initial health demo-policy: kubectl apply -f health-policy.yaml
the target value is changed accordingly in the policy and apply the policy again.

See logs below that when the target value is changed from 2 to 5. The same happens when changes to 7. Nothing happens when the target value is a return to 2. That is, TAS is considering the updated policy while running in the cluster as an addition.

— Initial —
I0818 12:38:55.128399 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:38:55.128439 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2
I0818 12:38:57.127625 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:38:57.127666 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2
I0818 12:38:59.139403 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:38:59.139451 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2

— Target value Updated from 2 to 5 ----
I0818 12:39:39.125472 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2
I0818 12:39:40.388678 1 controller.go:116] "Policy: demo-policy updated" component="controller"
I0818 12:39:40.388729 1 enforcer.go:83] "Duplicate strategy found. Not adding demo-policy: scheduleonmetric to registry" component="controller"
I0818 12:39:40.388755 1 enforcer.go:83] "Duplicate strategy found. Not adding demo-policy: dontschedule to registry" component="controller"
I0818 12:39:40.388775 1 enforcer.go:88] "Adding strategies: deschedule demo-policy" component="controller"
I0818 12:39:41.125866 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:39:41.125906 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2
I0818 12:39:41.125945 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:39:41.125959 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 5
I0818 12:39:41.146252 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:39:41.146277 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2

— Target value Updated from 5 to 7 ----
I0818 12:41:15.462468 1 controller.go:116] "Policy: demo-policy updated" component="controller"
I0818 12:41:15.462503 1 enforcer.go:88] "Adding strategies: deschedule demo-policy" component="controller"
I0818 12:41:15.462527 1 enforcer.go:83] "Duplicate strategy found. Not adding demo-policy: scheduleonmetric to registry" component="controller"
I0818 12:41:15.462545 1 enforcer.go:83] "Duplicate strategy found. Not adding demo-policy: dontschedule to registry" component="controller"
I0818 12:41:17.124885 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:41:17.124921 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2
I0818 12:41:17.124950 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:41:17.124963 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 5
I0818 12:41:17.124979 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:41:17.124991 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 7

— Target value Updated from 7 to 2 ----
I0818 12:42:42.559737 1 controller.go:116] "Policy: demo-policy updated" component="controller"
I0818 12:42:43.325055 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:42:43.325114 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2
I0818 12:42:43.325164 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:42:43.325190 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 5
I0818 12:42:43.325219 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:42:43.325245 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 7
I0818 12:42:44.123422 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:42:44.123458 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 2
I0818 12:42:44.123488 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:42:44.123503 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 5
I0818 12:42:44.123518 1 enforce.go:128] "Evaluating demo-policy" component="controller"
I0818 12:42:44.123531 1 strategy.go:39] Policy demo-policy, strt deschedule, metricname health_metric, rule target 7

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

No branches or pull requests

2 participants