Harihara Vinayakaram
2010-Jul-16 11:39 UTC
[Puppet Users] Installping puppet with kickstart -- Cannot find local fact /proc/cpuinfo
Hi I have been trying to get puppet working with kickstart. I am trying to install Hadoop on the nodes. Installing puppet from kickstart work and when the machine restarts, certificates are pulled down and hadoop user is created and files are extracted. I want all the user creation etc to be done before the machine reboots so that I can set up init.d scripts to do a start of hadoop . So I run the puppetd --server ... --one-time --no-daemonize as part of the late_command with a chroot /target . But this fails saying cannot find local fact /proc/cpuinfo . I tried to a mount /proc in the script but the machine hangs. Is this a known problem http://groups.google.com/group/puppet-users/browse_thread/thread/b2e38f8ee8052b9c has a solution but it does not work . The only difference I can see is that it runs the puppetd as -in-target instead of a chroot . Any ideas will be helpful -- 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.
Tore
2010-Jul-20 12:23 UTC
[Puppet Users] Re: Installping puppet with kickstart -- Cannot find local fact /proc/cpuinfo
We use Satellite to kickstart our nodes. Have you tried to do this
after %post?
kickstart-file, I''ve removed a few lines:
install
text
[....]
%packages
@ Base
%pre
$kickstart_start
$SNIPPET(''pre_install_network_config'')
%post --nochroot
mkdir /mnt/sysimage/tmp/ks-tree-copy
[...]
cp `awk ''{ if ($1 ~ /%include/) {print $2}}'' /tmp/ks.cfg`
/tmp/ks.cfg /
mnt/sysimage/root
%post
( # Log %post errors
# --Begin RHN Satellite command section--
[...]
# --End RHN Satellite command section--
[...]
) >> /root/ks-post.log 2>&1
$SNIPPET(''post_install_network_config'')
$SNIPPET(''spacewalk/1/install_and_config_puppet'')
$SNIPPET(''post_install_kernel_options'')
$SNIPPET(''koan_environment'')
$kickstart_done
I have no idea if that will work for you, its strange that /proc/
cpuinfo isn''t available since I assume anaconda uses that information
during installation.
On 16 Jul, 13:39, Harihara Vinayakaram <hvr...@gmail.com>
wrote:> Hi
> I have been trying to get puppet working with kickstart. I am
> trying to install Hadoop on the nodes. Installing puppet from
> kickstart work and when the machine restarts, certificates are pulled
> down and hadoop user is created and files are extracted.
>
> I want all the user creation etc to be done before the machine
> reboots so that I can set up init.d scripts to do a start of hadoop .
> So I run the puppetd --server ... --one-time --no-daemonize as part
> of the late_command with a chroot /target .
>
> But this fails saying cannot find local fact /proc/cpuinfo . I
> tried to a mount /proc in the script but the machine hangs. Is this a
> known problem
>
> http://groups.google.com/group/puppet-users/browse_thread/thread/b2e3...
> has a solution but it does not work . The only difference I can see is
> that it runs the puppetd as -in-target instead of a chroot . Any ideas
> will be helpful
--
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.
Patrick Mohr
2010-Jul-20 17:28 UTC
Re: [Puppet Users] Re: Installping puppet with kickstart -- Cannot find local fact /proc/cpuinfo
On Tue, Jul 20, 2010 at 5:23 AM, Tore <tore.lonoy@gmail.com> wrote:> We use Satellite to kickstart our nodes. Have you tried to do this > after %post? > > kickstart-file, I''ve removed a few lines: > > install > text > [....] > %packages > @ Base > > %pre > $kickstart_start > $SNIPPET(''pre_install_network_config'') > > %post --nochroot > mkdir /mnt/sysimage/tmp/ks-tree-copy > [...] > cp `awk ''{ if ($1 ~ /%include/) {print $2}}'' /tmp/ks.cfg` /tmp/ks.cfg / > mnt/sysimage/root > > %post > ( # Log %post errors > # --Begin RHN Satellite command section-- > [...] > # --End RHN Satellite command section-- > > [...] > ) >> /root/ks-post.log 2>&1 > $SNIPPET(''post_install_network_config'') > > $SNIPPET(''spacewalk/1/install_and_config_puppet'') > > $SNIPPET(''post_install_kernel_options'') > $SNIPPET(''koan_environment'') > $kickstart_done > > > I have no idea if that will work for you, its strange that /proc/ > cpuinfo isn''t available since I assume anaconda uses that information > during installation. >I don''t remember much about the redhat install process, but are you chrooting before you run puppet? If so, the probably is probably that /proc is not mounted inside of the chroot environment? On 16 Jul, 13:39, Harihara Vinayakaram <hvr...@gmail.com> wrote:> > Hi > > I have been trying to get puppet working with kickstart. I am > > trying to install Hadoop on the nodes. Installing puppet from > > kickstart work and when the machine restarts, certificates are pulled > > down and hadoop user is created and files are extracted. > > > > I want all the user creation etc to be done before the machine > > reboots so that I can set up init.d scripts to do a start of hadoop . > > So I run the puppetd --server ... --one-time --no-daemonize as part > > of the late_command with a chroot /target . > > > > But this fails saying cannot find local fact /proc/cpuinfo . I > > tried to a mount /proc in the script but the machine hangs. Is this a > > known problem > > > > http://groups.google.com/group/puppet-users/browse_thread/thread/b2e3... > > has a solution but it does not work . The only difference I can see is > > that it runs the puppetd as -in-target instead of a chroot . Any ideas > > will be helpful > > -- > 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<puppet-users%2Bunsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Harihara Vinayakaram
2010-Jul-21 11:47 UTC
[Puppet Users] Re: Installping puppet with kickstart -- Cannot find local fact /proc/cpuinfo
I found this reply from one of the users in the same thread . The solution was to 1) Copy the existing /etc/rc.local to /etc/rc.local.orig 2) Replace the /etc/rc.local with a script that run puppetd , moves / etc/rc.local.orig to /etc/rc.local , reboot Regards Hari On Jul 20, 10:28 pm, Patrick Mohr <kc7...@gmail.com> wrote:> On Tue, Jul 20, 2010 at 5:23 AM, Tore <tore.lo...@gmail.com> wrote: > > We use Satellite to kickstart our nodes. Have you tried to do this > > after %post? > > > kickstart-file, I''ve removed a few lines: > > > install > > text > > [....] > > %packages > > @ Base > > > %pre > > $kickstart_start > > $SNIPPET(''pre_install_network_config'') > > > %post --nochroot > > mkdir /mnt/sysimage/tmp/ks-tree-copy > > [...] > > cp `awk ''{ if ($1 ~ /%include/) {print $2}}'' /tmp/ks.cfg` /tmp/ks.cfg / > > mnt/sysimage/root > > > %post > > ( # Log %post errors > > # --Begin RHN Satellite command section-- > > [...] > > # --End RHN Satellite command section-- > > > [...] > > ) >> /root/ks-post.log 2>&1 > > $SNIPPET(''post_install_network_config'') > > > $SNIPPET(''spacewalk/1/install_and_config_puppet'') > > > $SNIPPET(''post_install_kernel_options'') > > $SNIPPET(''koan_environment'') > > $kickstart_done > > > I have no idea if that will work for you, its strange that /proc/ > > cpuinfo isn''t available since I assume anaconda uses that information > > during installation. > > I don''t remember much about the redhat install process, but are you > chrooting before you run puppet? If so, the probably is probably that /proc > is not mounted inside of the chroot environment? > > On 16 Jul, 13:39, Harihara Vinayakaram <hvr...@gmail.com> wrote: > > > > Hi > > > I have been trying to get puppet working with kickstart. I am > > > trying to install Hadoop on the nodes. Installing puppet from > > > kickstart work and when the machine restarts, certificates are pulled > > > down and hadoop user is created and files are extracted. > > > > I want all the user creation etc to be done before the machine > > > reboots so that I can set up init.d scripts to do a start of hadoop . > > > So I run the puppetd --server ... --one-time --no-daemonize as part > > > of the late_command with a chroot /target . > > > > But this fails saying cannot find local fact /proc/cpuinfo . I > > > tried to a mount /proc in the script but the machine hangs. Is this a > > > known problem > > > >http://groups.google.com/group/puppet-users/browse_thread/thread/b2e3... > > > has a solution but it does not work . The only difference I can see is > > > that it runs the puppetd as -in-target instead of a chroot . Any ideas > > > will be helpful > > > -- > > 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<puppet-users%2Bunsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick Mohr
2010-Jul-21 15:06 UTC
Re: [Puppet Users] Re: Installping puppet with kickstart -- Cannot find local fact /proc/cpuinfo
On Jul 21, 2010, at 4:47 AM, Harihara Vinayakaram wrote:> I found this reply from one of the users in the same thread . The > solution was to > 1) Copy the existing /etc/rc.local to /etc/rc.local.orig > 2) Replace the /etc/rc.local with a script that run puppetd , moves / > etc/rc.local.orig to /etc/rc.local , reboot >Just some things to keep in mind: *) If puppet hangs in rc.local, the startup process will hang in some distros. *) If puppet''s not daemonized, and puppet returns an error, rc.local will stop executing in some distros. *) Make sure that nothing changes rc.local back until puppet successfully finishes the first run.> > On Jul 20, 10:28 pm, Patrick Mohr <kc7...@gmail.com> wrote: >> On Tue, Jul 20, 2010 at 5:23 AM, Tore <tore.lo...@gmail.com> wrote: >>> We use Satellite to kickstart our nodes. Have you tried to do this >>> after %post? >> >>> kickstart-file, I''ve removed a few lines: >> >>> install >>> text >>> [....] >>> %packages >>> @ Base >> >>> %pre >>> $kickstart_start >>> $SNIPPET(''pre_install_network_config'') >> >>> %post --nochroot >>> mkdir /mnt/sysimage/tmp/ks-tree-copy >>> [...] >>> cp `awk ''{ if ($1 ~ /%include/) {print $2}}'' /tmp/ks.cfg` /tmp/ks.cfg / >>> mnt/sysimage/root >> >>> %post >>> ( # Log %post errors >>> # --Begin RHN Satellite command section-- >>> [...] >>> # --End RHN Satellite command section-- >> >>> [...] >>> ) >> /root/ks-post.log 2>&1 >>> $SNIPPET(''post_install_network_config'') >> >>> $SNIPPET(''spacewalk/1/install_and_config_puppet'') >> >>> $SNIPPET(''post_install_kernel_options'') >>> $SNIPPET(''koan_environment'') >>> $kickstart_done >> >>> I have no idea if that will work for you, its strange that /proc/ >>> cpuinfo isn''t available since I assume anaconda uses that information >>> during installation. >> >> I don''t remember much about the redhat install process, but are you >> chrooting before you run puppet? If so, the probably is probably that /proc >> is not mounted inside of the chroot environment? >> >> On 16 Jul, 13:39, Harihara Vinayakaram <hvr...@gmail.com> wrote: >> >>>> Hi >>>> I have been trying to get puppet working with kickstart. I am >>>> trying to install Hadoop on the nodes. Installing puppet from >>>> kickstart work and when the machine restarts, certificates are pulled >>>> down and hadoop user is created and files are extracted. >> >>>> I want all the user creation etc to be done before the machine >>>> reboots so that I can set up init.d scripts to do a start of hadoop . >>>> So I run the puppetd --server ... --one-time --no-daemonize as part >>>> of the late_command with a chroot /target . >> >>>> But this fails saying cannot find local fact /proc/cpuinfo . I >>>> tried to a mount /proc in the script but the machine hangs. Is this a >>>> known problem >> >>>> http://groups.google.com/group/puppet-users/browse_thread/thread/b2e3... >>>> has a solution but it does not work . The only difference I can see is >>>> that it runs the puppetd as -in-target instead of a chroot . Any ideas >>>> will be helpful >> >>> -- >>> 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<puppet-users%2Bunsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.