Hey guys,
I've made a little progress I'd like to report. I was able to get
part of the dbservices manifest to work. But with the manifest written
this way postgresql installs and mysql does not. i am not sure why
that might be the case:
class dbservices {
$pgapps = [ "postgresql84-server","postgresql84" ]
package { $pgapps:
ensure => installed }
class postgres {
package { $pgapps: ensure => installed }
service { postgresql:
name => postgresql,
enable => true,
ensure => running
}
}
class mysql {
$mysqlapps = [ "mysql-server","mysql","php-mysql" ]
package { $mysqlapps: ensure => installed }
service { mysqld:
name => mysqld,
enable => true,
ensure => running
}
}
}
AFAIK it should be ok to include two or more classes in one outer
(wrapper) class in your manifest files.
When this didn't work as hoped I then rewrote the manifest as one big class.
class dbservices {
$pgapps = [ "postgresql84-server","postgresql84" ]
package { $pgapps: ensure => installed }
service { postgresql:
name => postgresql,
enable => true,
ensure => running
}
$mysqlapps = [ "mysql-server","mysql","php-mysql" ]
package { $mysqlapps: ensure => installed }
service { mysqld:
name => mysqld,
enable => true,
ensure => running
}
}
And when I did that I got this error reporting that the services could
not be started:
[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.
My nodes are pretty simple in this test environment:
node 'pclient.acadaca.net' { include dbservices }
node 'mclient.acadaca.net'{ include webservices }
However we hope to roll puppet out to production sometime in the next
couple of weeks assuming we can get these issues ironed out.
thanks in advance!!
On Wed, Feb 23, 2011 at 4:32 PM, Tim Dunphy <[email protected]> wrote:
> hey guys
>
> I have two manifests that I setup to apply to different types of
> machines. one is a webservices class that goes like this
>
> class webservices {
>
> $webapps = [ "php-common","php","httpd" ]
> package { $webapps: ensure => installed }
>
> service { httpd:
> name => httpd,
> enable => true,
> ensure => running,
> hasstatus => true
> }
>
>
>
> }
>
>
>
> The above works.. when I run puppetd --test on the machine acting as
> the webserver these apps are installed
>
> However for the dbservices manifest which looks like this:
>
>
> class dbservices {
>
>
> $pgapps = [ "postgresql84-server","postgresql84" ]
>
> package { $pgapps:
> ensure => installed }
>
> class postgres {
>
> package { $pgapps: ensure => installed }
>
> service { postgresql:
> name => postgresql,
> enable => true,
> ensure => running
> }
>
> }
>
>
> class mysql {
>
> $myapps = [ "mysql-server","mysql" ]
>
> package { $myapps: ensure => installed }
>
> service { mysqld:
> name => mysqld,
> enable => true,
> ensure => running
> }
>
> }
>
> }
>
> Running puppetd --test on the host functioning as the database server
> these apps are not installed.
>
> And I have my nodes setup like this:
>
> node 'pclient.acadaca.net' { include dbservices }
> node 'mclient.acadaca.net'{ include webservices }
>
>
> Can I get some advice on getting this to work?
>
> thanks!!
>
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
--
GPG me!!
gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
[0;37mdebug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not
exist[0m
[0;37mdebug: Puppet::Type::User::ProviderPw: file pw does not exist[0m
[0;37mdebug: Puppet::Type::User::ProviderLdap: true value when expecting
false[0m
[0;37mdebug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl
does not exist[0m
[0;37mdebug: Failed to load library 'ldap' for feature 'ldap'[0m
[0;37mdebug: /File[/var/lib/puppet/ssl/public_keys/pclient.acadaca.net.pem]:
Autorequiring File[/var/lib/puppet/ssl/public_keys][0m
[0;37mdebug: /File[/var/lib/puppet/state/graphs]: Autorequiring
File[/var/lib/puppet/state][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/private_keys/pclient.acadaca.net.pem]:
Autorequiring File[/var/lib/puppet/ssl/private_keys][0m
[0;37mdebug: /File[/var/lib/puppet/clientbucket]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/client_yaml]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/ssl]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/facts]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring
File[/var/lib/puppet/state][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certs/pclient.acadaca.net.pem]:
Autorequiring File[/var/lib/puppet/ssl/certs][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/classes.txt]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/state]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/run/puppet/puppetd.pid]: Autorequiring
File[/var/run/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certs]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/lib]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/private]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring
File[/var/lib/puppet/ssl/certs][0m
[0;37mdebug: /File[/etc/puppet/puppet.conf]: Autorequiring
File[/etc/puppet][0m
[0;37mdebug: Finishing transaction 23456293229180 with 0 changes[0m
[0;37mdebug: /File[/var/lib/puppet/ssl/public_keys/pclient.acadaca.net.pem]:
Autorequiring File[/var/lib/puppet/ssl/public_keys][0m
[0;37mdebug: /File[/var/lib/puppet/state]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/facts]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/private]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring
File[/var/lib/puppet/ssl/certs][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certs]: Autorequiring
File[/var/lib/puppet/ssl][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/private_keys/pclient.acadaca.net.pem]:
Autorequiring File[/var/lib/puppet/ssl/private_keys][0m
[0;37mdebug: /File[/var/lib/puppet/lib]: Autorequiring
File[/var/lib/puppet][0m
[0;37mdebug: /File[/var/lib/puppet/ssl/certs/pclient.acadaca.net.pem]:
Autorequiring File[/var/lib/puppet/ssl/certs][0m
[0;37mdebug: Finishing transaction 23456294133380 with 0 changes[0m
[0;37mdebug: Using cached certificate for ca[0m
[0;37mdebug: Using cached certificate for pclient.acadaca.net[0m
[0;37mdebug: Finishing transaction 23456293461040 with 0 changes[0m
[0;37mdebug: Loaded state in 0.00 seconds[0m
[0;37mdebug: Using cached certificate for ca[0m
[0;37mdebug: Using cached certificate for pclient.acadaca.net[0m
[0;37mdebug: Using cached certificate_revocation_list for ca[0m
[0;37mdebug: catalog supports formats: b64_zlib_yaml marshal pson raw yaml;
using pson[0m
[0;37mdebug: Puppet::Type::Package::ProviderRpm: Executing '/bin/rpm
--version'[0m
[0;37mdebug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm
--version'[0m
[0;37mdebug: Puppet::Type::Package::ProviderAptrpm: Executing '/bin/rpm -ql
rpm'[0m
[0;37mdebug: Puppet::Type::Package::ProviderUrpmi: Executing '/bin/rpm -ql
rpm'[0m
[0;32minfo: Caching catalog for pclient.acadaca.net[0m
[0;37mdebug: Puppet::Type::Group::ProviderPw: file /usr/sbin/pw does not
exist[0m
[0;37mdebug: Puppet::Type::Group::ProviderLdap: true value when expecting
false[0m
[0;37mdebug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl
does not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude
does not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not
exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does
not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderUp2date: file
/usr/sbin/up2date-nox does not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not
exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not
exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does
not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does
not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not
exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not
exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not
exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not
exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info
does not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall
does not exist[0m
[0;37mdebug: Puppet::Type::Package::ProviderPorts: file
/usr/local/sbin/portupgrade does not exist[0m
[0;37mdebug: Creating default schedules[0m
[0;37mdebug: Finishing transaction 23456293421000 with 0 changes[0m
[0;37mdebug: Loaded state in 0.00 seconds[0m
[0;37mdebug: Prefetching yum resources for package[0m
[0;37mdebug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm
--version'[0m
[0;37mdebug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -qa
--nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION}
%{RELEASE} %{ARCH}
''[0m
[0;37mdebug: //File[/etc/sudoers]: Autorequiring Group[root][0m
[0;32minfo: Applying configuration version '1298500800'[0m
[0;37mdebug: //Group[webalizer]: Not tagged with dbservices[0m
[0;37mdebug: //Group[nfsnobody]: Not tagged with dbservices[0m
[0;37mdebug: //Group[distcache]: Not tagged with dbservices[0m
[0;37mdebug: //Group[bin]: Not tagged with dbservices[0m
[0;37mdebug: //Group[named]: Not tagged with dbservices[0m
[0;37mdebug: //Group[ais]: Not tagged with dbservices[0m
[0;37mdebug: //Group[dovecot]: Not tagged with dbservices[0m
[0;37mdebug: //Group[mysql]: Not tagged with dbservices[0m
[0;37mdebug: //Group[summitnjops]: Not tagged with dbservices[0m
[0;37mdebug: //Group[pegasus]: Not tagged with dbservices[0m
[0;37mdebug: //Group[squid]: Not tagged with dbservices[0m
[0;37mdebug: /Schedule[weekly]: Not tagged with dbservices[0m
[0;37mdebug: //Group[haldaemon]: Not tagged with dbservices[0m
[0;37mdebug: //Group[nscd]: Not tagged with dbservices[0m
[0;37mdebug: /Filebucket[puppet]: Not tagged with dbservices[0m
[0;37mdebug: //Group[utempter]: Not tagged with dbservices[0m
[0;37mdebug: //Group[floppy]: Not tagged with dbservices[0m
[0;37mdebug: //Group[root]: Not tagged with dbservices[0m
[0;37mdebug: //File[/etc/sudoers]: Not tagged with dbservices[0m
[0;37mdebug: //Group[ricci]: Not tagged with dbservices[0m
[0;37mdebug: //Group[postfix]: Not tagged with dbservices[0m
[0;37mdebug: //Group[piranha]: Not tagged with dbservices[0m
[0;37mdebug: //Group[dbus]: Not tagged with dbservices[0m
[0;37mdebug: //Group[slocate]: Not tagged with dbservices[0m
[0;37mdebug: /Schedule[daily]: Not tagged with dbservices[0m
[0;37mdebug: //Group[postdrop]: Not tagged with dbservices[0m
[0;37mdebug: //Group[ldapuser]: Not tagged with dbservices[0m
[0;37mdebug: //Group[daemon]: Not tagged with dbservices[0m
[0;37mdebug: //Group[man]: Not tagged with dbservices[0m
[0;37mdebug: //Group[audio]: Not tagged with dbservices[0m
[0;37mdebug: //Group[uucp]: Not tagged with dbservices[0m
[0;37mdebug: //Group[users]: Not tagged with dbservices[0m
[0;37mdebug: //Group[rpc]: Not tagged with dbservices[0m
[0;37mdebug: //Group[apache]: Not tagged with dbservices[0m
[0;37mdebug: //Group[nobody]: Not tagged with dbservices[0m
[0;37mdebug: /Schedule[monthly]: Not tagged with dbservices[0m
[0;37mdebug: //Group[vcsa]: Not tagged with dbservices[0m
[0;37mdebug: //Group[kmem]: Not tagged with dbservices[0m
[0;37mdebug: //Group[lp]: Not tagged with dbservices[0m
[0;37mdebug: //Group[adm]: Not tagged with dbservices[0m
[0;37mdebug: //Group[screen]: Not tagged with dbservices[0m
[0;37mdebug: //Group[mem]: Not tagged with dbservices[0m
[0;37mdebug: //Group[dip]: Not tagged with dbservices[0m
[0;37mdebug: //Group[mailnull]: Not tagged with dbservices[0m
[0;37mdebug: //Group[rpcuser]: Not tagged with dbservices[0m
[0;37mdebug: //Group[utmp]: Not tagged with dbservices[0m
[0;37mdebug: //Group[games]: Not tagged with dbservices[0m
[0;37mdebug: //Group[ntp]: Not tagged with dbservices[0m
[0;37mdebug: //Group[pcap]: Not tagged with dbservices[0m
[0;37mdebug: //Group[news]: Not tagged with dbservices[0m
[0;37mdebug: /Schedule[never]: Not tagged with dbservices[0m
[0;37mdebug: //Group[mail]: Not tagged with dbservices[0m
[0;37mdebug: //Group[sshd]: Not tagged with dbservices[0m
[0;37mdebug: //Filebucket[main]: Not tagged with dbservices[0m
[0;37mdebug: //Group[ecryptfs]: Not tagged with dbservices[0m
[0;37mdebug: //Group[wheel]: Not tagged with dbservices[0m
[0;37mdebug: //Group[gopher]: Not tagged with dbservices[0m
[0;37mdebug: //Group[sys]: Not tagged with dbservices[0m
[0;37mdebug: //Group[smmsp]: Not tagged with dbservices[0m
[0;37mdebug: //Group[avahi-autoipd]: Not tagged with dbservices[0m
[0;37mdebug: //Group[disk]: Not tagged with dbservices[0m
[0;37mdebug: /Schedule[hourly]: Not tagged with dbservices[0m
[0;37mdebug: //Group[avahi]: Not tagged with dbservices[0m
[0;37mdebug: //Group[ftp]: Not tagged with dbservices[0m
[0;37mdebug: //Group[lock]: Not tagged with dbservices[0m
[0;37mdebug: /Schedule[puppet]: Not tagged with dbservices[0m
[0;37mdebug: //Group[puppet]: Not tagged with dbservices[0m
[0;37mdebug: //Group[tty]: Not tagged with dbservices[0m
[0;37mdebug: Finishing transaction 23456293376640 with 0 changes[0m
[0;37mdebug: Storing state[0m
[0;37mdebug: Stored state in 0.02 seconds[0m
[0;36mnotice: Finished catalog run in 0.30 seconds[0m