On Feb 23, 11:58 pm, Tim Dunphy <bluethu...@gmail.com> wrote:
> Hey guys,
<...snip...>
>
> [root@pclient ~]# puppetd --test
> info: Caching catalog for pclient.acadaca.net
> info: Applying configuration version '1298504233'
> err: //dbservices/Service[mysqld]/ensure: change from stopped to
> running failed: Could not start Service[mysqld]: Execution of
> '/sbin/service mysqld start' returned 1:  at
> /etc/puppet/manifests/classes/dbservices.pp:28
> err: //dbservices/Service[postgresql]/ensure: change from stopped to
> running failed: Could not start Service[postgresql]: Execution of
> '/sbin/service postgresql start' returned 1:  at
> /etc/puppet/manifests/classes/dbservices.pp:13
> notice: Finished catalog run in 6.76 seconds
>
> Now, what has me really curious at this point are these two things
> I've mentioned. Why would it be that I can only have one or the other
> of the postgres or mysql classes function the way the first manifest
> is written? Also why if I take everything and put it into one big
> class the way I did in the second manifest will the services not
> start? Someone in IRC speculated that the services can't start because
> the apps are not present when puppet attempts to start them. I'm
> having some trouble seeing why that would be the case the way these
> are written.
>

The logs states that "'/sbin/service mysqld start' returned 1" it
looks like the mysqld package has not been installed.

AFAIK, and please correct me if I am wrong, puppet will execute your
code in a random way.
This is why you need to force its logic by doing something like:

package { $pgapps: ensure  => installed }
       service { postgresql:
                 name  => postgresql,
                 enable => true,
                ensure => running,
                require => Package["$pgapps"]
    }

This way you will make sure to have the package installed before
running the service.
You may need to do some fiddling with the "" as I am not too sure if
you need to put them or not but the idea is there anyway...

Documentation about this: http://docs.puppetlabs.com/guides/language_guide.html
And on the same page, look for: "Chaining resources"

HTH
Gael

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to