From 6491d1f671a9616a7fe5fae213a8b95a93c2f381 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Thu, 11 Nov 2010 15:17:46 +0100 Subject: [PATCH 1/6] MANAGER_TIMER description in oned.conf (cherry picked from commit 19ce20ed10c5792672669e8fdc1d3e84c2b92cf4) --- share/etc/oned.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/etc/oned.conf b/share/etc/oned.conf index 35dfd523e1..9216730c55 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -5,7 +5,11 @@ #******************************************************************************* # Daemon configuration attributes #------------------------------------------------------------------------------- -# HOST_MONITORING_INTERVAL: Time in seconds between host monitorization +# MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions. +# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL can not have smaller values +# than MANAGER_TIMER. +# +# HOST_MONITORING_INTERVAL: Time in seconds between host monitorization. # # VM_POLLING_INTERVAL: Time in seconds between virtual machine monitorization. # (use 0 to disable VM monitoring). @@ -29,6 +33,8 @@ # DEBUG_LEVEL: 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG #******************************************************************************* +#MANAGER_TIMER=30 + HOST_MONITORING_INTERVAL = 600 VM_POLLING_INTERVAL = 600 From fc56158f815b69c093c7f1f14e9d4394d1337489 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Fri, 12 Nov 2010 14:12:12 +0100 Subject: [PATCH 2/6] feature #403: Clarify the explanation for -k flag in install.sh --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 819e31f269..4d6059e806 100755 --- a/install.sh +++ b/install.sh @@ -34,7 +34,9 @@ usage() { echo "-u: user that will run opennebula, defults to user executing install.sh" echo "-g: group of the user that will run opennebula, defults to user" echo " executing install.sh" - echo "-k: keep current configuration files, useful when upgrading" + echo "-k: keep configuration files of existing OpenNebula installation, useful" + echo " when upgrading. This flag should not be set when installing" + echo " OpenNebula for the first time" echo "-d: target installation directory, if not defined it'd be root. Must be" echo " an absolute path." echo "-c: install only 'occi' or 'ec2' client files" From a801dbbc8e1c277737e6442526c61e2956707144 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sun, 14 Nov 2010 23:22:57 +0100 Subject: [PATCH 3/6] removed comments --- src/tm_mad/lvm/tm_context.sh | 3 --- src/tm_mad/nfs/tm_context.sh | 3 --- src/tm_mad/ssh/tm_context.sh | 3 --- 3 files changed, 9 deletions(-) diff --git a/src/tm_mad/lvm/tm_context.sh b/src/tm_mad/lvm/tm_context.sh index 417c82e78d..0e8448f8b9 100755 --- a/src/tm_mad/lvm/tm_context.sh +++ b/src/tm_mad/lvm/tm_context.sh @@ -16,9 +16,6 @@ # limitations under the License. # #--------------------------------------------------------------------------- # -# Parameters: a b c d e f g h -# SRC: a b c d e f g -# DST: h while (( "$#" )); do if [ "$#" == "1" ]; then DST=$1 diff --git a/src/tm_mad/nfs/tm_context.sh b/src/tm_mad/nfs/tm_context.sh index b6c515dc4d..d511779f02 100755 --- a/src/tm_mad/nfs/tm_context.sh +++ b/src/tm_mad/nfs/tm_context.sh @@ -16,9 +16,6 @@ # limitations under the License. # #--------------------------------------------------------------------------- # -# Parameters: a b c d e f g h -# SRC: a b c d e f g -# DST: h while (( "$#" )); do if [ "$#" == "1" ]; then DST=$1 diff --git a/src/tm_mad/ssh/tm_context.sh b/src/tm_mad/ssh/tm_context.sh index 417c82e78d..0e8448f8b9 100755 --- a/src/tm_mad/ssh/tm_context.sh +++ b/src/tm_mad/ssh/tm_context.sh @@ -16,9 +16,6 @@ # limitations under the License. # #--------------------------------------------------------------------------- # -# Parameters: a b c d e f g h -# SRC: a b c d e f g -# DST: h while (( "$#" )); do if [ "$#" == "1" ]; then DST=$1 From d37c50a6d11425252c5fe6f22adf6d6969c2b680 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 13 Nov 2010 01:12:11 +0100 Subject: [PATCH 4/6] bug #399: Changed ARCHITECURE for ARCH in VMware to make it coherent with KVM driver (cherry picked from commit 4b006499ab577bcdf2638576953808ab656959e7) --- src/vmm/LibVirtDriverVMware.cc | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/vmm/LibVirtDriverVMware.cc b/src/vmm/LibVirtDriverVMware.cc index 1429d73c46..84447fc4e1 100644 --- a/src/vmm/LibVirtDriverVMware.cc +++ b/src/vmm/LibVirtDriverVMware.cc @@ -132,26 +132,24 @@ int LibVirtDriver::deployment_description_vmware( if( os != 0 ) { - arch = os->vector_value("ARCHITECTURE"); + arch = os->vector_value("ARCH"); } } + if ( arch.empty() ) + { + get_default("OS","ARCH",arch); + + if (arch.empty()) + { + goto error_vmware_arch; + } + } // Start writing to the file with the info we got file << "\t" << endl; - - if ( arch.empty() ) - { - get_default("OS","ARCHITECTURE",arch); - } - - if (arch.empty()) - { - goto error_vmware_arch; - } - file << "\t\thvm" << endl; file << "\t" << endl; @@ -245,7 +243,7 @@ int LibVirtDriver::deployment_description_vmware( } attrs.clear(); - + // ------------------------------------------------------------------------ // Context Device // ------------------------------------------------------------------------ @@ -329,7 +327,7 @@ int LibVirtDriver::deployment_description_vmware( } attrs.clear(); - + file << "\t" << endl; // ------------------------------------------------------------------------ @@ -369,7 +367,7 @@ error_vmware_file: return -1; error_vmware_arch: - vm->log("VMM", Log::ERROR, "No ARCHITECTURE defined and no default provided."); + vm->log("VMM", Log::ERROR, "No ARCH defined and no default provided."); file.close(); return -1; @@ -383,4 +381,3 @@ error_vmware_disk: file.close(); return -1; } - From 8d2cab1c43d80d542aa9fa324ebaaa0d2658aa70 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Thu, 18 Nov 2010 17:38:37 +0100 Subject: [PATCH 5/6] bug #381: Fix REXML XML formatting compatibility with ruby 1.8.5 --- src/oca/ruby/OpenNebula/XMLUtils.rb | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/oca/ruby/OpenNebula/XMLUtils.rb b/src/oca/ruby/OpenNebula/XMLUtils.rb index 261e447b8c..59938e8f18 100644 --- a/src/oca/ruby/OpenNebula/XMLUtils.rb +++ b/src/oca/ruby/OpenNebula/XMLUtils.rb @@ -7,6 +7,13 @@ module OpenNebula rescue LoadError NOKOGIRI=false end + + begin + require 'rexml/formatters/default' + REXML_FORMATTERS=true + rescue LoadError + REXML_FORMATTERS=false + end ########################################################################### # The XMLElement class provides an abstraction of the underlying @@ -176,17 +183,18 @@ module OpenNebula end def to_xml(pretty=false) - if NOKOGIRI - @xml.to_xml + if NOKOGIRI && pretty + str = @xml.to_xml + elsif REXML_FORMATTERS && pretty + str = String.new + formatter = REXML::Formatters::Pretty.new + formatter.compact = true + str = formatter.write(@xml,str) else - str = "" - if pretty - REXML::Formatters::Pretty.new(1).write(@xml,str) - else - REXML::Formatters::Default.new.write(@xml,str) - end - str + str = @xml.to_s end + + return str end end From bceeecc7515bb5a0ab9ebc18e70a28402f1e0a3f Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Fri, 19 Nov 2010 13:33:37 +0100 Subject: [PATCH 6/6] bug #381: require pretty formatter --- src/oca/ruby/OpenNebula/XMLUtils.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/oca/ruby/OpenNebula/XMLUtils.rb b/src/oca/ruby/OpenNebula/XMLUtils.rb index 59938e8f18..9444a4c098 100644 --- a/src/oca/ruby/OpenNebula/XMLUtils.rb +++ b/src/oca/ruby/OpenNebula/XMLUtils.rb @@ -7,9 +7,9 @@ module OpenNebula rescue LoadError NOKOGIRI=false end - + begin - require 'rexml/formatters/default' + require 'rexml/formatters/pretty' REXML_FORMATTERS=true rescue LoadError REXML_FORMATTERS=false @@ -187,13 +187,15 @@ module OpenNebula str = @xml.to_xml elsif REXML_FORMATTERS && pretty str = String.new + formatter = REXML::Formatters::Pretty.new formatter.compact = true - str = formatter.write(@xml,str) + + formatter.write(@xml,str) else str = @xml.to_s end - + return str end end