Bug #1080

Updated by Daniel Molina over 9 years ago

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:

<pre>
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
</pre>

Thanks Rolandas Naujikas for your feedback

Back