Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Checksum Behavior Change
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Paul Lathrop  
View profile  
 More options Nov 13 2009, 6:29 pm
From: Paul Lathrop <p...@tertiusfamily.net>
Date: Fri, 13 Nov 2009 15:29:02 -0800
Local: Fri, Nov 13 2009 6:29 pm
Subject: Checksum Behavior Change
Hiya,

Since upgrading our puppetmaster to 0.25.1, we've noticed a behavior
change which is causing us some problems, and I'm not sure if it is
expected behavior. We have the following resource definition (inside
of a define):

file {
      "/var/lib/mysql/extdbfiles/$name":
        owner => mysql,
        group => mysql,
        mode => 2660,
        recurse => true,
        ensure => directory,
        backup => false,
        require => File["/var/lib/mysql"];

}

What we're noticing is that our puppet runs are now taking a very long
time and consuming most of the I/O and CPU resources on the machine.
Running puppetd -t under strace reveals that puppet reads the contents
of all the files under this directory (even though we aren't managing
file contents). My immediate thought was that adding checksum => mtime
to the resource definition would solve the problem, but doing so does
not seem to change the behavior.

It smells like a bug to me; intuitively if we aren't managing the file
contents in any way, puppet should not bother calculating checksums of
the contents. Even if that isn't true, specifying checksum => mtime
seems to be the right approach to suppressing calculation of checksums
of the file contents.

For the time being we're working around this by using an exec resource
and chmod, but this is non-ideal. Is this a bug? If so can someone
help me understand this subsection of the puppet internals so I can
contribute a patch?

--Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Markus Roberts  
View profile  
 More options Nov 13 2009, 7:25 pm
From: Markus Roberts <mar...@reductivelabs.com>
Date: Fri, 13 Nov 2009 16:25:35 -0800
Local: Fri, Nov 13 2009 7:25 pm
Subject: Re: [Puppet-dev] Checksum Behavior Change

Paul --

I share your intuition--it smells like a bug to me too.

Specifically, it smells like #2630 (
http://projects.reductivelabs.com/issues/2630) though it may be unrelated.

We deferred that as just an efficiency issue (in that the results are
correct), but it still needs to be addressed.

-- Markus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Lathrop  
View profile  
 More options Nov 13 2009, 7:32 pm
From: Paul Lathrop <paul.lath...@gmail.com>
Date: Fri, 13 Nov 2009 16:32:19 -0800
Local: Fri, Nov 13 2009 7:32 pm
Subject: Re: [Puppet-dev] Re: Checksum Behavior Change
On Fri, Nov 13, 2009 at 4:25 PM, Markus Roberts

<mar...@reductivelabs.com> wrote:
> Paul --

> I share your intuition--it smells like a bug to me too.

> Specifically, it smells like #2630
> (http://projects.reductivelabs.com/issues/2630) though it may be unrelated.

> We deferred that as just an efficiency issue (in that the results are
> correct), but it still needs to be addressed.

Well, the issue may be related, but it isn't the same - I don't think
these files should be getting checksummed *at all* (even once would be
too much). I'll definitely put my vote in for #2630 though.

--Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Kanies  
View profile  
 More options Nov 13 2009, 7:36 pm
From: Luke Kanies <l...@madstop.com>
Date: Fri, 13 Nov 2009 16:36:59 -0800
Local: Fri, Nov 13 2009 7:36 pm
Subject: Re: [Puppet-dev] Checksum Behavior Change
On Nov 13, 2009, at 3:29 PM, Paul Lathrop wrote:

> Hiya,

> Since upgrading our puppetmaster to 0.25.1, we've noticed a behavior
> change which is causing us some problems, and I'm not sure if it is
> expected behavior. We have the following resource definition (inside
> of a define):

> file {
>      "/var/lib/mysql/extdbfiles/$name":
>        owner => mysql,
>        group => mysql,
>        mode => 2660,
>        recurse => true,
>        ensure => directory,
>        backup => false,
>        require => File["/var/lib/mysql"];
> }

> What we're noticing is that our puppet runs are now taking a very long
> time and consuming most of the I/O and CPU resources on the machine.
> Running puppetd -t under strace reveals that puppet reads the contents
> of all the files under this directory (even though we aren't managing
> file contents). My immediate thought was that adding checksum => mtime
> to the resource definition would solve the problem, but doing so does
> not seem to change the behavior.

> It smells like a bug to me; intuitively if we aren't managing the file
> contents in any way, puppet should not bother calculating checksums of
> the contents. Even if that isn't true, specifying checksum => mtime
> seems to be the right approach to suppressing calculation of checksums
> of the file contents.

> For the time being we're working around this by using an exec resource
> and chmod, but this is non-ideal. Is this a bug? If so can someone
> help me understand this subsection of the puppet internals so I can
> contribute a patch?

Hmm.  This definitely constitutes a new bug and I would consider it  
high priority, and it should be an easy fix (sorry to disagree with  
Markus).

Not sure where exactly you should go to look in the internals - if you  
look in the 'content' type in File, you should be able to add some  
debugging there to see where it's getting created.  My guess is that  
recursion process is overzealouslessly adding all parameters to check,  
rather than just those that the parent resource checks, so you could  
also check the 'recurse' method in the file type.

--
Wear the old coat and buy the new book. -- Austin Phelps
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Markus Roberts  
View profile  
 More options Nov 13 2009, 7:57 pm
From: Markus Roberts <mar...@reductivelabs.com>
Date: Fri, 13 Nov 2009 16:57:06 -0800
Local: Fri, Nov 13 2009 7:57 pm
Subject: Re: [Puppet-dev] Re: Checksum Behavior Change

My reasoning for saying they may be related (I'm not saying that it's
correct) was that both could be characterized by "all files being checksumed
one time more than necessary--twice, when it should have been once, and
once, when it should have been never.

Also, I wasn't saying it was low priority just that (if they are in fact the
same) we had not considered this case in deprioritizing it.

Paul, if you want me to help track this down, just let me know.

-- Markus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brice Figureau  
View profile  
 More options Nov 14 2009, 6:50 am
From: Brice Figureau <brice-pup...@daysofwonder.com>
Date: Sat, 14 Nov 2009 12:50:19 +0100
Local: Sat, Nov 14 2009 6:50 am
Subject: Re: [Puppet-dev] Checksum Behavior Change
Hi Paul,

On 14/11/09 00:29, Paul Lathrop wrote:

> Hiya,

> Since upgrading our puppetmaster to 0.25.1, we've noticed a behavior
> change which is causing us some problems, and I'm not sure if it is
> expected behavior. We have the following resource definition (inside
> of a define):

> file {
>        "/var/lib/mysql/extdbfiles/$name":
>          owner =>  mysql,
>          group =>  mysql,
>          mode =>  2660,
>          recurse =>  true,
>          ensure =>  directory,
>          backup =>  false,
>          require =>  File["/var/lib/mysql"];
> }

> What we're noticing is that our puppet runs are now taking a very long
> time and consuming most of the I/O and CPU resources on the machine.
> Running puppetd -t under strace reveals that puppet reads the contents
> of all the files under this directory (even though we aren't managing
> file contents). My immediate thought was that adding checksum =>  mtime
> to the resource definition would solve the problem, but doing so does
> not seem to change the behavior.

In 0.24, I was using checksum => undef to be sure we aren't checksumming
everything.
That was one of the reason I added #1469:
http://projects.reductivelabs.com/issues/1469

And also check #1973:
http://projects.reductivelabs.com/issues/1973

It doesn't look like a new issue to me.

> It smells like a bug to me; intuitively if we aren't managing the file
> contents in any way, puppet should not bother calculating checksums of
> the contents. Even if that isn't true, specifying checksum =>  mtime
> seems to be the right approach to suppressing calculation of checksums
> of the file contents.

Correct. Maybe you have a global default ala:
File { checksum => md5 }

> For the time being we're working around this by using an exec resource
> and chmod, but this is non-ideal. Is this a bug? If so can someone
> help me understand this subsection of the puppet internals so I can
> contribute a patch?

Recursion is managed by spawning new sub-file resources inheriting
parent properties/parameter. Maybe we're generating those with an
invalid checksum property?

I think you should add some debug print in lib/puppet/type/file.rb in
the newchild method.
You can also first reproduce a small testcase with the "puppet", once
done it will be easier to debug/understand.

Hope that helps,
--
Brice Figureau
My Blog: http://www.masterzen.fr/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Kanies  
View profile  
 More options Nov 16 2009, 10:25 am
From: Luke Kanies <l...@madstop.com>
Date: Mon, 16 Nov 2009 09:25:55 -0600
Local: Mon, Nov 16 2009 10:25 am
Subject: Re: [Puppet-dev] Re: Checksum Behavior Change
On Nov 13, 2009, at 6:57 PM, Markus Roberts wrote:

> My reasoning for saying they may be related (I'm not saying that  
> it's correct) was that both could be characterized by "all files  
> being checksumed one time more than necessary--twice, when it should  
> have been once, and once, when it should have been never.

I see.  The flaw with that argument is that there shouldn't even be an  
instance of the 'content' parameter in files that aren't checking  
their content or checksum, while for those files that are, the content  
param should be there.  So it seems to be pretty different.

> Also, I wasn't saying it was low priority just that (if they are in  
> fact the same) we had not considered this case in deprioritizing it.

> Paul, if you want me to help track this down, just let me know.

--
The leader of Jamestown was "John Smith" (not his real name), under
whose direction the colony engaged in a number of activities,
primarily related to starving. -- Dave Barry, "Dave Barry Slept Here"
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »