pcs icon indicating copy to clipboard operation
pcs copied to clipboard

fix location constraint bug 1791791

Open daaitudian opened this issue 2 years ago • 5 comments

Hi: In this Pr, I made some fixes for the #235

daaitudian avatar Sep 22 '22 10:09 daaitudian

Can one of the admins verify this patch?

knet-ci-bot avatar Sep 22 '22 10:09 knet-ci-bot

test this please

tomjelinek avatar Sep 22 '22 12:09 tomjelinek

Thank for your reply. When I see this issue, I thought it was mean to add a [node] option for rule command to make sure the specific resource can run in the node under the rule. Since [node] option is not required in this command, so how would you like to fix this issue?

daaitudian avatar Sep 26 '22 02:09 daaitudian

how would you like to fix this issue?

The correct way is to analyze the constraint rule and check if it contains any node expressions (defined, not_defined, lt, gt, lte, gte, eq, ne). If it doesn't, print a warning. The check cannot be implemented simply, e.g. "lt" in rule. It needs to understand the rule structure to avoid cases when lt is used in a date expression or not as an operator.

tomjelinek avatar Sep 27 '22 11:09 tomjelinek

Ok, thanks for your explanation. I will modify it later.

daaitudian avatar Sep 28 '22 02:09 daaitudian