Project

General

Profile

Bug #29681

puppet facts exclude filter star wildcard not working as expected

Added by Shira Maximov over 1 year ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Facts
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1759111

Description of problem:
When we set an exclude filter in Administer > Settings > Provisioning > 'Exclude pattern for facts stored in satellite' and use the star wildcard, the filter is not working as expected. For example filter set as:

docker*

will also exclude facts like:

blah_docker_blah

i.e. facts where the string is included in the middle of the fact and not only on the beginning. I would expect that the filter to exclude docker in the middle of the string should be written like:

docker

How reproducible:
Always

Steps to Reproduce:
1. On a system create custom Puppet Fact called blah_docker_blah
2. Run 'puppet agent -t' on the client to propagate the fact to Satellite
3. Navigate to Hosts > All Hosts, choose the host and click the Facts button
4. Filter the facts for docker - no result will be shown
5. Check the exclude filter in Administer > Settings > Provisioning > 'Exclude pattern for facts stored in satellite'
6. The exclude filter docker* is present there by default

Actual results:
Facts with the docker string included in the middle are filtered out.

Expected results:
Facts with the docker string included in the middle will remain reported.

Associated revisions

Revision fc082e8d (diff)
Added by Dominik Matoulek 3 months ago

Fixes #29681 - Fixing bad regex for excluding facts

Foreman uses facts from many tools like Ansible or Puppet to gather
facts about hosts. These facts are also full of facts that foreman don't
care about. That's why Excluded facts setting exist. It has some bugs
that makes fact definiton for excluding hard.

History

#1 Updated by Tomer Brisker over 1 year ago

  • Subject changed from [Satellite 6] puppet facts exclude filter star wildcard not working as expected to puppet facts exclude filter star wildcard not working as expected

#2 Updated by The Foreman Bot 5 months ago

  • Assignee set to Dominik Matoulek
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8551 added

#3 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.0.0 added

#4 Updated by Dominik Matoulek 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF