-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$facts['networking']['fqdn'] not present on FreeBSD #174
Comments
Which version of facter are you using? |
Looks like 3.9.0 had a lot of code to work around issues like this that was done away with in 4.0.0. https://github.com/voxpupuli/puppet-snmp/blob/3.9.0/manifests/params.pp |
You are probably using facter 2.x. Are you using puppet all in one package ? |
Hm. Looks to be fairly old |
|
If the version of facter is 2.5.1 and version of puppet is 4.10, the package all in one provided by puppetlabs is not used. You should consider to use it. Facter 2 is old version and not supported by the current version of the module. |
I am fairly certain all I did was FWIW, I have tried:
...or the like in the past, but there are some special FreeBSD-isms that the At any rate, let me repeat the exercise on a clean FreeBSD 12 VM and see what I get... |
I don't understand why FreeBSD does not follow the puppetlabs matrix versions. And puppet labs does not provide packages AIO for freeBSD. I am not a FreeBSD user, it is hard for me to help. |
@decibelhertz probably you have to open an issue on the tracker of packagers to get facter3 compiled on freeBSD. |
Fresh install of FreeBSD 12.0-RELEASE confirms that the
|
Looks like Puppet 5 on FreeBSD will work around the issue by installing Facter 3.12.0, which is okay enough for me. I'm only testing BSD at this point.
I had been using Puppet 4 on FreeBSD with the notion that that would be the closest to my Linux nodes on PE. Looks like I missed factoring in Facter. All that to say, your module says it both supports Puppet 4 and FreeBSD, but the latest If you don't want to support facter 2.x, I think that you should note this FreeBSD+Puppet 4 incompatibility in your module. |
Sounds like we should at least update metadata.json to only mention FreeBSD 12 then. |
The problem is not FreeBSD < 12. It is puppet4 on FreeBSD. That package seems to install Facter 2.5.1. puppet5 installs facter 3.12.0. I have not tried, but expect this is true on FreeBSD 11 as well. So, in short, by only supporting Facter > 3, you only support Puppet >= 5, on FreeBSD. |
Unfortunately, it’s very difficult keeping up with what distributions ship which (sometimes weird) combinations. Puppet 4 actually goes EOL in two weeks time, so we’ll likely be dropping support soon after and it’ll become even more reasonable to expect everyone to be on facter 3 something. |
@decibelhertz If you can confirm the module works on FreeBSD 12 (with puppet 5), we can at least add this version to the metadata.json. Maybe we can add 11 too?? but drop 9 and 10?? Any feedback you can give as to what puppet versions are available on those platforms would be useful. |
Unfortunately, I had an issue with my tester node on 11.x, so I had to destroy it and the template that made it. I don't have a lot of time to spare in to stand 11.x back up in my infrastructure at this point, especially since I am only fringe testing FreeBSD (mostly CentOS, here). I can confirm 12.0-RELEASE with puppet 5 works. I strongly suspect 11.x with Puppet 5 is fine too since I expect its installing the same version of Facter. I guess I'm behind on upgrading my PE; I had not caught the EOL on Puppet 4. Cheers |
FWIW, here is the log of test 12-.0-RELEASE node changing from 3.9.0 of this module to 4.1.0...
|
Thinking on this, I will also suggest that moving the defaults from
|
The alternative is to use fact() which returns undef for unknown facts. That said, IMHO it's still fine to use |
This can also be considered a duplicate of #169. |
I'm fine with |
@decibelhertz Waiting on tests, though deprecating params in favor of data in module in PR #181 Also we don't support Puppet 4 anymore. If this is still an issue after we release v5.0.0, which should be any day now, please re-open. |
Folks -- looking at 5.0.0, which finally uses Hiera (hooray) $facts['fqdn'] was never used. Easy enough to override in my environment, but am curious as to why? More backwards compatibility that way... |
Which facter version do you have installed? The fqdn fact is a legacy fact. |
Wasn't legacy 18 months' back, but of course times change. Looks like I had an old version of facter get installed in my unit tests, which is why I recently noticed. |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Install on FreeBSD
What are you seeing
Failure to compile on FreeBSD 11.2 when using 4.1.0 of this module and stdlib 5.1.0
What behaviour did you expect instead
Cheap workaround may be...
But I am not sure that would work. The fundamental problem is the array key(s) cannot be looked up when $networking is undef. Perhaps simply use
$facts['fqdn']
for now?Output log
Any additional information you'd like to impart
/usr/local/bin/facter -p fqdn
resolves./usr/local/bin/facter -p networking
does not.The text was updated successfully, but these errors were encountered: