Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1372069 - [BUG] Searches with global parameters not working as expected
[BUG] Searches with global parameters not working as expected
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Search (Show other bugs)
6.1.9
x86_64 Linux
high Severity medium (vote)
: 6.2.7
: Unused
Assigned To: Tomer Brisker
Sanket Jagtap
: Triaged
Depends On:
Blocks: 1405495
  Show dependency treegraph
 
Reported: 2016-08-31 16:14 EDT by vivpatil
Modified: 2017-01-26 05:41 EST (History)
9 users (show)

See Also:
Fixed In Version: foreman-1.11.0.62-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1405495 (view as bug list)
Environment:
Last Closed: 2017-01-26 05:41:56 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 16565 None None None 2016-09-15 04:53 EDT
Red Hat Product Errata RHBA-2017:0197 normal SHIPPED_LIVE Satellite 6.2.7 Async Bug Release 2017-01-26 10:38:38 EST

  None (edit)
Description vivpatil 2016-08-31 16:14:48 EDT
Description of problem:
Searches with global parameters not working as expected. The hammer host list --search "params.globalparameter = value1" returns all hosts even when we override these values for some hosts. From WebUI also we get same results.

Version-Release number of selected component (if applicable):


How reproducible:
Everytime

Steps to Reproduce:
1. hammer global-parameter set --name myparam --value one

2. hammer host set-parameter --host-id 3 --name myparam --value two

3. hammer host list --search "params.myparam = two"
---|-------------------|------------------|------------|-----------------|------------------
ID | NAME              | OPERATING SYSTEM | HOST GROUP | IP              | MAC              
---|-------------------|------------------|------------|-----------------|------------------
3  | testvm.labs.local | RedHat 7.2       | provhg     | 192.168.124.100 | 52:54:00:79:93:27
---|-------------------|------------------|------------|-----------------|------------------

4. hammer host list --search "params.myparam = one"
---|----------------------|------------------|------------|-----------------|------------------
ID | NAME                 | OPERATING SYSTEM | HOST GROUP | IP              | MAC              
---|----------------------|------------------|------------|-----------------|------------------
1  | satellite.labs.local | RedHat 7.2       |            | 192.168.124.10  | 52:54:00:98:78:a0
3  | testvm.labs.local    | RedHat 7.2       | provhg     | 192.168.124.100 | 52:54:00:79:93:27
---|----------------------|------------------|------------|-----------------|------------------

Expected results: Hosts with values overridden should not be listed
Comment 2 Tomer Brisker 2016-09-15 04:53:34 EDT
Created redmine issue http://projects.theforeman.org/issues/16565 from this bug
Comment 3 Bryan Kearney 2016-09-19 06:19:03 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16565 has been resolved.
Comment 9 Sanket Jagtap 2016-10-21 06:26:15 EDT
Build: Satellite 6.3 snap 5

steps:

hammer> global-parameter set --name myparam --value one
Created parameter [myparam] with value [one].

hammer> host list
---|-------------------------------------------------|------------------|--------------|--------------|-------------------|--------------|----------------------
ID | NAME                                            | OPERATING SYSTEM | HOST GROUP   | IP           | MAC               | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|-------------------------------------------------|------------------|--------------|--------------|-------------------|--------------|----------------------
2  | angie-kobis.abc.redhat.com  | RedHat 7.2       | rhel7_hstgrp | 0.0.176.21  |                   | rhel7_cv     | Dev
4  | jose-felts.abc.redhat.com   | RedHat 7.2       | rhel7_hstgrp | 0.0.176.012 |                   | rhel7_cv     | Dev
3  | julia-altken.abc.redhat.com | RedHat 7.2       | rhel7_hstgrp | 0.0.176.010 |                   | rhel7_cv     | Dev
1  | sjagtap-sat6.abc.redhat.com  | RedHat 7.2       |              | 0.0.1.55  | 00:1a:4a:3e:a6:35 |              |
---|-------------------------------------------------|------------------|--------------|--------------|-------------------|--------------|----------------------

hammer> host set-parameter --host-id 3 --name myparam --value two
New host parameter created

hammer> host list --search "params.myparam = two"
---|-------------------------------------------------|------------------|--------------|--------------|-----|--------------|----------------------
ID | NAME                                            | OPERATING SYSTEM | HOST GROUP   | IP           | MAC | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|-------------------------------------------------|------------------|--------------|--------------|-----|--------------|----------------------
3  | julia-altken.abc.redhat.com | RedHat 7.2       | rhel7_hstgrp | 0.0.176.010 |     | rhel7_cv     | Dev
---|-------------------------------------------------|------------------|--------------|--------------|-----|--------------|----------------------


hammer> host list --search "params.myparam = one"
---|------------------------------------------------|------------------|--------------|--------------|-------------------|--------------|----------------------
ID | NAME                                           | OPERATING SYSTEM | HOST GROUP   | IP           | MAC               | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|------------------------------------------------|------------------|--------------|--------------|-------------------|--------------|----------------------
2  | angie-kobis.abc.redhat.com | RedHat 7.2       | rhel7_hstgrp | 0.0.176.21  |                   | rhel7_cv     | Dev
4  | jose-felts.abc.redhat.com  | RedHat 7.2       | rhel7_hstgrp | 0.0.176.012 |                   | rhel7_cv     | Dev
1  | sjagtap-sat6.abc.redhat.com | RedHat 7.2       |              | 0.0.1.55  | 00:1a:4a:3e:a6:35 |              |
---|------------------------------------------------|------------------|--------------|--------------|-------------------|--------------|----------------------
Comment 16 Sanket Jagtap 2017-01-11 08:57:15 EST
Build : Satellite 6.2.7 snap 1

hammer> global-parameter set --name myparam --value one
Created parameter [myparam] with value [one].
hammer> host list
---|--------------------------------------------------------|------------------|-------------------------|-------------|------------------
ID | NAME                                                   | OPERATING SYSTEM | HOST GROUP              | IP          | MAC
---|--------------------------------------------------------|------------------|-------------------------|-------------|------------------
6  | libvirt1-rhel7.xyz.com           | RedHat 7.3       | RHEL 7 Server 64-bit HG | 0.0.0.10 | 52:54:00:82:30:b4
7  | libvirt2-rhel7.xyz.com           | RedHat 7.3       | RHEL 7 Server 64-bit HG | 0.0.0.15 | 52:54:00:15:3c:c7
8  | libvirt3-rhel7.xyz.com           | RedHat 7.3       | RHEL 7 Server 64-bit HG | 0.0.0.17 | 52:54:00:5c:5e:e5
1  | qe-capsule-feature-rhel6.xyz.com | RedHat 7.3       |                         | 0.0.0.1  | 52:54:00:d8:37:e5
---|--------------------------------------------------------|------------------|-------------------------|-------------|------------------
hammer> host set-parameter --host-id 7 --name myparam --value two
New host parameter created
hammer> host list --search "params.myparam = two"
---|----------------------------------------------|------------------|-------------------------|-------------|------------------
ID | NAME                                         | OPERATING SYSTEM | HOST GROUP              | IP          | MAC
---|----------------------------------------------|------------------|-------------------------|-------------|------------------
7  | libvirt2-rhel7.xyz.com | RedHat 7.3       | RHEL 7 Server 64-bit HG | 0.0.0.15 | 52:54:00:15:3c:c7
---|----------------------------------------------|------------------|-------------------------|-------------|------------------
hammer> host list --search "params.myparam = one"
---|--------------------------------------------------------|------------------|-------------------------|-------------|------------------
ID | NAME                                                   | OPERATING SYSTEM | HOST GROUP              | IP          | MAC
---|--------------------------------------------------------|------------------|-------------------------|-------------|------------------
6  | libvirt1-rhel7.xyz.com           | RedHat 7.3       | RHEL 7 Server 64-bit HG | 0.0.0.10 | 52:54:00:82:30:b4
8  | libvirt3-rhel7.xyz.com           | RedHat 7.3       | RHEL 7 Server 64-bit HG | 0.0.0.17 | 52:54:00:5c:5e:e5
1  | qe-capsule-feature-rhel6.xyz.com | RedHat 7.3       |                         | 0.0.0.1  | 52:54:00:d8:37:e5
---|--------------------------------------------------------|------------------|-------------------------|-------------|------------------
Comment 18 errata-xmlrpc 2017-01-26 05:41:56 EST
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-2017:0197

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