[Puppet Users] filebucket issue

101 views
Skip to first unread message

Abhishek

unread,
May 17, 2010, 9:18:43 AM5/17/10
to Puppet Users
Hi,

I am using puppet to deploy config files but i am facing issue while
implementing filebucket for backup. Issue is i am defining central
file bucket but still files are getting stored in local file client
bucket.

site.pp ( content)

include node.pp

filebucket { main: server => 'nmlimage01.edc.mihi.com' }

File { backup => main }


class test {
file { "/etc/resolv.conf":
source => "puppet:///globalconfig/resolv.conf",
backup => main
}
}



node.pp (content)

node pp01 {


include test

}


Client Log:




info: Caching catalog for nmlgamepp01.edc.mihi.com
debug: Creating default schedules
debug: Finishing transaction 23456272463300 with 0 changes
debug: Loaded state in 0.01 seconds
info: Applying configuration version '1274102055'
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw
yaml; using pson
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw
yaml; using pson
debug: //test/File[/etc/resolv.conf]: Changing checksum,content
debug: //test/File[/etc/resolv.conf]: 2 change(s)
debug: //test/File[/etc/resolv.conf]/checksum: Replacing /etc/
resolv.conf checksum {md5}958836dd057fdbb33597d688cc6d28a2 with {md5}
d7fbc1695489ce896d30b7b04d72887c
notice: //test/File[/etc/resolv.conf]/checksum: checksum changed '{md5}
958836dd057fdbb33597d688cc6d28a2' to '{md5}
d7fbc1695489ce896d30b7b04d72887c'
info: Filebucket[/var/lib/puppet/clientbucket]: Adding /etc/
resolv.conf(d7fbc1695489ce896d30b7b04d72887c)
info: //test/File[/etc/resolv.conf]: Filebucketed /etc/resolv.conf to
main with sum d7fbc1695489ce896d30b7b04d72887c
debug: //test/File[/etc/resolv.conf]/checksum: Replacing /etc/
resolv.conf checksum {md5}d7fbc1695489ce896d30b7b04d72887c with {md5}
958836dd057fdbb33597d688cc6d28a2
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw
yaml; using pson
notice: //test/File[/etc/resolv.conf]/content: content changed '{md5}
d7fbc1695489ce896d30b7b04d72887c' to '{md5}
958836dd057fdbb33597d688cc6d28a2'
debug: Finishing transaction 23456272349400 with 2 changes
debug: Storing state
debug: Stored state in 0.11 seconds
notice: Finished catalog run in 1.95 seconds
notice: Caught INT; calling stop

--
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,
May 18, 2010, 4:47:45 PM5/18/10
to Puppet Users
Odd one - I am getting the same problem in 0.25.4.

Looking at:

/usr/lib/ruby/site_ruby/1.8/puppet/type/filebucket.rb

It seems the logic is 'if path is set for filebucket - use local
bucket, else use remote'.

Problem is - the type 'path' is defaulted to use 'clientbucket' setup.
Clientbucket (in defaults.rb) has a default as well. Which means the
code will always use the local client bucket.

I'm guessing this is a bug.

Try commenting out the line:

defaultto { Puppet[:clientbucketdir] }

From type/filebucket.rb

This is not the proper way to fix it. Just try it out and see if it
solves it for you.

ken.

Ken Barber

unread,
May 21, 2010, 6:33:03 AM5/21/10
to Puppet Users
Abhishek,

Our resident Victorian has checked to make sure I'm not being silly:

http://projects.puppetlabs.com/issues/3807

So yes - it seems at this point to be a genuine bug. I think my
workaround is okay for now - but somewhat cludgy and hard-coded (so
not acceptable as a patch). I'd suggest voting for it, and watching
for progress.

Well spotted mate :-).

ken.

On May 18, 9:47 pm, Ken <k...@bob.sh> wrote:
> Odd one - I am getting the same problem in 0.25.4.
>
> Looking at:
>
> /usr/lib/ruby/site_ruby/1.8/puppet/type/filebucket.rb
>
> It seems the logic is 'if path is set forfilebucket- use local
> bucket, else use remote'.
>
> Problem is - the type 'path' is defaulted to use 'clientbucket' setup.
> Clientbucket (in defaults.rb) has a default as well. Which means the
> code will always use the local client bucket.
>
> I'm guessing this is a bug.
>
> Try commenting out the line:
>
> defaultto { Puppet[:clientbucketdir] }
>
> From type/filebucket.rb
>
> This is not the proper way to fix it. Just try it out and see if it
> solves it for you.
>
> ken.
>
> On May 17, 2:18 pm, Abhishek <abhishek.r...@gmail.com> wrote:
>
>
>
>
>
> > Hi,
>
> > I am using puppet to deploy config files but i am facing issue while
> > implementingfilebucketfor backup. Issue is i am defining central
Reply all
Reply to author
Forward
0 new messages