ganeti-github-testing/ganeti-test-1 — pull request #12 by nh2 (2014-09-26 13:58:24+00:00)
Title: design-optables: Fix maintenance pause example

The example filter did not actually do what was written in its description.

For `reason` predicates, the spec says

"This predicate is true, if one of the entries of one of the opcodes
in this job satisfies the expression."

The existing

["reason", ["!", ["=~", "reason", "maintenance pink bunny"]]]

would therefore match on pretty much all jobs submitted, as even
jobs with `--reason="maintenance pink bunny"` have other reason trail
entries that are not "maintenance pink bunny", and one such entry
suffices to satisfy the expression. Consequenlty, the given example
would in practice pause all new jobs.

The correct way to do this is a filter chain:

prio 0 ["reason", ["=~", "reason", "maintenance pink bunny"]] PASS
prio 1 ["jobid", [">", "id", "watermark"]] PAUSE

Signed-off-by: Niklas Hambuechen