Alan Sparks
2010-Apr-06 04:10 UTC
[Puppet Users] Export resource issue - "more than one of content, source, target"
I''m trying to create an exported file resource and receiving a vague error message: Apr 5 18:01:04 ny4-dev-util01 puppetd[12860]: Could not run Puppet configuration client: You cannot specify more than one of content, source, target at line 102 A puppet client (it''s 0.24.8) is creating the following resource: @@file { "mlwormbackup_$fqdn": mode => 644, owner => root, group => root, ensure => $worm_backup_enabled, path => "/root/ml_backup_hosts/$fqdn", content => "HOST=$fqdn\nCLEAR=$my_clear_shortname\nCLIENT=$my_bd_shortname\n", tag => "mlwormbackup", } Another server (this is a 0.25.4 puppet) has the following in its node definition: File <<| tag == "mlwormbackup" |>> All are running against a 0.25.4 puppetmaster. We''re in process of testing migration of all to 0.25. The message makes no sense to me. The resource only has a content parameter, no source or target. Why is the 0.25 puppet (or the puppetmaster?) complaining about "more than one" of anything? I''ve looked for duplicate instances of this resource, emptied the storeconfigs database completely, and still cannot locate the source of this message. Is there some incompatibility in stored configs between 0.24 and 0.25 clients? Thanks in advance for any advice. -Alan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ohad Levy
2010-Apr-06 04:46 UTC
Re: [Puppet Users] Export resource issue - "more than one of content, source, target"
what happens if you use source => undef ? Ohad On Tue, Apr 6, 2010 at 12:10 PM, Alan Sparks <asparks@doublesparks.net>wrote:> > I''m trying to create an exported file resource and receiving a vague > error message: > Apr 5 18:01:04 ny4-dev-util01 puppetd[12860]: Could not run Puppet > configuration client: You cannot specify more than one of content, > source, target at line 102 > > A puppet client (it''s 0.24.8) is creating the following resource: > @@file { "mlwormbackup_$fqdn": > mode => 644, > owner => root, > group => root, > ensure => $worm_backup_enabled, > path => "/root/ml_backup_hosts/$fqdn", > content => > "HOST=$fqdn\nCLEAR=$my_clear_shortname\nCLIENT=$my_bd_shortname\n", > tag => "mlwormbackup", > } > > Another server (this is a 0.25.4 puppet) has the following in its node > definition: > File <<| tag == "mlwormbackup" |>> > > > All are running against a 0.25.4 puppetmaster. We''re in process of > testing migration of all to 0.25. > > The message makes no sense to me. The resource only has a content > parameter, no source or target. Why is the 0.25 puppet (or the > puppetmaster?) complaining about "more than one" of anything? I''ve > looked for duplicate instances of this resource, emptied the > storeconfigs database completely, and still cannot locate the source of > this message. > > Is there some incompatibility in stored configs between 0.24 and 0.25 > clients? > > Thanks in advance for any advice. > -Alan > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken
2010-Apr-06 07:07 UTC
[Puppet Users] Re: Export resource issue - "more than one of content, source, target"
I would do more experimentation on your resource temporarily to find the problem. For example: * Set ''ensure'' explicitly to ''file''. Not a var (or remove it entirely if you are unsure). If it is interpreting that as a path it will try to install a symbolic link which may be giving you the error you have received for example. * Does this occur without being exported? ie. on the original local box? Or on the box you are trying to export to? * Try different ''content'' items ... try blank for example to make sure its not having trouble parsing. It feels to me like its your ''ensure'' line but try a few things first. Strip your resource back to its simplest parts until it works - then keep applying your specific configuration piece by piece until it breaks again. ken. On Apr 6, 5:10 am, Alan Sparks <aspa...@doublesparks.net> wrote:> I''m trying to create an exported file resource and receiving a vague > error message: > Apr 5 18:01:04 ny4-dev-util01 puppetd[12860]: Could not run Puppet > configuration client: You cannot specify more than one of content, > source, target at line 102 > > A puppet client (it''s 0.24.8) is creating the following resource: > @@file { "mlwormbackup_$fqdn": > mode => 644, > owner => root, > group => root, > ensure => $worm_backup_enabled, > path => "/root/ml_backup_hosts/$fqdn", > content => > "HOST=$fqdn\nCLEAR=$my_clear_shortname\nCLIENT=$my_bd_shortname\n", > tag => "mlwormbackup", > } > > Another server (this is a 0.25.4 puppet) has the following in its node > definition: > File <<| tag == "mlwormbackup" |>> > > All are running against a 0.25.4 puppetmaster. We''re in process of > testing migration of all to 0.25. > > The message makes no sense to me. The resource only has a content > parameter, no source or target. Why is the 0.25 puppet (or the > puppetmaster?) complaining about "more than one" of anything? I''ve > looked for duplicate instances of this resource, emptied the > storeconfigs database completely, and still cannot locate the source of > this message. > > Is there some incompatibility in stored configs between 0.24 and 0.25 > clients? > > Thanks in advance for any advice. > -Alan-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Alan Sparks
2010-Apr-07 01:24 UTC
Re: [Puppet Users] Export resource issue - "more than one of content, source, target"
Alan Sparks wrote:> I''m trying to create an exported file resource and receiving a vague > error message: > Apr 5 18:01:04 ny4-dev-util01 puppetd[12860]: Could not run Puppet > configuration client: You cannot specify more than one of content, > source, target at line 102 > > A puppet client (it''s 0.24.8) is creating the following resource: > @@file { "mlwormbackup_$fqdn": > mode => 644, > owner => root, > group => root, > ensure => $worm_backup_enabled, > path => "/root/ml_backup_hosts/$fqdn", > content => > "HOST=$fqdn\nCLEAR=$my_clear_shortname\nCLIENT=$my_bd_shortname\n", > tag => "mlwormbackup", > } > > Another server (this is a 0.25.4 puppet) has the following in its node > definition: > File <<| tag == "mlwormbackup" |>> > > > All are running against a 0.25.4 puppetmaster. We''re in process of > testing migration of all to 0.25. > > The message makes no sense to me. The resource only has a content > parameter, no source or target. Why is the 0.25 puppet (or the > puppetmaster?) complaining about "more than one" of anything? I''ve > looked for duplicate instances of this resource, emptied the > storeconfigs database completely, and still cannot locate the source of > this message. > > Is there some incompatibility in stored configs between 0.24 and 0.25 > clients? > > Thanks in advance for any advice. > -Alan > > >Actually the problem was the value of "ensure." That was getting set to "true" or "false" (set by a boolean test). Puppet saw "true", and threw that error message (not very helpful, oh well). Fixing it to a conditional "file" or "absent" helped. Thanks Ken for making me think in that direction. -Alan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.