diff --git a/src/oca/ruby/opennebula/client.rb b/src/oca/ruby/opennebula/client.rb index 47df9cb9a5..68c05b8fd1 100644 --- a/src/oca/ruby/opennebula/client.rb +++ b/src/oca/ruby/opennebula/client.rb @@ -153,7 +153,11 @@ module OpenNebula @async = !options[:sync] timeout=nil - timeout=options[:timeout] if options[:timeout] + if options[:timeout] + timeout = options[:timeout] + elsif ENV['ONE_XMLRPC_TIMEOUT'] + timeout = ENV['ONE_XMLRPC_TIMEOUT'].to_i + end http_proxy=nil http_proxy=options[:http_proxy] if options[:http_proxy] diff --git a/src/sunstone/etc/sunstone-server.conf b/src/sunstone/etc/sunstone-server.conf index 2a72e6978f..25668a7ec5 100644 --- a/src/sunstone/etc/sunstone-server.conf +++ b/src/sunstone/etc/sunstone-server.conf @@ -25,6 +25,7 @@ # OpenNebula sever contact information # :one_xmlrpc: http://localhost:2633/RPC2 +:one_xmlrpc_timeout: 60 # Server Configuration # diff --git a/src/sunstone/sunstone-server.rb b/src/sunstone/sunstone-server.rb index 949f1efe79..7558a9691c 100755 --- a/src/sunstone/sunstone-server.rb +++ b/src/sunstone/sunstone-server.rb @@ -109,6 +109,8 @@ rescue Exception => e exit 1 end +ENV['ONE_XMLRPC_TIMEOUT'] = $conf[:one_xmlrpc_timeout].to_s unless ENV['ONE_XMLRPC_TIMEOUT'] + $conf[:debug_level] ||= 3 # Set Sunstone Session Timeout