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

Document operator evaluation #259

Closed
riban-bw opened this issue Feb 13, 2020 · 1 comment · Fixed by #274
Closed

Document operator evaluation #259

riban-bw opened this issue Feb 13, 2020 · 1 comment · Fixed by #274
Assignees
Labels
enhancement New feature or improvement
Milestone

Comments

@riban-bw
Copy link

Describe the bug

A node configured with operator OR seems to logical AND results.
A node configured with operator AND seems to logical OR results

To Reproduce

  1. Configure a node as OR
  2. Add several services to node
  3. Set a node to fail state

Expected behavior

If any services is in fail state, node shows fail state, i.e. service 1 OR service 2 OR service 3 fails.

Actual Behaviour

If all services are in fail state, node shows fail state, i.e. service 1 AND service 2 AND service 3 fails.

Additional context

Converse behaviour for AND operator, i.e. any service fail will trigger node to show failed.
Maybe developer had inverted logical approach, i.e. logic operates on OK state - service 1 OR service 2 OR service 3 is OK. This is not intuitive to me. I do not see documentation describing this logic.

@nmartinii
Copy link
Contributor

Our operators use the OK or UP status to determine the result. That means, in case of the OR operator, a node is OK as long as at least one subnode is OK/UP. The AND operator, on the other hand, expects all sub-nodes to be OK/UP.
Though, we'll update our documentation to make it more clear how a node's state is calculated.

@nilmerg nilmerg added this to the 2.3.0 milestone Feb 26, 2020
@nilmerg nilmerg changed the title AND OR seem inverted Document operator evaluation Feb 26, 2020
@nilmerg nilmerg added the enhancement New feature or improvement label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants