[PUP-7750] puppet resource service fails on FreeBSD 11 Created: 2017/07/04 Updated: 2020/03/04 Resolved: 2020/03/04
|Affects Version/s:||PUP 4.10.0, PUP 5.0.0|
|Labels:||cli, freebsd, help_wanted, service, type_and_provider|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Method Found:||Needs Assessment|
|QA Risk Assessment:||Needs Assessment|
I was playing around with FreeBSD 11 today and found that running puppet resource service failed with the error Error: Could not run: undefined method `gsub' for nil:NilClass. After doing some testing I believe it is due to Puppet not handling the results of running /etc/rc.d/bluetooth rcvar. Details and related examples below:
Initially I was using the version of Puppet installed by running pkg install puppet4 which brought in Puppet 4.10.0. I uninstalled that and installed the Puppet 5.0.0 gem and got the same results.
When looking in /etc/rc.d/bluetooth I noticed that rcvar= isn't set to anything whereas /etc/rc.d/sshd is set to rcvar="sshd_enable". Attached are copies of both files.
|Comment by Geoff Nichols [ 2017/07/06 ]|
Thank you for filing this issue. We agree it is likely an improvement, but due to other issues demanding precedence, we don’t anticipate being able to address this any time soon. If you are interested in submitting a patch to the repository for this project at https://github.com/puppetlabs, please open a pull request.
|Comment by Gene Liverman [ 2017/07/06 ]|
Geoff Nichols Can you point me in the direction of where in the code base to look for the code related to this?
|Comment by Gene Liverman [ 2017/07/07 ]|
After some guidance on where to look, it seems the offending code is likely around provider/service/freebsd.rb line 47 as there is no error handling for when there is no name. I'm planning to take a stab at fixing this in the next week or so.
|Comment by Josh Cooper [ 2020/03/04 ]|
I'm going to close this due to inactivity and based on Geoff's comments above. Please reopen if/when you have a PR.