Bug 1372069 - [BUG] Searches with global parameters not working as expected
Summary: [BUG] Searches with global parameters not working as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Search
Version: 6.1.9
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: Unspecified
Assignee: Tomer Brisker
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On:
Blocks: 1405495
TreeView+ depends on / blocked
 
Reported: 2016-08-31 20:14 UTC by vivpatil
Modified: 2020-09-10 09:45 UTC (History)
9 users (show)

Fixed In Version: foreman-1.11.0.62-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1405495 (view as bug list)
Environment:
Last Closed: 2017-01-26 10:41:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16565 0 None None None 2016-09-15 08:53:36 UTC
Red Hat Product Errata RHBA-2017:0197 0 normal SHIPPED_LIVE Satellite 6.2.7 Async Bug Release 2017-01-26 15:38:38 UTC

Description vivpatil 2016-08-31 20:14:48 UTC
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 08:53:34 UTC
Created redmine issue http://projects.theforeman.org/issues/16565 from this bug

Comment 3 Bryan Kearney 2016-09-19 10:19:03 UTC
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 10:26:15 UTC
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 13:57:15 UTC
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 10:41:56 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-2017:0197


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