Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion puppet thinks yum fails when it doesn't
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
 
Luke Kanies  
View profile  
 More options May 25 2008, 1:27 pm
From: Luke Kanies <l...@madstop.com>
Date: Sun, 25 May 2008 12:27:11 -0500
Local: Sun, May 25 2008 1:27 pm
Subject: Re: [Puppet Users] Re: puppet thinks yum fails when it doesn't
On May 24, 2008, at 5:59 PM, Jos Backus wrote:

> On Thu, May 22, 2008 at 10:19:26PM +0000, David Lutterkort wrote:
>> What OS/version are you on ? I assume it's one that uses yum.

> I am seeing this on both CentOS 4.4 and 5.1.

>> I don't
>> understand why it prints the line 'Not suitable: false value' - it  
>> also
>> does that on my Fedora machine _after_ running the yumhelper (which
>> exits with status 0).

>> There's also some confusion in my head (and the code) as to what the
>> @property_hash in a provider refers to. In particular, in the query
>> method in the rpm provider, @property_hash should refer to the
>> properties prefilled by the 'instances' method of the rpm provider;
>> instead these seem to be empty. There's something funky going on  
>> between
>> a provider and its parent .. not sure what though.

> That code confuses me, too. It's a little unclear to me how this is  
> suposed to
> work and what values to expect where. The plan is to dig into this  
> again next
> week, time permitting.

This isn't pertinent to your specific problem, but maybe this  
description will help with understanding the situation and why the  
information you're getting isn't as good as it could be.

Also, note that you can download the 'puppetdoc' executable and run it  
with 'puppetdoc -r providers' to get a full report on what providers  
exist, which ones are functional, and, to the extent Puppet can tell,  
what makes them non-functional.  You can see an example report here:

http://reductivelabs.com/trac/puppet/wiki/ProviderSuitabilityReport

The 'confine' system for determining which providers are functional  
has had two good but restrictive tests available to it:

* exists: Whether a file exits
* facter: Whether a given facter value is within the specified array

You can see that if these tests fail, then we can easily log what's  
wrong.  However, they're not sufficient to test for all cases, so  
there are two other tests:

* true: Whether a value is true
* false: Whether a value is false

This would be used for things like what the ldap providers now do:

confine :false => (Puppet[:ldapuser] == "")

I.e., this ldap provider is only functional if the ldapuser setting  
has been set to something other than its default empty string.

You can see that it would be essentially impossible to usefully log  
what the failure is here, without some additional information.

I recognize the pain of this, and I've just entirely refactored the  
Confine system, pulling it into separate classes and thus making it  
easier to extend.

For instance, I upgraded the facter test so it can now test both facts  
and settings (preferring settings, but there's very little overlap):

   confine :ldapport => "389"

This still doesn't work for my above test, because I need to test a  
negative, but still, it's better.

The next step would be allow for inclusion of a string that describes  
the failure, something like:

confine "Missing X file" => { :true => FileTest.exist?("/my/file") }

I don't really know what the right interface is.

If someone's willing to go through the existing confines and play with  
some ways of specifying all of them so that they can be logged better,  
it should be easy to provide this better interface.

--
Love is the triumph of imagination over intelligence.
     -- H. L. Mencken
---------------------------------------------------------------------
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.