From 7c6e890bdef2b6c94a26d1d00a84625a4e50ad11 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 4 May 2012 14:52:57 +0200 Subject: [PATCH 1/3] Feature #1229: :server: is now :host: in occi server configuration (cherry picked from commit f437bd461fbf6b9ffc972737c50c603b52d0ec98) --- src/cloud/occi/etc/occi-server.conf | 2 +- src/cloud/occi/lib/occi-server.rb | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/cloud/occi/etc/occi-server.conf b/src/cloud/occi/etc/occi-server.conf index 16f0f6ea6c..f041e6d83e 100644 --- a/src/cloud/occi/etc/occi-server.conf +++ b/src/cloud/occi/etc/occi-server.conf @@ -22,7 +22,7 @@ :one_xmlrpc: http://localhost:2633/RPC2 # Host and port where OCCI server will run -:server: localhost +:host: 127.0.0.1 :port: 4567 # SSL proxy that serves the API (set if is being used) diff --git a/src/cloud/occi/lib/occi-server.rb b/src/cloud/occi/lib/occi-server.rb index 851d58dc5c..183ef31c88 100644 --- a/src/cloud/occi/lib/occi-server.rb +++ b/src/cloud/occi/lib/occi-server.rb @@ -89,7 +89,7 @@ enable_logging OCCI_LOG, settings.config[:debug_level].to_i # Set Sinatra configuration use Rack::Session::Pool, :key => 'occi' -set :public, Proc.new { File.join(root, "ui/public") } +set :public_folder, Proc.new { File.join(root, "ui/public") } set :views, settings.root + '/ui/views' if CloudServer.is_port_open?(settings.config[:server], @@ -101,10 +101,20 @@ if CloudServer.is_port_open?(settings.config[:server], exit -1 end -set :bind, settings.config[:server] +host = settings.config[:host] || settings.config[:server] +set :bind, host + +if settings.config[:server] + warning = "Warning: :server: configuration parameter has been deprecated." + warning << " Use :host: instead." + settings.logger.error warning +end + set :port, settings.config[:port] + + # Create CloudAuth begin ENV["ONE_CIPHER_AUTH"] = OCCI_AUTH From 7cea1aeb5abb0bc4cab64f08aac84176aa5b2b28 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Mon, 23 Jan 2012 16:05:01 +0100 Subject: [PATCH 2/3] Adding status command to be LSB compliant --- share/etc/init.d/one.debian | 5 ++++- share/etc/init.d/one.ubuntu | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/share/etc/init.d/one.debian b/share/etc/init.d/one.debian index 7b75fffcaf..2d98d6ceb8 100755 --- a/share/etc/init.d/one.debian +++ b/share/etc/init.d/one.debian @@ -64,6 +64,9 @@ case "$1" in 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; + status) + status_of_proc "oned" "$NAME" && exit 0 || exit $? + ;; restart|force-reload) # # If the "reload" option is implemented then remove the @@ -87,7 +90,7 @@ case "$1" in esac ;; *) - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 exit 3 ;; esac diff --git a/share/etc/init.d/one.ubuntu b/share/etc/init.d/one.ubuntu index 7b75fffcaf..2d98d6ceb8 100755 --- a/share/etc/init.d/one.ubuntu +++ b/share/etc/init.d/one.ubuntu @@ -64,6 +64,9 @@ case "$1" in 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; + status) + status_of_proc "oned" "$NAME" && exit 0 || exit $? + ;; restart|force-reload) # # If the "reload" option is implemented then remove the @@ -87,7 +90,7 @@ case "$1" in esac ;; *) - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 exit 3 ;; esac From 021cfd6fcd6f3cad32327d4a31c6d9788a6f859b Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 5 May 2012 03:23:37 +0200 Subject: [PATCH 3/3] feature #1243: Fix compilation warning --- src/dm/DispatchManagerActions.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/dm/DispatchManagerActions.cc b/src/dm/DispatchManagerActions.cc index f573c3218d..dc3e702bad 100644 --- a/src/dm/DispatchManagerActions.cc +++ b/src/dm/DispatchManagerActions.cc @@ -602,9 +602,6 @@ int DispatchManager::resched(int vid, bool do_resched) if (vm->get_state() == VirtualMachine::ACTIVE && vm->get_lcm_state() == VirtualMachine::RUNNING ) { - Nebula& nd = Nebula::instance(); - LifeCycleManager * lcm = nd.get_lcm(); - vm->set_resched(do_resched); vmpool->update(vm); }