[Puppet Users] struggling with precedence/declarative language
I think that the heat must be affecting me because this seems so simple but it's eluded me for too long now. What I am trying to do is create a symlink from one directory to another AFTER the package is installed. The error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter mode at /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet Which I gather means that it can't create the symbolic link to a directory that doesn't exist yet but it could be my syntax and I have checked/rechecked/simplified but still... class firebird::install { package { firebird2.1-classic: name = firebird2.1-classic, ensure = installed, #require = Class[firebird::configure], notify = Class[firebird::service, firebird::configure], } package { firebird2.1-dev: name = firebird2.1-dev, ensure = installed, } } class firebird::service { service { firebird2.1-classic: ensure = running, hasstatus = true, hasrestart = true, enable = true, } exec { Create symlink for /var/fbdata: path= /usr/local/bin:/usr/local/sbin:/bin:/usr/bin, environment = HOME=/root, user= root, group = root, mode= 755, command = /bin/ln -s /var/lib/firebird/2.1/data /var/fbdata, refresh = false, #unless = /bin/ls -l /var/fbdata, logoutput = on_failure, } } -- Craig White ~~ craig.wh...@ttiltd.com 1.800.869.6908 ~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- 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.
Re: [Puppet Users] struggling with precedence/declarative language
On Tue, 28 Jun 2011 20:01:20 +0200, Craig White craig.wh...@ttiltd.com wrote: The error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter mode at /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet class firebird::service { exec { Create symlink for /var/fbdata: ... mode= 755, ... } Maybe exec resources, like your Create symlink ... do not want a mode parameter? -- Cosimo -- 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.
Re: [Puppet Users] struggling with precedence/declarative language
On Jun 28, 2011, at 1:01 PM, Craig White wrote: I think that the heat must be affecting me because this seems so simple but it's eluded me for too long now. What I am trying to do is create a symlink from one directory to another AFTER the package is installed. The error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter mode at /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet Which I gather means that it can't create the symbolic link to a directory that doesn't exist yet but it could be my syntax and I have checked/rechecked/simplified but still... Do you have a root firebird class? In your init.pp for the firebird module, you might consider adding something like this to create the dependency order you're looking at. Class['firebird::install'] - Class['firebird::service'] All items in the firebird::install class will happen before the firebird::service class. class firebird::install { package { firebird2.1-classic: name = firebird2.1-classic, ensure = installed, #require = Class[firebird::configure], notify = Class[firebird::service, firebird::configure], } package { firebird2.1-dev: name = firebird2.1-dev, ensure = installed, } } class firebird::service { service { firebird2.1-classic: ensure = running, hasstatus = true, hasrestart = true, enable = true, } Also, does the service start require the symlink to exist before you start the service? you might want to consider adding a dependency here as well. Maybe a 'require = Exec['Create symlink for /var/fbdata'],' exec { Create symlink for /var/fbdata: path= /usr/local/bin:/usr/local/sbin:/bin:/usr/bin, environment = HOME=/root, user= root, group = root, mode= 755, command = /bin/ln -s /var/lib/firebird/2.1/data /var/fbdata, refresh= false, #unless = /bin/ls -l /var/fbdata, logoutput = on_failure, } } Any reason this is an Exec as opposed to using the file resource to accomplish this for you? file { '/var/fbdata': ensure = link, target = '/var/lib/firebird/2.1/data } -- Craig White ~~ craig.wh...@ttiltd.com 1.800.869.6908 ~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- 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. -- 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.
Re: [Puppet Users] struggling with precedence/declarative language
On Jun 28, 2011, at 11:14 AM, Cosimo Streppone wrote: On Tue, 28 Jun 2011 20:01:20 +0200, Craig White craig.wh...@ttiltd.com wrote: The error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter mode at /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet class firebird::service { exec { Create symlink for /var/fbdata: ... mode= 755, ... } Maybe exec resources, like your Create symlink ... do not want a mode parameter? duh, of course it is irrelevant and I removed it - don't know what I was thinking. It didn't solve the issue though Craig -- 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.
Re: [Puppet Users] struggling with precedence/declarative language
Did the error change, at least? If so, can you post the new error? -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Tue, Jun 28, 2011 at 11:23 AM, Craig White craig.wh...@ttiltd.comwrote: On Jun 28, 2011, at 11:14 AM, Cosimo Streppone wrote: On Tue, 28 Jun 2011 20:01:20 +0200, Craig White craig.wh...@ttiltd.com wrote: The error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter mode at /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet class firebird::service { exec { Create symlink for /var/fbdata: ... mode= 755, ... } Maybe exec resources, like your Create symlink ... do not want a mode parameter? duh, of course it is irrelevant and I removed it - don't know what I was thinking. It didn't solve the issue though Craig -- 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. -- 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.
Re: [Puppet Users] struggling with precedence/declarative language
FInally solved it via 'require = Class['firebird::install'] to force that to run prior to firebird::service which leads me to a new question but I will start a new thread because I can use a much simpler example which has the same problem. Thanks Craig On Jun 28, 2011, at 12:14 PM, Nathan Clemons wrote: Did the error change, at least? If so, can you post the new error? -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Tue, Jun 28, 2011 at 11:23 AM, Craig White craig.wh...@ttiltd.com wrote: On Jun 28, 2011, at 11:14 AM, Cosimo Streppone wrote: On Tue, 28 Jun 2011 20:01:20 +0200, Craig White craig.wh...@ttiltd.com wrote: The error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter mode at /etc/puppet/modules/firebird/manifests/service.pp:17 on node ubuntu2.ttinet class firebird::service { exec { Create symlink for /var/fbdata: ... mode= 755, ... } Maybe exec resources, like your Create symlink ... do not want a mode parameter? duh, of course it is irrelevant and I removed it - don't know what I was thinking. It didn't solve the issue though Craig -- 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.