Bug 1759111 - Puppet facts exclude filter star wildcard not working as expected
Summary: Puppet facts exclude filter star wildcard not working as expected
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Fact
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-07 12:38 UTC by Roman Bobek
Modified: 2020-07-06 21:15 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 29681 Normal New puppet facts exclude filter star wildcard not working as expected 2020-07-30 16:51:48 UTC

Description Roman Bobek 2019-10-07 12:38:51 UTC
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.

Comment 5 Peter Vreman 2019-10-28 10:51:05 UTC
Part of the root cause is the fuzzy documentation/explaination how the matching is really done.

In the list is also 'lo'. But my custom facts with _localdisk_ are not filtered.

This is all vague for my as an user why are the '_docker_' fitlered but '_localdisk_' not. There must be addiational logic behind the filtering that is not explained to the user.

Comment 7 Vladimír Sedmík 2019-11-01 21:40:01 UTC
Hello Peter,
the 'lo' seems to be without any wildcard (in my default case), so perhaps that's why _localdisk_ is not filtered. But you are right some improvement in documentation should be done, for example here: https://access.redhat.com/documentation/en-us/red_hat_satellite/6.6/html/administering_red_hat_satellite/satellite-settings_assembly

Opened new docs BZ here: https://bugzilla.redhat.com/show_bug.cgi?id=1766952

Comment 8 Melanie Corr 2019-11-07 12:32:57 UTC
hi all

I have updated the docs to reflect this bug:

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.6/html/administering_red_hat_satellite/satellite-settings_assembly

I will monitor and update accordingly. 

Thanks,

Melanie

Comment 16 Shira Maximov 2020-05-03 14:47:39 UTC
Created redmine issue https://projects.theforeman.org/issues/29681 from this bug

Comment 17 Brad Buckingham 2020-07-06 21:15:17 UTC
Clearing needinfo as bug 1766952 has provided modifications to the documentation to help address the observations.  That said, this bugzilla remains to provide improved behavior when wildcard characters are used.


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