Issue #5520 has been updated by murray lantz.

i'm having the same problem restoring files from a remote bucket. backing the 
file up is fine:


[r...@squid01 ~]# puppet filebucket backup test1
test1: abb77ef3bd6922b27817bb76e8b47dfd


the file now exists on the puppetmaster:


[r...@nms2 ~]# cat 
/var/lib/puppet/bucket/a/b/b/7/7/e/f/3/abb77ef3bd6922b27817bb76e8b47dfd/contents
 
test1
test1


but restoring the file is failing:


[r...@squid01 ~]# puppet filebucket restore -dv --trace /var/tmp/test1 
abb77ef3bd6922b27817bb76e8b47dfd
debug: Failed to load library 'rubygems' for feature 'rubygems'
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
not exist
debug: Puppet::Type::User::ProviderNetinfo: file nireport does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows 
is missing
debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring 
File[/etc/puppet/ssl/certs]
debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/etc/puppet/ssl/public_keys/squid01.flixster.com.pem]: 
Autorequiring File[/etc/puppet/ssl/public_keys]
debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/namespaceauth.conf]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/etc/puppet/ssl/certs/squid01.flixster.com.pem]: Autorequiring 
File[/etc/puppet/ssl/certs]
debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring 
File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/csr_squid01.flixster.com.pem]: Autorequiring 
File[/etc/puppet/ssl]
ng File[/etc/puppet/ssl/private_keys]
debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
debug: Finishing transaction 23850732460820
debug: file_bucket_file supports formats: b64_zlib_yaml marshal pson raw yaml; 
using pson
/usr/lib/ruby/site_ruby/1.8/puppet/file_bucket/file.rb:129:in 
`validate_checksum!'
/usr/lib/ruby/site_ruby/1.8/puppet/file_bucket/file.rb:58:in `checksum='
/usr/lib/ruby/site_ruby/1.8/puppet/file_bucket/file.rb:94:in `name='
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:72:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:193:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/file_bucket/dipper.rb:50:in `getfile'
/usr/lib/ruby/site_ruby/1.8/puppet/file_bucket/dipper.rb:70:in `restore'
/usr/lib/ruby/site_ruby/1.8/puppet/application/filebucket.rb:46:in `restore'
/usr/lib/ruby/site_ruby/1.8/puppet/application/filebucket.rb:18:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/application/filebucket.rb:18:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:287:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:393:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:287:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:55:in `execute'
/usr/bin/puppet:4 
Could not run: Checksum {md5} does not match contents 
abb77ef3bd6922b27817bb76e8b47dfd


squid01 = client
nms2 = puppetmaster


tcpdump on the puppetmaster shows traffic after the 'restore' is issued. local 
backup/restore is working fine.

centos5
puppet 2.6.4
----------------------------------------
Bug #5520: Filebucket is  not restoring files
https://projects.puppetlabs.com/issues/5520

Author: Marcelo Bartsch
Status: Unreviewed
Priority: Normal
Assignee: 
Category: fileserving
Target version: 
Affected Puppet version: 2.6.4
Keywords: filebucket
Branch: 


Hi
i'm new to puppet , but it seems to be  a bug to me.

scenario:
I had a module called dhcpd-ste, wich put a dhcpd.antennas.conf file into the 
server, when this is changed a backup is done in the local system , but i 
cannot restore the file:

info: FileBucket adding /etc/dhcpd.antennas.conf as 
{md5}3651c7b07ce0841905345de470ae399a
info: 
/Stage[main]/Dhcpd-ste/Dhcpd-ste::Dhcpd-ste::Dhcpd-ste_files[/etc/dhcpd.antennas.conf]/File[/etc/dhcpd.antennas.conf]:
 Filebucketed /etc/dhcpd.antennas.conf to main with sum 
3651c7b07ce0841905345de470ae399a

This is the error message:
[r...@pp-client ~]# puppet filebucket -l  restore /tmp/la2  
3651c7b07ce0841905345de470ae399a
Could not run: File not found

[r...@pp-client ~]# find /var/lib/puppet -name 3651c7b07ce0841905345de470ae399a 
-ls
2540997    4 drwxrwx---   2 root     root         4096 Dec 12 19:53 
/var/lib/puppet/clientbucket/3/6/5/1/c/7/b/0/3651c7b07ce0841905345de470ae399a

also tried with a remote filebucket, almos the same problem:
here the file is filebucketed on the server
info: 
/Stage[main]/Dhcpd-ste/Dhcpd-ste::Dhcpd-ste::Dhcpd-ste_files[/etc/dhcpd.antennas.conf]/File[/etc/dhcpd.antennas.conf]:
 Filebucketed /etc/dhcpd.antennas.conf to main with sum 
2228e977ebea8966e27929f43e39cb67

this is the message on the server
info: FileBucket adding etc/dhcpd.antennas.conf as 
{md5}2228e977ebea8966e27929f43e39cb67

the file IS on the server 
[r...@puppet puppet]# find /var/lib/puppet -name 
2228e977ebea8966e27929f43e39cb67 -ls
3913708    4 drwxrwx---   2 puppet   puppet       4096 Dec 12 20:02 
/var/lib/puppet/bucket/2/2/2/8/e/9/7/7/2228e977ebea8966e27929f43e39cb67

trying to restore it from the server with filebucket gave this:
[r...@pp-client ~]# puppet filebucket restore /tmp/dhcp.antena.conf 
2228e977ebea8966e27929f43e39cb67
Could not run: Checksum {md5} does not match contents 
2228e977ebea8966e27929f43e39cb67

on the server it shows the following:
info: FileBucket read {md5}2228e977ebea8966e27929f43e39cb67

Please let me know if you need anything else.




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

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

Reply via email to