acctd error when monitoring pending machines
|Assignee:||Daniel Molina||% Done:|
|Target version:||Release 3.2.1|
|Affected Versions:||OpenNebula 3.2|
Sun Jan 22 13:40:57 +0200 2012 OneWatch::Accounting
/usr/lib/one/ruby/acct/accounting.rb:98:in `update_history': undefined
method `' for nil:NilClass (NoMethodError)
from /usr/lib/one/ruby/acct/accounting.rb:126:in `insert_vm'
from /usr/lib/one/ruby/acct/accounting.rb:68:in `insert'
When updating history pending machines must be ignore:
if hr = vm['HISTORY_RECORDS'] unless hr['HISTORY'].instance_of?(Array) if hr['HISTORY']['SEQ'] == seq # The VM has not moved from the Host insert_register(vm_sql, last_register, hr['HISTORY']) return
Thanks Rolandas Naujikas for your feedback
#4 Updated by Daniel Molina about 8 years ago
I have uploaded a patch that fixes this bug, or at least the one I reproduced. The error triggers when the acct daemon tries to update a VM in DONE state with no history records, for example if you start a VM and then delete it in the same accounting step.