Red Hat Bugzilla – Bug 1372069
[BUG] Searches with global parameters not working as expected
Last modified: 2017-01-26 05:41:56 EST
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
Created redmine issue http://projects.theforeman.org/issues/16565 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16565 has been resolved.
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 | | ---|------------------------------------------------|------------------|--------------|--------------|-------------------|--------------|----------------------
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 ---|--------------------------------------------------------|------------------|-------------------------|-------------|------------------
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