qutic development
2010-Sep-22 14:31 UTC
[Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
I am using puppet 2.6 with Nexenta ncp 3.0.1 - an OpenSolaris distro with Ubuntu userland. Most things work great, only a few make trouble. A big problem is creating a (Solaris-) Zone with Puppet. It does not work with puppetmasterd only if run it with puppet manually: puppet --debug --verbose /etc/puppet/manifests/site.pp Here is the code: # $name = "www" $zname = "$name.$domain" zfs { "syspool/zones/$name": mountpoint => "/export/zones/$name", ensure => present, require => File["/export/zones"], } file { "/export/zones/$name": ensure => directory, mode => 700, require => Zfs["syspool/zones/$name"], } zone { $name: autoboot => "true", ip => "$zone_if:$zone_ip:$zone_route", path => "/export/zones/$name", realhostname => $zname, require => File["/export/zones/$name"], } I figured out that it must be a path issue. Running with puppetmasterd the path is not set to the default value for nexenta: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" Is there any way to set the path for every system command puppet is executing? I didn´t found it in the puppet code. Any hints? Thanks jerry ;-) -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Felix Frank
2010-Sep-22 15:01 UTC
Re: [Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
On 09/22/2010 04:31 PM, qutic development wrote:> ... > I figured out that it must be a path issue. Running with puppetmasterd > the path is not set to the default value for nexenta: > > PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" > > Is there any way to set the path for every system command puppet is > executing? I didn´t found it in the puppet code. Any hints?If you run puppetd from /etc/init.d, you may want to tweak its environment right in its init Script. In any case, be sure to create a suitable environment. Puppet cannot do that for you (afaik). Cheers, Felix -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jeff McCune
2010-Sep-22 15:20 UTC
Re: [Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
On Wednesday, September 22, 2010, qutic development <mailinglists@qutic.com> wrote: [snip]> Is there any way to set the path for every system command puppet is executing? I didn´t found it in the puppet code. Any hints?Yes, the path parameter of the exec type will allow you to manage the PATH environment variable of the system commands puppet agent executes. You could also set a default for all exec resources using Exec { path => "/bin:/usr/bin" } at top scope. -Jeff -- Jeff McCune http://www.puppetlabs.com/ -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
qutic development
2010-Sep-23 07:35 UTC
Re: [Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
Jeff, thank you for your answer. But my question was not about exec. The question was how to set the path for every "system" command puppet is executing ;-) It seems to be that on Nexenta the path is not set the right way. The path in /etc/profile is fine, but this might be not recognized by executing the system command out of the ruby puppet code. Any additional hints? On 22.09.2010, at 17:20, Jeff McCune wrote:> Yes, the path parameter of the exec type will allow you to manage the > PATH environment variable of the system commands puppet agent > executes. You could also set a default for all exec resources using > Exec { path => "/bin:/usr/bin" } at top scope. > > -Jeff-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
qutic development
2010-Sep-23 07:37 UTC
Re: [Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
Felix,> If you run puppetd from /etc/init.d, you may want to tweak its > environment right in its init Script.Nexenta is using SMF like Solaris, not init.d like Linux.> In any case, be sure to create a suitable environment. Puppet cannot > do > that for you (afaik).Yes that is right. And my question was how to do so - and where ;-) Thanks jerry -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Felix Frank
2010-Sep-23 07:54 UTC
Re: [Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
On 09/23/2010 09:37 AM, qutic development wrote:> Felix, > >> If you run puppetd from /etc/init.d, you may want to tweak its >> environment right in its init Script. > > Nexenta is using SMF like Solaris, not init.d like Linux.Uhm, my bad. My knowledge on Solaris is obviously limited; you may want to ask the Solaris folks how to do what you need to do. Regards, Felix -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
qutic development
2010-Sep-23 08:14 UTC
Re: [Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
>> Nexenta is using SMF like Solaris, not init.d like Linux. > > Uhm, my bad. My knowledge on Solaris is obviously limited; you may > want > to ask the Solaris folks how to do what you need to do.Yes of course I will. It would make it easier to explain if I knew how puppet is executing system calls within ruby. Thanks & best regards jerry -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jeff McCune
2010-Sep-23 16:49 UTC
Re: [Puppet Users] Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
On Thu, Sep 23, 2010 at 12:35 AM, qutic development <mailinglists@qutic.com> wrote:> Jeff, > > thank you for your answer. But my question was not about exec. The question > was how to set the path for every "system" command puppet is executing ;-)Ah, I see, my misunderstanding.> It seems to be that on Nexenta the path is not set the right way. The path > in /etc/profile is fine, but this might be not recognized by executing the > system command out of the ruby puppet code.This isn''t really a right / wrong or solaris / linux "way" but rather a general issue of setting the PATH for the process and making sure it''s exported to sub processes. Depending on how you run puppet (cron, or init.d) just set and export PATH the way you want it in that location as Felix mentioned. -Jeff -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
John Lyman
2010-Sep-24 15:29 UTC
[Puppet Users] Re: Path issue using Puppet 2.6 with Nexenta ncp 3.0.1
> Nexenta is using SMF like Solaris, not init.d like Linux.You can modify the SMF service manifest to include the path. For example: <method_environment> <envvar name="PATH" value="/usr/local/sbin:/usr/ local/bin:/usr/sbin:/usr/bin:/sbin:/bin" /> </method_environment> See http://www.cuddletech.com/blog/pivot/entry.php?id=182 You can also do it with svccfg: svccfg -s puppetmasterd setenv PATH "/usr/local/sbin:/usr/local/bin:/ usr/sbin:/usr/bin:/sbin:/bin" -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.