Bug #5848

Can't search for host with class inherited from config group

Added by Elodie B about 4 years ago. Updated 6 days ago.

Status:Closed
Priority:Normal
Assignee:Joseph Magen
Category:Search
Target version:1.5.2
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link:1110360 Found in Releases:1.5.0
Pull request:

Description

Hi,

I updated the foreman to 1.5 and I am making some tests with configs group.

Add a config group to a host or hostgroup is working, but
1/ I am unable to list hosts where puppet classes are inherited from config group.
2/ I am unable to list hosts where puppet classes are inherited from a config group included in the host group.

Let's say, I have a host named "myserv" with:
- a class (rule100) added for this host
- a class (rule1) inherited from hostgroup
- a class (rule80) inherited from a config group which was added only for this host.
- a class (rule21) inherited from a config group which was added in the host group.

If I go to foreman web interface > hosts -> all hosts. Then if I want to filter by class typing :
"class=rule100" on the filter field, I can find my host. The same with a class (rule1) inherited from group.
- class=rule21, I can't find my host (class inherited from a config group which was added in the host group). The same with class=rule80 (class inherited from a config group which was added only for this host).

I am using admin account to be sure I have full rights. Using debug mode, I can see that there is no SQL request looking on config_group_classes and config_group tables while I am doing my research.

Regards,

Elodie


Related issues

Related to Foreman - Bug #7035: Unable to filter on classes (v1.5.2) Closed 08/12/2014
Duplicated by Foreman - Bug #6209: search for puppet class has no result when in config group Duplicate 06/13/2014

Associated revisions

Revision 81f4af16
Added by Joseph Magen about 4 years ago

fixes #5848 - can't search for host with class inherited from config group

Revision 878a2299
Added by Joseph Magen almost 4 years ago

fixes #5848 - can't search for host with class inherited from config group

(cherry picked from commit 81f4af16ab292d340a395cd0dd37ca742d1d59cc)

History

#1 Updated by Dominic Cleal about 4 years ago

  • Category set to Search

Seems the search by puppet class implementation in app/models/concerns/hostext/search.rb needs updating.

#2 Updated by Dominic Cleal about 4 years ago

  • Subject changed from Can't get host with class inherit from config group to Can't search for host with class inherited from config group

#3 Updated by Joseph Magen about 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Joseph Magen
  • Target version set to 1.8.2

#4 Updated by Joseph Magen about 4 years ago

  • Status changed from Assigned to Ready For Testing

Can you check out this patch at https://github.com/theforeman/foreman/pull/1461
if it works for you.

#5 Updated by Elodie B about 4 years ago

It works, thanks you !

#6 Updated by Elodie B about 4 years ago

In fact, I can see my host, but I have much more results than expected (where the puppet class is not included in hosts)

#7 Updated by Joseph Magen about 4 years ago

Elodie, are you saying the the results are incorrect and some hosts don't have the puppetclass whether directly, inherited through hostgroup or through config group?

#8 Updated by Dmitri Dolguikh about 4 years ago

  • Target version changed from 1.8.2 to 1.8.1

#9 Updated by Dominic Cleal about 4 years ago

  • Duplicated by Bug #6209: search for puppet class has no result when in config group added

#10 Updated by Dominic Cleal about 4 years ago

  • Legacy Backlogs Release (now unused) set to 18

#11 Updated by Elodie B about 4 years ago

Sorry I did not have time to answer before, it works, thank you Joseph.

#12 Updated by Joseph Magen about 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#13 Updated by Bryan Kearney about 4 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1110360

#14 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #7035: Unable to filter on classes (v1.5.2) added

Also available in: Atom PDF