Hi, Does somebody know what is the purpose of this line in taskomatic.rb : set_vm_vnc_port(db_vm, result.description) unless result.status != 0 We removed it to avoid 2 errors in taskomatic.log when a vm is launched : ERROR Mon Aug 30 15:23:00 +0000 2010 (26416) Task action processing failed: ActiveRecord::RecordInvalid: Validation failed: Vnc port must be greater than or equal to 0 ERROR Mon Aug 30 15:23:00 +0000 2010 (26416) /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb:1090:in `save_without_dirty!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/dirty.rb:87:in `save_without_transactions!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:200:in `save!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:182:in `transaction'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:200:in `save!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:200:in `save!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in `send'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in `method_missing'/usr/share/ovirt-server/task-omatic/./task_vm.rb:133:in `set_vm_vnc_port'/usr/share/ovirt-server/task-omatic/taskomatic.rb:426:in `task_start_vm'/usr/share/ovirt-server/task-omatic/taskomatic.rb:919:in `mainloop'/usr/share/ovirt-server/task-omatic/taskomatic.rb:905:in `each'/usr/share/ovirt-server/task-omatic/taskomatic.rb:905:in `mainloop'/usr/share/ovirt-server/task-omatic/taskomatic.rb:871:in `loop'/usr/share/ovirt-server/task-omatic/taskomatic.rb:871:in `mainloop'/usr/share/ovirt-server/task-omatic/taskomatic.rb:972 INFO Mon Aug 30 15:23:00 +0000 2010 (26416) done context : 423 # Reget the db record or you can get 'dirty' errors. This can happen in a number 424 # of places so you'll see a lot of .reloads. 425 db_vm.reload 426 set_vm_vnc_port(db_vm, result.description) unless result.status != 0 427 -- Arthur CLEMENT Linagora Paris
On Mon, Aug 30, 2010 at 05:32:58PM +0200, Arthur Cl?ment wrote:> Hi, > > Does somebody know what is the purpose of this line in taskomatic.rb : > > set_vm_vnc_port(db_vm, result.description) unless result.status != 0This is to specify what the VNC port for the specific VM is at the time it's launched. This allows for viewing the VM's output via VNC from another system. The problem there seems to be that 0 should be an acceptable port id, particularly for the first VM started. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20100830/9b642340/attachment.sig>