Project

General

Profile

Feature #11972

Implement regex for option ignore_puppet_facts_for_provisioning

Added by Anonymous over 6 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Facts
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Hey guys,
I'm currently encountering an issue, that /etc/node.rb MYNODE returns 1 because
foreman can not handle all the interfaces.
I'm running a KVM host and have around 100 tap interfaces. I don't even want them
to show up in the foreman interface.

It would be nice, to not ignore every device using the provisioning option "ignore_puppet_facts_for_provisioning=true".
Instead using a regex for that would be nice. That way, I can exclude specific interfaces.

For example an option like "ignore_puppet_facts_for_provisioning_iface=^tap[\d]+$" would be nice. That way
these interface would be excluded if matched the regex.


Related issues

Related to Foreman - Bug #12013: Cannot provision host because MAC address is supposedly takenClosed2015-09-30
Related to Discovery - Bug #12391: Discovery breaks ignore_puppet_facts_for_provisioning global settingClosed2015-11-04
Related to Foreman - Bug #11434: Foreman 1.7.x -> 1.8.2 (Puppet collects/adds Lots of bogus interface entries)Closed2015-08-19

Associated revisions

Revision 379de99a (diff)
Added by Marek Hulán over 6 years ago

Fixes #11972 - ignore specific interfaces via settings

Revision e4cabf0f (diff)
Added by Marek Hulán about 6 years ago

Fixes #11972 - ignore specific interfaces via settings

(cherry picked from commit 379de99adbde93349824d4516b95079bfd970e90)

History

#1 Updated by Lukas Zapletal over 6 years ago

  • Related to Bug #12013: Cannot provision host because MAC address is supposedly taken added

#2 Updated by Lukas Zapletal over 6 years ago

I believe this was solved with #12013

#3 Updated by Marek Hulán over 6 years ago

  • Difficulty deleted (easy)

I don't think that this was solved by #12013, this is valid RFE that would allow us to customize which interfaces should be ignored. As a part of this feature, regexp settings type would have to be added first. Also the user experience wouldn't be probably great, writing regexps is not straightforward.

Also note that #12013 ignores ^macvtap, not ^tap interfaces, so I'm afraid it does not even solve the issue descried in this Feature request.

#4 Updated by Anonymous over 6 years ago

Well, for me it would work if we just ignore ^tap devices. But probably someone will then have the issue, that he these interfaces to show up in foreman.
Best solution would be to use regexp settings type as you said.

#5 Updated by Marek Hulán over 6 years ago

Well we support arrays in settings today, so it might be much easier to just accept an array of prefixes that should be ignored. I know it's not as powerful as regexps but should work in most cases I think.

#6 Updated by Anonymous over 6 years ago

Appreciate it ;)

#7 Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2785 added
  • Pull request deleted ()

#8 Updated by Marek Hulán over 6 years ago

  • Assignee set to Marek Hulán

#9 Updated by Marek Hulán over 6 years ago

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

#10 Updated by Dominic Cleal over 6 years ago

  • Legacy Backlogs Release (now unused) set to 71

#11 Updated by Brandon Weeks about 6 years ago

I would like to propose backporting this to the 1.10 branch if nobody sees a problem with it. While this a minor feature improvement independently, it's a major bugfix if you take #12391 into account. Since #12391 looks like it might be a little harder to solve, backporting this to 1.10 would provide a very solid workaround for the OpenStack (and other virtualization) users that depend on ignore_puppet_facts_for_provisioning to not overload Foreman with garbage nic entires. I've backported the fix to 1.10RC2 locally and it's been flawless in my testing.

#12 Updated by Brandon Weeks about 6 years ago

  • Related to Bug #12391: Discovery breaks ignore_puppet_facts_for_provisioning global setting added

#13 Updated by Dominic Cleal about 6 years ago

  • Legacy Backlogs Release (now unused) changed from 71 to 63

Yes, I think that's reasonable. We have an RC available so we can put it in there.

#14 Updated by Marek Hulán almost 6 years ago

  • Related to Bug #11434: Foreman 1.7.x -> 1.8.2 (Puppet collects/adds Lots of bogus interface entries) added

Also available in: Atom PDF