Bug 1320492 - Discovery Rules should run on priority basis, the rule with higher priority should execute first
Summary: Discovery Rules should run on priority basis, the rule with higher priority s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Plugin
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-23 10:49 UTC by Sachin Ghai
Modified: 2019-09-26 17:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 09:28:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
rule having '0' priority should be applied first instead of rule with priority '1' (37.57 KB, image/png)
2016-03-23 10:49 UTC, Sachin Ghai
no flags Details
rule2 has priority '0' and 2 hosts provisioned with same rule (29.52 KB, image/png)
2016-04-01 11:29 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 13217 0 None None None 2016-04-22 16:36:23 UTC
Red Hat Product Errata RHBA-2016:1501 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Description Sachin Ghai 2016-03-23 10:49:08 UTC
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

How reproducible:


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

Actual results:
host provisioned with rule 1

Expected results:
since '0' integer has higher priority so, host should provision via rule'2'

Additional info:

Comment 3 Bryan Kearney 2016-03-23 13:33:12 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/13217 has been closed
-------------
Lukas Zapletal
For the record, I am clearing our documentation which was also a bit fuzzy around this: https://github.com/theforeman/theforeman.org/pull/556
-------------
Anonymous
Applied in changeset commit:foreman_discovery|b1d5689467aa42c699c5e3a4904a2d278dbf8a31.

Comment 7 Sachin Ghai 2016-04-01 11:28:07 UTC
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

Comment 8 Sachin Ghai 2016-04-01 11:29:40 UTC
Created attachment 1142514 [details]
rule2 has priority '0' and 2 hosts provisioned with same rule

Comment 10 errata-xmlrpc 2016-07-27 09:28:33 UTC
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.

https://access.redhat.com/errata/RHBA-2016:1501


Note You need to log in before you can comment on or make changes to this bug.