Issue #2542 has been updated by Allan Marcus.
Status changed from Closed to Re-opened
Yes, I think this is still broken. I have 10.6 10a421a, puppet 25, facter
1.5.6. When I run ralsh --version I get:
csdadmins-Mac-mini:~ root# puppetd --version
0.25.0
csdadmins-Mac-mini:~ root# facter --version
1.5.6
csdadmins-Mac-mini:~ root# ralsh --version
/Library/Ruby/Site/1.8/facter/util/macosx.rb:64:in `sw_vers': undefined method
`last' for nil:NilClass (NoMethodError)
from /Library/Ruby/Site/1.8/facter/macosx.rb:46
from /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load_file'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:38:in `load_all'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `each'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `load_all'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `each'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `load_all'
from /Library/Ruby/Site/1.8/facter/util/collection.rb:90:in `load_all'
from /Library/Ruby/Site/1.8/facter.rb:183:in `loadfacts'
from /Library/Ruby/Site/1.8/puppet/application/ralsh.rb:14:in
`run_preinit'
from /Library/Ruby/Site/1.8/puppet/application.rb:213:in `run'
from /Library/Ruby/Site/1.8/puppet/application.rb:306:in `exit_on_fail'
from /Library/Ruby/Site/1.8/puppet/application.rb:213:in `run'
from /usr/bin/ralsh:89
----------------------------------------
Bug #2542: ralsh user broken on fresh 10.5 install
http://projects.reductivelabs.com/issues/2542
Author: Al Hoang
Status: Re-opened
Priority: Normal
Assigned to:
Category: OSX
Target version: 0.25.0
Complexity: Easy
Affected version: 0.24.8
Keywords:
When trying to run ralsh user on close to a fresh Leopard 10.5 install (No
software updates applied yet). The following occurred:
<pre>
$ sudo ralsh user
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:276:in
`get_exec_preamble': undefined method `<<' for nil:NilClass (NoMethodError)
from
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:137:in
`list_all_present'
from
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:230:in
`single_report'
from
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:528:in
`getinfo'
from /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:221:in
`exists?'
from /Library/Ruby/Site/1.8/puppet/type/user.rb:56:in `retrieve'
from /Library/Ruby/Site/1.8/puppet/type/user.rb:259:in `retrieve'
from /Library/Ruby/Site/1.8/puppet/util/autoload.rb:77:in `inject'
from /Library/Ruby/Site/1.8/puppet/type/user.rb:253:in `each'
from /Library/Ruby/Site/1.8/puppet/type/user.rb:253:in `inject'
from /Library/Ruby/Site/1.8/puppet/type/user.rb:253:in `retrieve'
from /usr/bin/ralsh:232
</pre>
I traced this down to the provider in
_lib/puppet/provider/directoryservice.rb_. The regexp inside the method
_self.get_macosx_version_major_ is the following:
<pre><code class="ruby">
product_version.scan(/(\d+)\.(\d+)./)
</code>
</pre>
It seems this regexp will not be able to handle the case when product_version's
value is something like 10.5.
I am attaching a patch that adds some extra checks in
_self.get_macosx_version_major_ to try the following:
# Find the major version from Facter if the regexp scan fails
# Raise an error if product_version_major has an invalid value
Information from uname -a, sw_vers, and puppet and facter
<pre>
$ puppet --version
0.24.8
$ facter --version
1.5.6
$ uname -a
Darwin medford.local 9.0.0 Darwin Kernel Version 9.0.0: Tue Oct 9 21:37:58 PDT
2007; root:xnu-1228~1/RELEASE_PPC Power Macintosh
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.5
BuildVersion: 9A581
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---