OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004924 [facter] packaging major always 2012-03-21 01:14 2012-08-05 23:58
Reporter dcjackson View Status public  
Assigned To bwalton
Priority normal Resolution fixed  
Status closed  
Summary 0004924: Are Facter and Puppet missing a dependency?J
Description I am a newbie to opencsw. Used Blastwave for a long time....

Anyway, I install my OS via JumpStart
Solaris10 u10 x86.

First I install pkgutil, then puppet (within my jumpstart finish script)

I then try to use faster within my finish script, and get this:

/opt/csw/lib/ruby/site_ruby/1.8/facter/util/config.rb:4:in `require': no such file to load -- rbconfig (LoadError)
    from /opt/csw/lib/ruby/site_ruby/1.8/facter/util/config.rb:4
    from /opt/csw/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:7:in `require'
    from /opt/csw/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:7
    from /opt/csw/lib/ruby/site_ruby/1.8/facter/util/fact.rb:2:in `require'
    from /opt/csw/lib/ruby/site_ruby/1.8/facter/util/fact.rb:2
    from /opt/csw/lib/ruby/site_ruby/1.8/facter.rb:21:in `require'
    from /opt/csw/lib/ruby/site_ruby/1.8/facter.rb:21
    from /opt/csw/lib/ruby/site_ruby/1.8/facter/application.rb:5:in `require'
    from /opt/csw/lib/ruby/site_ruby/1.8/facter/application.rb:5:in `run'
    from /opt/csw/bin/facter:60

This problem also occurs after I reboot the machine and log in.

I then did a pkgutil --install ruby18_gcc4

After that completed, faster worked fine.

I am wondering if puppet/facter are missing a dependency?

Of course, I could be doing something wrong, in general, or WRT installing this stuff within jumpstart.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0009748)
bwalton (administrator)
2012-03-21 13:37

During the installation of ruby, an rbconfig.rb.sun file is delivered and the CSWalternatives package is supposed to add a symlink from rbconfig.rb -> rbconfig.rb.sun. When you add CSWruby18-gcc4, it delivers rbconfig.rb.gcc4 and triggers alternatives to update the symlink as it has higher priority than .sun.

If you're finding that rbconfig can't be loaded, that would make me think that the alternatives handling isn't being triggered properly during the jumpstart.

Can you provide the output of: alternatives --display rbconfig18
and
ls -l /opt/csw/lib/ruby/1.8/*solaris2.9/rbconfig.rb*

Right after the installation of facter in your finish script?
(0009749)
dcjackson (reporter)
2012-03-21 17:35

Just to be clear, at present, I am running two pkgutils in sequence within my jumpstart finish script:
First I run:
 --install CSWruby18-gcc4
Then I run:
 --install CSWpuppet

After install/reboot, running apps like faster do not work with the error message above.

# /opt/csw/sbin/alternatives --display rbconfig18
Installed alternatives for rbconfig18 are:
/opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb rbconfig18 /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb.sun 5

# ls -l /opt/csw/lib/ruby/1.8/*solaris2.9/rbconfig.rb*
-rw-r--r-- 1 root bin 7325 Mar 24 2011 /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb.sun

# head -20 /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb.sun

# This file was created by mkconfig.rb when ruby was built. Any
# changes made to this file will be lost the next time ruby is built.

module Config
  RUBY_VERSION == "1.8.7" or
    raise "ruby lib version (1.8.7) doesn't match executable version (#{RUBY_VERSION})"

  TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-solaris2.9")
  DESTDIR = '' unless defined? DESTDIR
  CONFIG = {}
  CONFIG["DESTDIR"] = DESTDIR
  CONFIG["PATCHLEVEL"] = "334"
  CONFIG["INSTALL"] = '/opt/csw/bin/ginstall -c'
  CONFIG["EXEEXT"] = ""
  CONFIG["prefix"] = (TOPDIR || DESTDIR + "/opt/csw")
  CONFIG["ruby_install_name"] = "ruby18"
  CONFIG["RUBY_INSTALL_NAME"] = "ruby18"
  CONFIG["RUBY_SO_NAME"] = "ruby18"
  CONFIG["MANTYPE"] = "man"

If you want additional info, I can change my finish script and re-run it to get exactly what you want, just let me know....
(0009750)
dcjackson (reporter)
2012-03-21 17:36

FYI, I keep saying "faster" when of course I mean "facter". Autocorrect issue!
(0009751)
dcjackson (reporter)
2012-03-21 18:44

Another note. After the machine reboots post install, the problem persists. If I pkgutil --remove the CSWruby18-gcc4 and then re-install it, then all is well....
(0009752)
dam (administrator)
2012-03-21 18:55

The problem is that the current alternatives implementation is not root relocation aware. We should address this when alternatives is redone.
(0009753)
dcjackson (reporter)
2012-03-21 19:03

Is there something I can do in my finish script to work around this problem?
Move a file, create a new entry somewhere?

Thanks
(0009754)
markp (developer)
2012-03-21 21:37

Ben, Dago, thanks for your input today - I realise this should be my ticket. I'm away on vacation this week, I'll check in every now and then to see how you're getting on with debugging. If facter needs re-rolling with an added dep, please let me know and I'll see to it next week.
(0009756)
dcjackson (reporter)
2012-03-21 23:33

During the install of puppet/facter/ruby during the jumpstart finish script, I see this:

> Installing CSWruby18-1.8.7p334,REV=2011.03.24 (35/38) ...
Registering 'ruby' alternative /opt/csw/bin/ruby18 ...
sort: getexecname() failed
/opt/csw/sbin/alternatives: Error 52: should not be in this code section.
Inconsistency with files in /opt/csw/share/alternatives ?
Registering 'rbconfig18' alternative /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb.sun ...
sort: getexecname() failed
/opt/csw/sbin/alternatives: Error 52: should not be in this code section.
Inconsistency with files in /opt/csw/share/alternatives ?

Installation of <CSWruby18> was successful.

I finally figured out that what I needed was for

/opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb to symlink the the rbconfig.rb.sun file.
I hacked that into my finish script, and it works now, at least after reboot.

The other thing I have found is that running svccfg on the (puppet) manifest doesn't work from jumpstart.
What does work is to take the manifest, change it to enabled='True', and put that manifest xml file into the /var/svc/manifest/network folder. When the machine reboots, it finds that, and enables the service.

There are a lot of tricks/hacks to get things working during jumpstart/finish. one is to launch things under chroot e.g. "chroot /a the-command", so that command will have a view of the mounted filesystems without the /a where they are mounted during jumpstart/install....

So to summarize:

It would be nice if ruby/alternative installed correctly under jumpstart.

It would be nice if there was an an alternate smf manifest provided with enabled=true, that jumpstart users could find easily after pkg install, and stick into the /var/svc/manifest tree.

I really appreciate the help and info here, and of course, the puppet/facter packages!!!!
(0010083)
markp (developer)
2012-08-05 23:58

I'm closing this as it was a Ruby issue, not a Puppet one.

dcjackson - if this still gives you grief with the latest 2.7.18 packages and Ruby, could you drop me a line and let me know?

Thanks


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker