This patch increases the timeout value on taskomatic calls so that we
get back the real libvirt errors instead of just having qmf timeout.
Signed-off-by: Ian Main <imain at redhat.com>
---
src/task-omatic/task_storage.rb | 6 +++---
src/task-omatic/taskomatic.rb | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/task-omatic/task_storage.rb b/src/task-omatic/task_storage.rb
index 77363ac..8165818 100644
--- a/src/task-omatic/task_storage.rb
+++ b/src/task-omatic/task_storage.rb
@@ -132,7 +132,7 @@ class LibvirtPool
if @remote_pool == nil
@logger.debug("Defining new storage pool: #{@xml.to_s} on host:
#{node.hostname}")
- result = node.storagePoolDefineXML(@xml.to_s, :timeout => 60 * 2)
+ result = node.storagePoolDefineXML(@xml.to_s, :timeout => 60 * 10)
raise "Error creating pool: #{result.text}" unless
result.status == 0
@remote_pool = session.object(:object_id => result.pool)
raise "Error finding newly created remote pool." unless
@remote_pool
@@ -141,7 +141,7 @@ class LibvirtPool
# destroy existing data
if @build_on_start
@logger.debug("Building remote pool #{@remote_pool.name}")
- result = @remote_pool.build(:timeout => 60 * 2)
+ result = @remote_pool.build(:timeout => 60 * 10)
raise "Error building pool: #{result.text}" unless
result.status == 0
end
@remote_pool_defined = true
@@ -155,7 +155,7 @@ class LibvirtPool
if @remote_pool.state == "inactive"
# only try to start the pool if it is currently inactive; in all other
# states, assume it is already running
- result = @remote_pool.create(:timeout => 60 * 2)
+ result = @remote_pool.create(:timeout => 60 * 10)
raise "Error defining pool: #{result.text}" unless
result.status == 0
# Refresh qpid object with new properties.
diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
index 6e21160..b3c0592 100755
--- a/src/task-omatic/taskomatic.rb
+++ b/src/task-omatic/taskomatic.rb
@@ -258,14 +258,14 @@ class TaskOmatic
# libvirt-qpid sets parentVolume to the name of the parent volume
# if this is an LVM pool, else it leaves it empty.
if pool.parentVolume != ''
- result = pool.destroy
- result = pool.undefine
+ result = pool.destroy(:timeout => 60 * 2)
+ result = pool.undefine(:timeout => 60 * 2)
end
end
pools.each do |pool|
- result = pool.destroy
- result = pool.undefine
+ result = pool.destroy(:timeout => 60 * 2)
+ result = pool.undefine(:timeout => 60 * 2)
end
end
@@ -534,7 +534,7 @@ class TaskOmatic
dest_uri = "qemu+tcp://" + dest_node.hostname +
"/system"
@logger.debug("Migrating from #{src_uri} to #{dest_uri}")
- result = vm.migrate(dest_uri, Libvirt::Domain::MIGRATE_LIVE, '',
'', 0, :timeout => 60 * 4)
+ result = vm.migrate(dest_uri, Libvirt::Domain::MIGRATE_LIVE, '',
'', 0, :timeout => 60 * 10)
@logger.error "Error migrating VM: #{result.text}" unless
result.status == 0
# undefine can fail, for instance, if we live migrated from A -> B,
and
--
1.6.0.6