Hi, I have this small problem with my servers managed by Puppet (i have a workaround so the problem is not so important): 1) These servers are installed with Red Hat Linux Enterprise and i use Puppet in client-server mode. 2) I''ve made a Puppet class called "yum" to install (by the RPM package provider) and configure YUM on my servers. I don''t use the YUM package provider in that class. 3) Other packages are installed using the YUM package provider. 4) When installing a new server i first launch Puppet with "--tag yum" so that YUM is the first thing installed on the new server. With the last version of Puppet it seems that there is a check to see if the yum binary is present on the server (it was not the case with an older version of Puppet i used before). This check is even made when i use the yum tag. So my question is to known if is a "normal" behaviour. I don''t understand why Puppet checks the whole server configuration (and so the avaibility of the yum binary on my server) if i use a tag to only apply a small portion of that configuration. I hope someone can understand my bad english ;-)
On Wed, 2007-01-24 at 16:45 +0100, Sébastien Prud''homme wrote:> 1) These servers are installed with Red Hat Linux Enterprise and i use > Puppet in client-server mode.Is this RHEL4 ?> 2) I''ve made a Puppet class called "yum" to install (by the RPM > package provider) and configure YUM on my servers. I don''t use the YUM > package provider in that class.Does that mean your manifest contains something like package { yum: source => ..., provider => rpm } What exactly is the failure you are getting ?> 3) Other packages are installed using the YUM package provider. > 4) When installing a new server i first launch Puppet with "--tag yum" > so that YUM is the first thing installed on the new server.How do you install the servers ? If you use kickstart, you could just install yum (either by putting it in %packages, or if that doesn''t work in a separate %post script)> With the last version of Puppet it seems that there is a check to see > if the yum binary is present on the server (it was not the case with > an older version of Puppet i used before). This check is even made > when i use the yum tag.The check is there to find out if yum can be used as a provider; what problem does it cause exactly ? That check should only make it select a different provider (up2date, rpm) for package resources that don''t have an explicit provider. David
On Jan 24, 2007, at 11:15 AM, David Lutterkort wrote:> The check is there to find out if yum can be used as a provider; what > problem does it cause exactly ? That check should only make it > select a > different provider (up2date, rpm) for package resources that don''t > have > an explicit provider.I just looked at the code, and none of the suitability tests are cached, so the yum provider will be considered unsuitable until it''s installed, but the next run it should work fine. This does bring up a flaw I hadn''t thought of before. Provider suitability is checked at config time, which means that it''s somewhat difficult to use Puppet to install the software necessary to make a provider work. Hmm. -- The one thing more difficult than following a regimen is not imposing it on others. -- Marcel Proust --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
I answer both David and Luke :-) Yes i use RHEL4 and installing yum with a kickstart file is the solution i use to solve the problem. Here is, i hope, a better explanation: - by default i install my packages with yum - i use "require" when installing my config files (for exemple httpd.conf requires the httpd package) - yum is installed by using the rpm provider In fact the problem comes from the "require" declarations. When i launch puppet manually (even with my yum tag), here is the log i get: *** CUT ********************************************************************************** info: Caching configuration at /var/lib/puppet/localconfig.yaml err: Could not create ntp: Provider ''yum'' is not functional on this platform err: Provider ''yum'' is not functional on this platform ... err: Could not create httpd: Provider ''yum'' is not functional on this platform err: Provider ''yum'' is not functional on this platform notice: Starting configuration run err: Could not apply complete configuration: Could not retrieve dependency ''Package[httpd]'' at /etc/puppet/manifests/apache.pp:11 info: Sent transaction report in 0.30 seconds notice: Finished configuration run in 0.85 seconds *** CUT ********************************************************************************** So i guess that because yum is not installed, all my packages installed by yum are not valid and all the dependancies that use these packages are not valid and finally Puppet do nothing. I understand that if i want to run the whole configuration, Puppet is not happy with that as yum is not installed. But if i use the tag which reference the class i use to install yum on the server, i think Puppet should only check the declaration defined in that class (but perhaps it is not so easy that it seems to do this in Puppet code). 2007/1/24, Luke Kanies <luke@madstop.com>:> On Jan 24, 2007, at 11:15 AM, David Lutterkort wrote: > > The check is there to find out if yum can be used as a provider; what > > problem does it cause exactly ? That check should only make it > > select a > > different provider (up2date, rpm) for package resources that don''t > > have > > an explicit provider. > > I just looked at the code, and none of the suitability tests are > cached, so the yum provider will be considered unsuitable until it''s > installed, but the next run it should work fine. > > This does bring up a flaw I hadn''t thought of before. Provider > suitability is checked at config time, which means that it''s somewhat > difficult to use Puppet to install the software necessary to make a > provider work. Hmm. > > -- > The one thing more difficult than following a regimen is not > imposing it > on others. -- Marcel Proust > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
On Jan 25, 2007, at 8:14 AM, Sébastien Prud''homme wrote:> > So i guess that because yum is not installed, all my packages > installed by yum are not valid and all the dependancies that use these > packages are not valid and finally Puppet do nothing. > > I understand that if i want to run the whole configuration, Puppet is > not happy with that as yum is not installed. But if i use the tag > which reference the class i use to install yum on the server, i think > Puppet should only check the declaration defined in that class (but > perhaps it is not so easy that it seems to do this in Puppet code).It sounds like provider suitability tests should be done during the transaction, then, rather than during object creation. This just gets more difficult and dynamic as time goes on, never less. :/ -- At my lemonade stand I used to give the first glass away free and charge five dollars for the second glass. The refill contained the antidote. -- Emo Phillips --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com