Bug #1063

oneacct does not work in systemwide installations

Added by Javi Fontan over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:01/18/2012
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:CLI
Target version:-
Resolution:fixed Pull request:
Affected Versions:OpenNebula 3.2

Description

oneacct crashes at start when installed systemwide.

Reported by Rolandas Naujikas (http://lists.opennebula.org/pipermail/users-opennebula.org/2012-January/007548.html)

Opennebula is installed from package (in Debian 6.0.3).

$ oneacct
/usr/bin/oneacct:27: undefined method `+' for nil:NilClass (NoMethodError)

By looking into /usr/bin/oneacct I see:

ONE_LOCATION=ENV['ONE_LOCATION']

$: << ONE_LOCATION+'/lib/ruby'
$: << ONE_LOCATION+'/lib/ruby/cli'

What will not work if ONE_LOCATION is not set.
Setting it to ONE_LOCATION=/usr

$ ONE_LOCATION=/usr oneacct
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- acct/oneacct (LoadError)
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
       from /usr/bin/oneacct:32

So it looks like support for system wide installation in oneacct command
doesn't exists.

oneacct (5.63 KB) Javi Fontan, 01/30/2012 05:40 PM


Related issues

Duplicated by Bug #1106: wrong path in oneacct Closed 02/03/2012

Associated revisions

Revision 00deb1e4
Added by Javi Fontan over 9 years ago

bug #1063: fix oneacct for systemwide installations

Revision bb354372
Added by Javi Fontan over 9 years ago

bug #1063: fix oneacct for systemwide installations
(cherry picked from commit 00deb1e441791fabaa8e9f7cc990e51783c3f998)

History

#1 Updated by Javi Fontan over 9 years ago

  • File oneacct added
  • Status changed from Assigned to Closed
  • Resolution set to fixed

Patched oneacct command that works both in systemwide and self-contained installations is attached.

Also available in: Atom PDF