Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1320492 - Discovery Rules should run on priority basis, the rule with higher priority should execute first
Discovery Rules should run on priority basis, the rule with higher priority s...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Plugin (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: Unused
Assigned To: Lukas Zapletal
Sachin Ghai
http://projects.theforeman.org/issues...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-23 06:49 EDT by Sachin Ghai
Modified: 2018-08-31 11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:28:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 06:49 EDT, Sachin Ghai
no flags Details
rule2 has priority '0' and 2 hosts provisioned with same rule (29.52 KB, image/png)
2016-04-01 07:29 EDT, Sachin Ghai
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 13217 None None None 2016-04-22 12:36 EDT
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description Sachin Ghai 2016-03-23 06:49:08 EDT
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 09:33:12 EDT
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 07:28:07 EDT
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 07:29 EDT
Created attachment 1142514 [details]
rule2 has priority '0' and 2 hosts provisioned with same rule
Comment 10 errata-xmlrpc 2016-07-27 05:28:33 EDT
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.