Created attachment 1139506 [details]
rule having '0' priority should be applied first instead of rule with priority '1'
Description of problem: I created two discovery rules.
1) rule1 with priority '1'
2) rule2 with priority '0'
but when I auto provision a discovered host, host always provisioned with rule1.
As we know, the 'lower integer means higher priority' so I think rule2 should apply first instead of rule1.
Version-Release number of selected component (if applicable):
Sat6.2 beta snap4
Steps to Reproduce:
1. create discovery rule 1 with priority '1'
2. create another rule 2 with priority '0'
3. discovered a host and auto provision via rule
host provisioned with rule 1
since '0' integer has higher priority so, host should provision via rule'2'
Moving to POST since upstream bug http://projects.theforeman.org/issues/13217 has been closed
For the record, I am clearing our documentation which was also a bit fuzzy around this: https://github.com/theforeman/theforeman.org/pull/556
Applied in changeset commit:foreman_discovery|b1d5689467aa42c699c5e3a4904a2d278dbf8a31.
Verified with sat6.2 beta snap6
Now rule with lower priority applied first. The reported issue has been fixed. Please see the attached screenshot for verification, where two hosts were auto provisioned by rule2 who has priority '0' set
Created attachment 1142514 [details]
rule2 has priority '0' and 2 hosts provisioned with same rule
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.