Haitao Jiang
2011-Jul-12 15:41 UTC
[Puppet Users] Possible bug? Can''t remove and then put back a file?
This happens to Puppet 2.7.1 (both master and client). I have a file resource that I set to ensure => absent, Puppet removed it correctly with info line that it has a duplicate entry in the filebucket. I then changed the ensure => present, the agent run gave me following error: /usr/bin/puppet:19 err: /Stage[main]/Emb/File[/opt/jetty-distribution-7.4.2.v20110526.tar.gz]/ensure: change from absent to file failed: Could not rename temporary file /opt/jetty-distribution-7.4.2.v20110526.tar.gz.puppettmp_7809 to /opt/jetty-distribution-7.4.2.v20110526.tar.gz: File written to disk did not match checksum; discarding changes ({md5lite}3dc95fb231fdabbe161d8773e2a10457 vs {md5lite}a3f7372d40abae273d2680b650ca4715) at /etc/puppet/modules/emb/manifests/init.pp:38 at /etc/puppet/modules/emb/manifests/init.pp:38 I have file { "/opt/jetty-distribution-7.4.2.v20110526.tar.gz": ensure => present, checksum => md5lite, source => "puppet:///emb/jetty-distribution-7.4.2.v20110526.tar.gz", } Is this a bug? Thanks Haitao -- 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.
Jacob Helwig
2011-Jul-12 16:53 UTC
Re: [Puppet Users] Possible bug? Can''t remove and then put back a file?
On Tue, 12 Jul 2011 08:41:24 -0700, Haitao Jiang wrote:> > This happens to Puppet 2.7.1 (both master and client). I have a file > resource that I set to ensure => absent, Puppet removed it correctly > with info line that it has a duplicate entry in the filebucket. I then > changed the ensure => present, the agent run gave me following error: > > /usr/bin/puppet:19 > err: /Stage[main]/Emb/File[/opt/jetty-distribution-7.4.2.v20110526.tar.gz]/ensure: > change from absent to file failed: Could not rename temporary file > /opt/jetty-distribution-7.4.2.v20110526.tar.gz.puppettmp_7809 to > /opt/jetty-distribution-7.4.2.v20110526.tar.gz: File written to disk > did not match checksum; discarding changes > ({md5lite}3dc95fb231fdabbe161d8773e2a10457 vs > {md5lite}a3f7372d40abae273d2680b650ca4715) at > /etc/puppet/modules/emb/manifests/init.pp:38 at > /etc/puppet/modules/emb/manifests/init.pp:38 > > I have > > file { "/opt/jetty-distribution-7.4.2.v20110526.tar.gz": > ensure => present, > checksum => md5lite, > source => "puppet:///emb/jetty-distribution-7.4.2.v20110526.tar.gz", > } > > Is this a bug? > > Thanks > > Haitao >There certainly shouldn''t be any problem with going from ensuring absent to ensuring present. Not sure if it''s a bug though, since that kind of behavior could also be caused by problems with the filesystem on the agent. If you have direct access to the jetty-distribution-7.4.2.v20110526.tar.gz from your emb module, could you run the following ruby script to get what its md5lite checksum is? #!/usr/bin/env ruby require ''digest/md5'' path_to_jetty_distribution = ''jetty-distribution-7.4.2.v20110526.tar.gz'' puts Digest::MD5.hexdigest(File.read(path_to_jetty_distribution)[0..511]) -- Jacob Helwig
Haitao Jiang
2011-Jul-12 18:04 UTC
Re: [Puppet Users] Possible bug? Can''t remove and then put back a file?
Jacob Thanks. I did that, the checksum is a3f7372d40abae273d2680b650ca4715. This is the second checksum in the error, what did 1st checksum came from? The file itself never changed during my tests. What is the next step? Thanks Haitao On Tue, Jul 12, 2011 at 9:53 AM, Jacob Helwig <jacob@puppetlabs.com> wrote:> On Tue, 12 Jul 2011 08:41:24 -0700, Haitao Jiang wrote: >> >> This happens to Puppet 2.7.1 (both master and client). I have a file >> resource that I set to ensure => absent, Puppet removed it correctly >> with info line that it has a duplicate entry in the filebucket. I then >> changed the ensure => present, the agent run gave me following error: >> >> /usr/bin/puppet:19 >> err: /Stage[main]/Emb/File[/opt/jetty-distribution-7.4.2.v20110526.tar.gz]/ensure: >> change from absent to file failed: Could not rename temporary file >> /opt/jetty-distribution-7.4.2.v20110526.tar.gz.puppettmp_7809 to >> /opt/jetty-distribution-7.4.2.v20110526.tar.gz: File written to disk >> did not match checksum; discarding changes >> ({md5lite}3dc95fb231fdabbe161d8773e2a10457 vs >> {md5lite}a3f7372d40abae273d2680b650ca4715) at >> /etc/puppet/modules/emb/manifests/init.pp:38 at >> /etc/puppet/modules/emb/manifests/init.pp:38 >> >> I have >> >> file { "/opt/jetty-distribution-7.4.2.v20110526.tar.gz": >> ensure => present, >> checksum => md5lite, >> source => "puppet:///emb/jetty-distribution-7.4.2.v20110526.tar.gz", >> } >> >> Is this a bug? >> >> Thanks >> >> Haitao >> > > There certainly shouldn''t be any problem with going from ensuring absent > to ensuring present. Not sure if it''s a bug though, since that kind of > behavior could also be caused by problems with the filesystem on the > agent. > > If you have direct access to the > jetty-distribution-7.4.2.v20110526.tar.gz from your emb module, could > you run the following ruby script to get what its md5lite checksum is? > > #!/usr/bin/env ruby > > require ''digest/md5'' > > path_to_jetty_distribution = ''jetty-distribution-7.4.2.v20110526.tar.gz'' > > puts Digest::MD5.hexdigest(File.read(path_to_jetty_distribution)[0..511]) > > -- > Jacob Helwig > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iQGcBAEBAgAGBQJOHHwlAAoJEHJabXWGiqEBZqAMALH6/sBAGSJ5zOThN4fvDMKB > pbpHbb3sfA9796DKp+WndQxbM9oLi9RlB0fA3cOEmL4G7g+7W1QY+2q47fw19cTo > cfS3TbibB6PsVlLFSjLJz5nxkq/Rw1TUosPKZdgEr+E0A5Z65Y+vIy3TeJTd2bl9 > tFXaNLQtgd5CrAdphwrA9VzGY86rthvUqhK8O7SaKoH81JiZL5ooJ7mXh96Ih52n > u6k6vue2g2s72PRtLxLMWQB0hC1I/j/JWr1TLzBQ+noJ5V+OG4P0BSRv+Azk43GI > pnlA0UjteMH80KVfQTcehdjrWutty9/uvvuFLEeP1o/7scE2llovwvGj55aAZSAr > d91N8U3mpguv3sWoH3QDdW52NE630zygU2mRgzjt20JA2qteDvKyvmvgt4rtA1TD > VGmesHOd8fo2Tfan8vzrQwd44KSdzw1797Snb9yxZ+Z5aGm7YeW5n884oF3s7Z7/ > Aie5mPf8Qk0/vubfoSIoT9D9s8g9165CxnON+pE/dQ=> =Fp0N > -----END PGP SIGNATURE----- > >-- 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.
Jacob Helwig
2011-Jul-12 18:55 UTC
Re: [Puppet Users] Possible bug? Can''t remove and then put back a file?
Well, it turns out that it''s definitely a puppet bug. The streaming checksumming that''s used doesn''t actually only look at the first 512 characters like the static checksumming that''s used for verifying the file on disk does. http://projects.puppetlabs.com/issues/8385 -- Jacob Helwig On Tue, 12 Jul 2011 11:04:09 -0700, Haitao Jiang wrote:> > Jacob > > Thanks. I did that, the checksum is a3f7372d40abae273d2680b650ca4715. > This is the second checksum in the error, what did 1st checksum came > from? The file itself never changed during my tests. > > What is the next step? > > Thanks > > Haitao > > On Tue, Jul 12, 2011 at 9:53 AM, Jacob Helwig <jacob@puppetlabs.com> wrote: > > On Tue, 12 Jul 2011 08:41:24 -0700, Haitao Jiang wrote: > >> > >> This happens to Puppet 2.7.1 (both master and client). I have a file > >> resource that I set to ensure => absent, Puppet removed it correctly > >> with info line that it has a duplicate entry in the filebucket. I then > >> changed the ensure => present, the agent run gave me following error: > >> > >> /usr/bin/puppet:19 > >> err: /Stage[main]/Emb/File[/opt/jetty-distribution-7.4.2.v20110526.tar.gz]/ensure: > >> change from absent to file failed: Could not rename temporary file > >> /opt/jetty-distribution-7.4.2.v20110526.tar.gz.puppettmp_7809 to > >> /opt/jetty-distribution-7.4.2.v20110526.tar.gz: File written to disk > >> did not match checksum; discarding changes > >> ({md5lite}3dc95fb231fdabbe161d8773e2a10457 vs > >> {md5lite}a3f7372d40abae273d2680b650ca4715) at > >> /etc/puppet/modules/emb/manifests/init.pp:38 at > >> /etc/puppet/modules/emb/manifests/init.pp:38 > >> > >> I have > >> > >> file { "/opt/jetty-distribution-7.4.2.v20110526.tar.gz": > >> ensure => present, > >> checksum => md5lite, > >> source => "puppet:///emb/jetty-distribution-7.4.2.v20110526.tar.gz", > >> } > >> > >> Is this a bug? > >> > >> Thanks > >> > >> Haitao > >> > > > > There certainly shouldn''t be any problem with going from ensuring absent > > to ensuring present. Not sure if it''s a bug though, since that kind of > > behavior could also be caused by problems with the filesystem on the > > agent. > > > > If you have direct access to the > > jetty-distribution-7.4.2.v20110526.tar.gz from your emb module, could > > you run the following ruby script to get what its md5lite checksum is? > > > > #!/usr/bin/env ruby > > > > require ''digest/md5'' > > > > path_to_jetty_distribution = ''jetty-distribution-7.4.2.v20110526.tar.gz'' > > > > puts Digest::MD5.hexdigest(File.read(path_to_jetty_distribution)[0..511]) > > > > -- > > Jacob Helwig > > > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.10 (GNU/Linux) > > > > iQGcBAEBAgAGBQJOHHwlAAoJEHJabXWGiqEBZqAMALH6/sBAGSJ5zOThN4fvDMKB > > pbpHbb3sfA9796DKp+WndQxbM9oLi9RlB0fA3cOEmL4G7g+7W1QY+2q47fw19cTo > > cfS3TbibB6PsVlLFSjLJz5nxkq/Rw1TUosPKZdgEr+E0A5Z65Y+vIy3TeJTd2bl9 > > tFXaNLQtgd5CrAdphwrA9VzGY86rthvUqhK8O7SaKoH81JiZL5ooJ7mXh96Ih52n > > u6k6vue2g2s72PRtLxLMWQB0hC1I/j/JWr1TLzBQ+noJ5V+OG4P0BSRv+Azk43GI > > pnlA0UjteMH80KVfQTcehdjrWutty9/uvvuFLEeP1o/7scE2llovwvGj55aAZSAr > > d91N8U3mpguv3sWoH3QDdW52NE630zygU2mRgzjt20JA2qteDvKyvmvgt4rtA1TD > > VGmesHOd8fo2Tfan8vzrQwd44KSdzw1797Snb9yxZ+Z5aGm7YeW5n884oF3s7Z7/ > > Aie5mPf8Qk0/vubfoSIoT9D9s8g9165CxnON+pE/dQ=> > =Fp0N > > -----END PGP SIGNATURE----- > > > >
Haitao Jiang
2011-Jul-12 19:04 UTC
Re: [Puppet Users] Possible bug? Can''t remove and then put back a file?
Jacob Thanks for confirming that. There might be another related bug: when I changed the ensure => mtime, it still failed: /usr/bin/puppet:19:in `load'' /usr/bin/puppet:19 err: /Stage[main]/Emb/File[/opt/jetty-distribution-7.4.2.v20110526.tar.gz]/ensure: change from absent to file failed: Could not rename temporary file /opt/jetty-distribution-7.4.2.v20110526.tar.gz.puppettmp_5512 to /opt/jetty-distribution-7.4.2.v20110526.tar.gz: File written to disk did not match checksum; discarding changes ({mtime} vs {mtime}Tue Jul 12 12:00:32 -0700 2011) at /etc/puppet/modules/emb/manifests/init.pp:38 at /etc/puppet/modules/emb/manifests/init.pp:38 notice: /Stage[main]/Emb/Exec[tar xzf jetty-distribution-7.4.2.v20110526.tar.gz]: Dependency File[/opt/jetty-distribution-7.4.2.v20110526.tar.gz] has failures: true Seems that there is a problem with mtime too. Thanks Haitao On Tue, Jul 12, 2011 at 11:55 AM, Jacob Helwig <jacob@puppetlabs.com> wrote:> Well, it turns out that it''s definitely a puppet bug. > > The streaming checksumming that''s used doesn''t actually only look at the > first 512 characters like the static checksumming that''s used for > verifying the file on disk does. > > http://projects.puppetlabs.com/issues/8385 > > -- > Jacob Helwig > > On Tue, 12 Jul 2011 11:04:09 -0700, Haitao Jiang wrote: >> >> Jacob >> >> Thanks. I did that, the checksum is a3f7372d40abae273d2680b650ca4715. >> This is the second checksum in the error, what did 1st checksum came >> from? The file itself never changed during my tests. >> >> What is the next step? >> >> Thanks >> >> Haitao >> >> On Tue, Jul 12, 2011 at 9:53 AM, Jacob Helwig <jacob@puppetlabs.com> wrote: >> > On Tue, 12 Jul 2011 08:41:24 -0700, Haitao Jiang wrote: >> >> >> >> This happens to Puppet 2.7.1 (both master and client). I have a file >> >> resource that I set to ensure => absent, Puppet removed it correctly >> >> with info line that it has a duplicate entry in the filebucket. I then >> >> changed the ensure => present, the agent run gave me following error: >> >> >> >> /usr/bin/puppet:19 >> >> err: /Stage[main]/Emb/File[/opt/jetty-distribution-7.4.2.v20110526.tar.gz]/ensure: >> >> change from absent to file failed: Could not rename temporary file >> >> /opt/jetty-distribution-7.4.2.v20110526.tar.gz.puppettmp_7809 to >> >> /opt/jetty-distribution-7.4.2.v20110526.tar.gz: File written to disk >> >> did not match checksum; discarding changes >> >> ({md5lite}3dc95fb231fdabbe161d8773e2a10457 vs >> >> {md5lite}a3f7372d40abae273d2680b650ca4715) at >> >> /etc/puppet/modules/emb/manifests/init.pp:38 at >> >> /etc/puppet/modules/emb/manifests/init.pp:38 >> >> >> >> I have >> >> >> >> file { "/opt/jetty-distribution-7.4.2.v20110526.tar.gz": >> >> ensure => present, >> >> checksum => md5lite, >> >> source => "puppet:///emb/jetty-distribution-7.4.2.v20110526.tar.gz", >> >> } >> >> >> >> Is this a bug? >> >> >> >> Thanks >> >> >> >> Haitao >> >> >> > >> > There certainly shouldn''t be any problem with going from ensuring absent >> > to ensuring present. Not sure if it''s a bug though, since that kind of >> > behavior could also be caused by problems with the filesystem on the >> > agent. >> > >> > If you have direct access to the >> > jetty-distribution-7.4.2.v20110526.tar.gz from your emb module, could >> > you run the following ruby script to get what its md5lite checksum is? >> > >> > #!/usr/bin/env ruby >> > >> > require ''digest/md5'' >> > >> > path_to_jetty_distribution = ''jetty-distribution-7.4.2.v20110526.tar.gz'' >> > >> > puts Digest::MD5.hexdigest(File.read(path_to_jetty_distribution)[0..511]) >> > >> > -- >> > Jacob Helwig >> > >> > -----BEGIN PGP SIGNATURE----- >> > Version: GnuPG v1.4.10 (GNU/Linux) >> > >> > iQGcBAEBAgAGBQJOHHwlAAoJEHJabXWGiqEBZqAMALH6/sBAGSJ5zOThN4fvDMKB >> > pbpHbb3sfA9796DKp+WndQxbM9oLi9RlB0fA3cOEmL4G7g+7W1QY+2q47fw19cTo >> > cfS3TbibB6PsVlLFSjLJz5nxkq/Rw1TUosPKZdgEr+E0A5Z65Y+vIy3TeJTd2bl9 >> > tFXaNLQtgd5CrAdphwrA9VzGY86rthvUqhK8O7SaKoH81JiZL5ooJ7mXh96Ih52n >> > u6k6vue2g2s72PRtLxLMWQB0hC1I/j/JWr1TLzBQ+noJ5V+OG4P0BSRv+Azk43GI >> > pnlA0UjteMH80KVfQTcehdjrWutty9/uvvuFLEeP1o/7scE2llovwvGj55aAZSAr >> > d91N8U3mpguv3sWoH3QDdW52NE630zygU2mRgzjt20JA2qteDvKyvmvgt4rtA1TD >> > VGmesHOd8fo2Tfan8vzrQwd44KSdzw1797Snb9yxZ+Z5aGm7YeW5n884oF3s7Z7/ >> > Aie5mPf8Qk0/vubfoSIoT9D9s8g9165CxnON+pE/dQ=>> > =Fp0N >> > -----END PGP SIGNATURE----- >> > >> > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iQGcBAEBAgAGBQJOHJiZAAoJEHJabXWGiqEB5dsL/0seZf7J7JTGBlHIkE5yoM2Z > TXpYaGThBS41EiujrBPZZbzmJfLhN/HX1lSN+ccyZYt673VudxX+HU6z4bdNDcaI > un81M2kZJSvoPZfsywwSIBQo0fwcdTQZcmMdphYnA+sO8qDbxQYUipati6h6AE3N > X8nJYh0WPXItAt5TPeuUtn9X01XjYGLhhP00By7zYVYSZjabWkc+YDR0IJpyJN6B > cMM/o72nahmVbziFcwv6D0987YtzIXav+t79/fjBKdyKMFBeCMU9ANzbFdCZrLHo > qoSI5CYmbMe4SJAXV/IprGptpuP0rte4AKr9Uw9XrBGwxPc+n+pWX91AqepSiHJ3 > kYCzVhVdhGQQ2bRQebiAli6wvMsYsHw2Ozg1AkFpZzBLPb1h+ASV45szRoAXRn2P > uM7WM6uboOjqH8mav7rvuyz0Pa8sksldBFJKx0r+XVDT5PkMkvhNNyPogvQlI9+S > x935ipRerM8cuPhFbosuAhT5K1mENkmf46EkFvjLug=> =NICV > -----END PGP SIGNATURE----- > >-- 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.
Reasonably Related Threads
- [Patch] Add NMI Injection and Pending Support in VMX
- mtime/md5lite with puppet 3.x bug Bug #13199
- [PATCH] Dom0-kernel: Fix buggy mask_base in saving/restoring MSI-X table during S3
- [PATCH] Add MSI-X support to HVM domain
- [PATCH] Enable Core 2 Duo Performance Counters in HVM guest