Export resource issue - "more than one of content, source, target"

1,071 views
Skip to first unread message

Alan Sparks

unread,
Apr 6, 2010, 12:10:22 AM4/6/10
to puppet...@googlegroups.com

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


Ohad Levy

unread,
Apr 6, 2010, 12:46:50 AM4/6/10
to puppet...@googlegroups.com
what happens if you use source => undef ?

Ohad



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Ken

unread,
Apr 6, 2010, 3:07:30 AM4/6/10
to Puppet Users
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.

Alan Sparks

unread,
Apr 6, 2010, 9:24:31 PM4/6/10
to puppet...@googlegroups.com

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


Reply all
Reply to author
Forward
0 new messages