From: Tomas Sedovic <tsedovic(a)redhat.com>
When a user attempted to launch a deployment with launch-time parameters set
and the config server was not available, Conductor displayed a rather cryptic
message.
This replaces it with a more properly worded text.
---
src/app/models/deployment.rb | 8 +++++++-
src/config/locales/en.yml | 4 +++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index 294df0f..e75c113 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -248,7 +248,13 @@ class Deployment < ActiveRecord::Base
task = InstanceTask.create!({:user => user,
:task_target => instance,
:action => InstanceTask::ACTION_CREATE})
- config_server.send_config(config) if deployable_xml.requires_config_server?
+ if deployable_xml.requires_config_server?
+ begin
+ config_server.send_config(config)
+ rescue Errno::ECONNREFUSED
+ raise I18n.t 'deployments.errors.config_server_connection'
+ end
+ end
Taskomatic.create_instance(task)
if task.state == Task::STATE_FAILED
status[:errors][assembly_name] = 'failed'
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 811d4a4..d639399 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -228,6 +228,8 @@ en:
updated:
one: "The deployment %{list} was successfully updated."
other: "The deployments %{list} were successfully updated."
+ errors:
+ config_server_connection: 'Cannot connect to the config server'
instances:
instances: Instances
instance: Instance
@@ -755,4 +757,4 @@ en:
admin_tabs:
catalogs: Catalogs
realms: Realms
- hardware: Hardware
\ No newline at end of file
+ hardware: Hardware
--
1.7.6.4
Show replies by date