Project

General

Profile

Bug #21369

Hammer host list shows all hosts if environment is empty

Added by Maximilian Gaß almost 4 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Given an environment called “empty” that has 0 hosts assigned to it:

hammer host list --search "environment = empty" 

outputs 0 hosts

but

hammer host list --environment=empty 

outputs all hosts in Forman

The versions are:

# yum list installed '*foreman*' 
Loaded plugins: etckeeper, keys, protectbase, versionlock
0 packages excluded due to repository protections
Installed Packages
foreman.noarch                                                                  1.15.6-1.el7                                                 @foreman        
foreman-cli.noarch                                                              1.15.6-1.el7                                                 @foreman        
foreman-debug.noarch                                                            1.15.6-1.el7                                                 @foreman        
foreman-installer.noarch                                                        1:1.15.6-2.el7                                               @foreman        
foreman-libvirt.noarch                                                          1.15.6-1.el7                                                 @foreman        
foreman-postgresql.noarch                                                       1.15.6-1.el7                                                 @foreman        
foreman-release.noarch                                                          1.15.6-1.el7                                                 @foreman        
foreman-release-scl.noarch                                                      3-1.el7                                                      @foreman        
foreman-selinux.noarch                                                          1.15.6-1.el7                                                 @foreman        
tfm-rubygem-foreman_column_view.noarch                                          0.3.0-1.fm1_14.el7                                           @foreman-plugins
tfm-rubygem-foreman_dhcp_browser.noarch                                         0.0.7-3.fm1_11.el7                                           @foreman-plugins
tfm-rubygem-foreman_hooks.noarch                                                0.3.14-1.fm1_15.el7                                          @foreman-plugins
tfm-rubygem-hammer_cli_foreman.noarch                                           0.10.2-1.el7                                                 @foreman        
tfm-rubygem-puppetdb_foreman.noarch                                             3.1.2-1.fm1_15.el7                                           @foreman-plugins


Related issues

Is duplicate of Foreman - Bug #20204: GET /hostgroup/:hostgroup_id/hosts returns all hosts when id of empty hostgroup is usedClosed2017-07-04

History

#1 Updated by Tomáš Strachota almost 4 years ago

  • Status changed from New to Duplicate

Thank you for the report and the detailed version info. This issue is caused by a bug in API that has been reported as http://projects.theforeman.org/issues/20204

I'm closing this one as a duplicity.

#2 Updated by Tomáš Strachota almost 4 years ago

  • Is duplicate of Bug #20204: GET /hostgroup/:hostgroup_id/hosts returns all hosts when id of empty hostgroup is used added

Also available in: Atom PDF