puppet fails to install packages

91 views
Skip to first unread message

Dan

unread,
Oct 13, 2008, 4:01:13 PM10/13/08
to Puppet Users
Hello all,

After banging my head against my desk for a few hours, I'm posting
here (after being told this isn't a bug).

I'm trying to use puppet to install some packages on my fedora
clients, som on my puppet master i created a class with the following
contents:

class fedora-ws {
include atrpms-repo

$packages = ["subversion"]
package { $packages:
ensure => installed
}

}

after including it in the fedora node and running "puppetd --test --
verbose" on the client, i get the following:

# puppetd --verbose --test
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
err: //Node[workstation]/fedora-ws/Package[]/ensure: change from
absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y
install ' returned 1: Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 104, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 339, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self,
self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 173, in doCommand
return base.installPkgs(extcmds)
File "/usr/share/yum-cli/cli.py", line 528, in installPkgs
self.install(pattern=arg)
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 2272,
in install
if kwargs['pattern'][0] == '@':
IndexError: string index out of range

notice: Finished catalog run in 5.33 seconds


Has anyone seen this before?

Peter Meier

unread,
Oct 13, 2008, 6:38:31 PM10/13/08
to puppet...@googlegroups.com
Hi


> class fedora-ws {
> include atrpms-repo
>
> $packages = ["subversion"]
> package { $packages:
> ensure => installed
> }
>
> }

# cat foo.pp


$packages = ["subversion"]
package { $packages:
ensure => installed
}

# puppet foo.pp
#

so this seems to work for me. (centos box with 0.24.5)


as
>err: //Node[workstation]/fedora-ws/Package[]/ensure: change from,

mention the Package you want to manage has no name and reading your
closed bug entry, I'm thinking that there might be another problem:

Did you try to restart once your puppetmaster? Sometimes puppetmaster
keeps begging about a problem while the real problem seems to be
somewhere else. Then a restart can help.

I would suggest you try that.

greets pete

David Lutterkort

unread,
Oct 13, 2008, 8:30:30 PM10/13/08
to puppet...@googlegroups.com
On Mon, 2008-10-13 at 13:01 -0700, Dan wrote:
> After banging my head against my desk for a few hours, I'm posting
> here (after being told this isn't a bug).

What version of puppet is this ?

> I'm trying to use puppet to install some packages on my fedora
> clients, som on my puppet master i created a class with the following
> contents:
>
> class fedora-ws {
> include atrpms-repo
>
> $packages = ["subversion"]
> package { $packages:
> ensure => installed
> }
>
> }
>
> after including it in the fedora node and running "puppetd --test --
> verbose" on the client, i get the following:

The invocation of yum does not pass any package names on the command
line:

> # puppetd --verbose --test
> info: Caching catalog at /var/lib/puppet/localconfig.yaml
> notice: Starting catalog run
> err: //Node[workstation]/fedora-ws/Package[]/ensure: change from
> absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y
> install ' returned 1: Traceback (most recent call last):

The log message already has a suspect 'Package[]' in it instead of
'Package[subversion]' - not sure why that is, though.

David


Dan O'Brien

unread,
Oct 13, 2008, 8:44:46 PM10/13/08
to puppet...@googlegroups.com
On Mon, Oct 13, 2008 at 8:30 PM, David Lutterkort <lut...@redhat.com> wrote:

On Mon, 2008-10-13 at 13:01 -0700, Dan wrote:
> After banging my head against my desk for a few hours,  I'm posting
> here (after being told this isn't a bug).

What version of puppet is this ?
 
# rpm -qa | grep puppet
puppet-0.24.4-1.el5
puppet-server-0.24.4-1.el5
 

> I'm trying to use puppet to install some packages on my fedora
> clients, som on my puppet master i created a class with the following
> contents:
>
> class fedora-ws {
>         include atrpms-repo
>
>        $packages = ["subversion"]
>        package { $packages:
>                 ensure => installed
>         }
>
> }
>
> after including it in the fedora node and running "puppetd --test --
> verbose" on the client, i get the following:

The invocation of yum does not pass any package names on the command
line:

> # puppetd --verbose --test
> info: Caching catalog at /var/lib/puppet/localconfig.yaml
> notice: Starting catalog run
> err: //Node[workstation]/fedora-ws/Package[]/ensure: change from
> absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y
> install ' returned 1: Traceback (most recent call last):

The log message already has a suspect 'Package[]' in it instead of
'Package[subversion]' - not sure why that is, though.

David







--
Regards,
Dan O'Brien

Peter Meier

unread,
Oct 14, 2008, 3:09:23 AM10/14/08
to puppet...@googlegroups.com
Hi

>> What version of puppet is this ?
>>
>
>
>> # rpm -qa | grep puppet
>> puppet-0.24.4-1.el5
>> puppet-server-0.24.4-1.el5


could you then to try run an example manifest, like the one I posted on
your host?
So not to get the compiled manifest from puppetmaster rather applying
the .pp directly on the client.

So something like:

# echo "


$packages = ["subversion"]
package { $packages:
ensure => installed
}

" > test.pp
# puppet test.pp

like that we should be able to exclude any problems which might be
related to your puppetmaster. afair 0.24.4 this had worked fine for me
on this version.

greets pete

Dan

unread,
Oct 16, 2008, 3:28:58 PM10/16/08
to Puppet Users
Sorry, I replied the other day, guess I forgot to hit send (always
helpful).

Anyway, So yes restarting puppet solved the problem, however, I'm
noticing 9 out of ever 10 changes require me to restart for them to
take effect. Surely this cannot be expected behavior can it?

It's working now, and restarting isn't the worst thing in the world,
but it seems that restarting shouldn't be required just for a change
to take effect.

Thoughts?
Reply all
Reply to author
Forward
0 new messages