зеркало из https://github.com/mozilla/labs-vcap.git
Fix couple of bugs
o vcap stop used to fail trying to load config file for components that were never running on this host o Start cloud controller before the health manager. Change-Id: I103685396e332faf0a7eeb9173e2ca6721fdd744
This commit is contained in:
Родитель
57a0c66ac0
Коммит
bf9dca4415
|
@ -265,9 +265,9 @@ module Run
|
|||
components(args).each(&:start)
|
||||
end
|
||||
|
||||
def self.stop_cleanup
|
||||
def self.stop_cleanup(args)
|
||||
# Only process this if no one else running..
|
||||
running_components = components([]).select {|c| c.running?}.map{|c| c.name }
|
||||
running_components = components(args).select {|c| c.running?}.map{|c| c.name }
|
||||
return unless running_components.empty?
|
||||
nats_server = NatsServer.new
|
||||
return unless nats_server.is_running?
|
||||
|
@ -276,7 +276,7 @@ module Run
|
|||
|
||||
def self.stop(args)
|
||||
components(args).each(&:stop)
|
||||
self.stop_cleanup
|
||||
self.stop_cleanup(args)
|
||||
end
|
||||
|
||||
def self.restart(args)
|
||||
|
|
|
@ -50,6 +50,11 @@ if vcap_components["components"].include?("cloud_controller")
|
|||
puts "Setting up cloud controller environment"
|
||||
ENV["CLOUD_CONTROLLER_CONFIG"]=File.join(deployment_config_path, "cloud_controller.yml")
|
||||
ENV["RAILS_ENV"]="production"
|
||||
|
||||
# Start the cloud controller component first as other components like the
|
||||
# health manager depend on it. Specifically, the health manager uses the same
|
||||
# database as the one used by the cloud controller.
|
||||
vcap_components["components"].unshift(vcap_components["components"].delete("cloud_controller"))
|
||||
end
|
||||
|
||||
# Set both http_proxy and HTTP_PROXY
|
||||
|
|
Загрузка…
Ссылка в новой задаче