I think this is confirmed now.

In kickstart chroot in RHEL6, 'runlevel' would return this output: "unknown".

If I change the binary '/sbin/runlevel' file with a shell script after
backing it up first:

# cat /sbin/runlevel
echo "N 3"

Then everything is fine.

Also by replacing /var/run/utmp with similar file from another working
RHEL6U2 server, runlevel command is happy as well.

Sounds like a RedHat bug??



On 2/14/12, hai wu <[email protected]> wrote:
> Further troubleshooting shows that this is likely caused by 'chkconfig
> cups' command does not run well in kickstart chroot environment:
>
> # chkconfig cups
> cannot determine current run level
>
> While the same command is working fine in a normal RHEL6 environment.
> This is the file "puppet/provider/service/redhat.rb" where puppet is
> using the output from "chkconfig cups" to check whether the service is
> enabled or not, but since in chroot kickstart environment, there's not
> runlevel information, that command is failing.
>
> Any ideas?
>
> If not, I will have to file a bug report on this. It is not possible
> to run puppet apply in kickstart chroot enviornment to converge the
> configuration, no matter how many times you are going to run it. The
> workaround is to run puppet apply one more time when the server comes
> up after kickstarting, which is not ideal.
>
> On 2/14/12, hai wu <[email protected]> wrote:
>> I tried the following by uninstalling puppet client rpm inside
>> kickstart chroot environment, and reinstalling the following puppet
>> agent rpm, and all of them are failing in the same way:
>>
>> puppet-2.6.9-2.el6.noarch.rpm
>> puppet-2.7.9-1.el6.noarch.rpm
>> puppet-2.7.10-1.el6.noarch.rpm
>>
>> On 2/14/12, hai wu <[email protected]> wrote:
>>> This is a simple test code, named as 'a.pp':
>>>
>>> service { 'cups':
>>>   enable => false,
>>> }
>>>
>>> During RHEL kickstart process, I tried to run the above after doing
>>> "chroot
>>> /mnt/sysimage"
>>>
>>> If 'chkconfig --list cups' shows cups is on, no mater how many time you
>>> ran
>>> "puppet apply a.pp", it always seems to see nothing for cups service,
>>> nothing happened.
>>>
>>> If 'chkconfig --list cups' shows cups is not on, no matter how many
>>> times
>>> ran "puppet apply a.pp", it keeps trying to enable it all the time with
>>> the
>>> following picture:
>>>
>>> notice: /Stage[main]//Service[cups]/enable: enable changed 'false' to
>>> 'true'
>>>
>>> Any way to fix the above?
>>>
>>
>

-- 
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.

Reply via email to