Bug 985208

Summary: [On rawhide(f20)] Packstack fails to find puppet/util/command_line (while 'puppet' package is still installed)
Product: [Fedora] Fedora Reporter: Kashyap Chamarthy <kchamart>
Component: puppetAssignee: Sam Kottler <skottler>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: derekh, fedora, grajaiya, Jan.van.Eldik, jose.p.oliveira.oss, kchamart, k.georgiou, mastahnke, mattdm, mfojtik, mlamouri, mmagr, moses, ohadlevy, p, sandro, skottler, tmz, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: puppet-3.1.1-5.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-02 21:53:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
openstack-setup.log none

Description Kashyap Chamarthy 2013-07-17 05:57:27 UTC
Description of problem:
=======================
 Running packstack (single node install) on a new Fedora rawhide (f20) machine, fails with:

  ERROR : Error during puppet run : LoadError: no such file to load -- puppet/util/command_line


Version:
========

  $ rpm -q openstack-packstack puppet
  openstack-packstack-2012.2.2-0.9.dev406.fc19.noarch
  puppet-3.1.1-3.fc20.noarch


How reproducible: Consistently


Steps to Reproduce:
==================

Firstly, "--allinone" option seems to have vanished.

  $ packstack --allinone 
  Usage: packstack [options]

  packstack: error: no such option: --allinone

Isn't that a regression?

Secondly, to trigger the problem:

  $ packstack --gen-answer-file=ans.txt
  $ packstack --answer-file=ans.txt
  .
  .
  .
  * ERROR : Error during puppet run : LoadError: no such file to load -- puppet/util/command_line


Actual results: Packstack fails to proceed on a single node


Expected results: Packstack proceeds and installs the single node install successfully.

Comment 1 Michal Fojtik 2013-07-17 10:36:10 UTC
Not just rawhide, I'm getting this failure as well on freshly installed F19 machine:

Applying localhost_prescript.pp
                                                                        
ERROR : Error during puppet run : LoadError: no such file to load -- puppet/util/command_line
Please check log file /var/tmp/packstack/20130717-123040-t7iWlD/openstack-setup.log for more information

Comment 2 Michal Fojtik 2013-07-17 10:39:01 UTC
FYI, there is a workaround, if you **really** need to packstack pass:

$ gem install puppet

Comment 3 Martin Magr 2013-07-17 12:32:46 UTC
Could you please upload openstack-setup.log? Also IIUIC it happens on puppet-3.1.1 for both of you? Can you try to downgrade your puppet to 2.6 or 2.7 version and try it again?

Also if gem install fixed the issue, what version of puppet has been installed?

command_line is used with puppet built-in nagios resources, so it might be that in 3.1 RPM is something missing ...

Comment 4 Martin Magr 2013-07-22 06:08:55 UTC
*** Bug 986154 has been marked as a duplicate of this bug. ***

Comment 5 Kashyap Chamarthy 2013-07-23 08:07:02 UTC
Created attachment 777217 [details]
openstack-setup.log

That's the puppet version:

  $ rpm -q puppet
  puppet-3.1.1-4.fc19.noarch

Comment 6 Kashyap Chamarthy 2013-07-23 11:07:06 UTC
I did:

  $ yum update openstack-packstack --enablerepo=updates-testing

Which brought in: openstack-packstack-2013.1.1-0.20.dev642.fc19

And then:

  $ gem install puppet
  Fetching: facter-1.7.2.gem (100%)
  Successfully installed facter-1.7.2
  Fetching: json_pure-1.8.0.gem (100%)
  Successfully installed json_pure-1.8.0
  Fetching: hiera-1.2.1.gem (100%)
  Successfully installed hiera-1.2.1
  Fetching: rgen-0.6.5.gem (100%)
  Successfully installed rgen-0.6.5
  Fetching: puppet-3.2.3.gem (100%)
  Successfully installed puppet-3.2.3
  5 gems installed


Then tried packstack --allinone, it now fails with:
.
.
.
Applying 192.168.122.88_mysql.pp
Applying 192.168.122.88_qpid.pp
                                                                                           [ ERROR ]

ERROR : Error during puppet run : Error: Could not autoload puppet/provider/package/rpm: fork is not available on this platform
Please check log file /var/tmp/packstack/20130723-070331-oYwe59/openstack-setup.log for more information

Additional information:
 * A new answerfile was created in: /root/packstack-answers-20130723-070332.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * Did not create a cinder volume group, one already existed
 * To use the command line tools you need to source the file /root/keystonerc_admin created on 192.168.122.88
 * To use the console, browse to http://192.168.122.88/dashboard
 * To use Nagios, browse to http://192.168.122.88/nagios username : nagiosadmin, password : 843d8f1344504d89

Comment 7 Martin Magr 2013-07-25 11:52:13 UTC
This is probably puppet 3.1.1 packaging problem. Searching logs I found:
LoadError: no such file to load -- puppet/util/command_line
  require at org/jruby/RubyKernel.java:1027
  require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:51
   (root) at /usr/bin/puppet:3

I have this file on my Fedora 19 VM:
[para@localhost manifests]$ sudo find / -iname "*command_line*" 2>/dev/null | grep -v yumdb
/usr/share/ruby/vendor_ruby/puppet/util/command_line
/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb

And this file is required bot the puppet command:
[para@localhost manifests]$ cat /usr/bin/puppet
#!/usr/bin/ruby

require 'puppet/util/command_line'
Puppet::Util::CommandLine.new.execute

I can't even run puppet manually:
[para@localhost manifests]$ puppet apply test.pp 
LoadError: no such file to load -- puppet/util/command_line
  require at org/jruby/RubyKernel.java:1027
  require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:51
   (root) at /usr/bin/puppet:3

Comment 8 Martin Magr 2013-07-25 12:17:36 UTC
And indeed, when I install puppet with gem, I receive the same second error:
[para@localhost manifests]$ sudo gem install puppet
Fetching: facter-1.7.2.gem (100%)
Successfully installed facter-1.7.2
Fetching: json_pure-1.8.0.gem (100%)
Successfully installed json_pure-1.8.0
Fetching: hiera-1.2.1.gem (100%)
Successfully installed hiera-1.2.1
Fetching: rgen-0.6.5.gem (100%)
Successfully installed rgen-0.6.5
Fetching: puppet-3.2.3.gem (100%)
Successfully installed puppet-3.2.3
5 gems installed
[para@localhost manifests]$ puppet apply test.pp 
/home/para/.gem/jruby/1.9/gems/puppet-3.2.3/lib/puppet/status.rb:8 warning: optional boolean argument is obsoleted
Could not retrieve virtual: Permission denied - /sys/firmware/dmi/entries/1-0/raw
Could not retrieve virtual: Illegal replacement
Could not retrieve virtual: Permission denied - /sys/firmware/dmi/entries/1-0/raw
Could not retrieve virtual: Illegal replacement
Could not retrieve virtual: Permission denied - /sys/firmware/dmi/entries/1-0/raw
Could not retrieve virtual: Illegal replacement
Warning: Could not retrieve fact fqdn
Error: Could not autoload puppet/provider/package/rpm: fork is not available on this platform
Error: Could not autoload puppet/provider/package/zypper: Could not autoload puppet/provider/package/rpm: fork is not available on this platform
Error: Could not autoload puppet/type/package: Could not autoload puppet/provider/package/zypper: Could not autoload puppet/provider/package/rpm: fork is not available on this platform
Error: Could not autoload puppet/type/package: Could not autoload puppet/provider/package/zypper: Could not autoload puppet/provider/package/rpm: fork is not available on this platform on node localhost
Error: Could not autoload puppet/type/package: Could not autoload puppet/provider/package/zypper: Could not autoload puppet/provider/package/rpm: fork is not available on this platform on node localhost

Comment 9 Martin Magr 2013-07-25 12:54:45 UTC
"sudo yum install ruby" will fix this problem ... so puppet package does not require ruby package anymore, why?

Comment 10 Kashyap Chamarthy 2013-07-27 10:30:37 UTC
(In reply to Martin Magr from comment #9)
> "sudo yum install ruby" will fix this problem ... so puppet package does not
> require ruby package anymore, why?

To me, the above doesn't alleviate the prob.

After this:
  $ gem install puppet
  $ yum install ruby -y
  $ rpm -q openstack-packstack puppet ruby
  openstack-packstack-2013.1.1-0.20.dev642.fc19.noarch
  puppet-3.1.1-4.fc19.noarch
  ruby-2.0.0.247-14.fc19.x86_64


I still notice:

  $ packstack --allinone --os-quantum-install=n

  ERROR : Error during puppet run : Error: Could not autoload puppet/provider  /package/rpm: fork is not available on this platform

Comment 11 Fedora Update System 2013-07-27 15:26:08 UTC
puppet-3.1.1-5.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/puppet-3.1.1-5.fc19

Comment 12 Sam Kottler 2013-07-27 15:49:39 UTC
I've built this fix into F20. It also affects F19 so the update process has been initiated there, too. I'm going to let the status be driven by bodhi, but this should be fixed for rawhide.

Comment 13 Sam Kottler 2013-07-27 15:51:39 UTC
*** Bug 985558 has been marked as a duplicate of this bug. ***

Comment 14 Fedora Update System 2013-07-28 01:02:15 UTC
Package puppet-3.1.1-5.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing puppet-3.1.1-5.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13740/puppet-3.1.1-5.fc19
then log in and leave karma (feedback).

Comment 15 Martin Magr 2013-07-29 10:34:04 UTC
(In reply to Kashyap Chamarthy from comment #10)
Why do you have two puppets (from gem and from rpm)? Do "gem uninstall puppet facter; yum install ruby puppet" and it should work.

Comment 16 Martin Magr 2013-07-29 10:37:17 UTC
Thinking about this you should probably also "gem uninstall jruby" since the "cannot fork" is message from it.

Comment 17 Fedora Update System 2013-08-02 21:53:28 UTC
puppet-3.1.1-5.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Matthew Miller 2013-08-06 16:02:32 UTC
*** Bug 994169 has been marked as a duplicate of this bug. ***