search for: vmhosthistory

Displaying 3 results from an estimated 3 matches for "vmhosthistory".

2009 Aug 10
0
[PATCH server] Fixed db-omatic so it doesn't die due to unhandled exceptions related to saving db objects in update_host_state and update_domain_state.
...c/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -160,7 +160,9 @@ class DbOmatic < Qpid::Qmf::Console end begin - # find open vm host history for this vm, + # find open vm host history for this vm + # NOTE: db-omatic is currently the only user for VmHostHistory, so + # using optimistic locking is fine. Someday this might need changing. history = VmHostHistory.find(:first, :conditions => ["vm_id = ? AND time_ended is NULL", vm.id]) if state == Vm::STATE_RUNNING @@ -215,7 +217,14 @@ class DbOmatic < Qpid::Qmf...
2009 Jul 13
0
[PATCH server] remove vm forward vnc and vm host history
...ecord::Base has_many :smart_pool_tags, :as => :tagged, :dependent => :destroy has_many :smart_pools, :through => :smart_pool_tags - # reverse cronological collection of vm history - # each collection item contains vm that was running on host - # time started, and time ended (see VmHostHistory) - has_many :vm_host_histories, - :order => 'time_started DESC', - :dependent => :destroy - - alias history vm_host_histories - acts_as_xapian :texts => [ :hostname, :uuid, :hypervisor_type, :arch ], :values => [ [ :created_at, 0, &quot...
2009 Aug 10
1
[PATCH server] Fixed db-omatic so it doesn't die due to an unhandled ActiveRecord::StaleObjectError exception.
...c/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -160,7 +160,9 @@ class DbOmatic < Qpid::Qmf::Console end begin - # find open vm host history for this vm, + # find open vm host history for this vm + # NOTE: db-omatic is currently the only user for VmHostHistory, so + # using optimistic locking is fine. Someday this might need changing. history = VmHostHistory.find(:first, :conditions => ["vm_id = ? AND time_ended is NULL", vm.id]) if state == Vm::STATE_RUNNING @@ -215,7 +217,14 @@ class DbOmatic < Qpid::Qmf...