Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 4.6.0
-
CentOS 7
OSS Puppet Server 2.5.0 with Puppet Agent 1.6.1
-
Agent
-
1
-
Agent 2017-06-14
-
Bug Fix
-
The {{create_resources}} function did not understand that a leading {{@@}} in the resource name should be taken as "exported".
-
No Action
-
Covered by spec test
Description
I have an in house nagios module (that will eventually be on the forge) that has a file export defined in it. Every time that export is hit the exporting client side throws an error because it's trying to write the file locally when it shouldn't be. This only happens when Puppet Agent 1.6.1 is installed on the puppet server (I back reved the server to 2.4.0 and installed latest 1.6.1 agent and ran into it as well so it's likely in the agent, but as it requires exported resources working I can't give a test with just the agent)
Example error:
Error: Puppet::Util::FileType::FileTypeFlat could not write /etc/nagios/conf.d/host_ldap.home.bardicgrove.org_ldap.home.bardicgrove.org.cfg: No such file or directory @ rb_sysopen - /etc/nagios/conf.d/host_ldap.home.bardicgrove.org_ldap.home.bardicgrove.org.cfg
|
Error: /Stage[main]/Nagios::Client/Nagios::Resource[ldap.home.bardicgrove.org]/Nagios::Resource::Host[ldap.home.bardicgrove.org]/Nagios_host[ldap.home.bardicgrove.org]: Could not evaluate: Puppet::Util::FileType::FileTypeFlat could not write /etc/nagios/conf.d/host_ldap.home.bardicgrove.org_ldap.home.bardicgrove.org.cfg: No such file or directory @ rb_sysopen - /etc/nagios/conf.d/host_ldap.home.bardicgrove.org_ldap.home.bardicgrove.org.cfg
|
The code that is getting called is listed in [0] which gets called by [1] on all systems.
[0] https://github.com/tykeal/puppet-nagios/blob/master/manifests/resource.pp#L87-L91
[1] https://github.com/tykeal/puppetserver-mod-profile/blob/master/manifests/nagios/client.pp
Full lab / environment configuration can be found by a combination of the following 4 repositories:
https://github.com/tykeal/puppetserver-main
https://github.com/tykeal/puppetserver-hiera
https://github.com/tykeal/puppetserver-mod-profile
https://github.com/tykeal/puppetserver-mod-role
UPDATE
The problem here came from use of create_resources with resource type preceded by @@ to indicate that the resource is exported.
There may also be a problem with virtual resources.