diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-11-06 19:35:34 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-11-06 19:35:34 +0300 |
commit | e587f11f2c40d281bc10fc37d8c6be9e91ae895e (patch) | |
tree | e8e4b4f987f426525d30f5cc3811bc54e8cbf1de /app/services | |
parent | 6e9179ab461c0100f3e870c655fa566a782e0f9a (diff) |
Add more logging for errors with kubernetes on helm install
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/clusters/applications/check_installation_progress_service.rb | 6 | ||||
-rw-r--r-- | app/services/clusters/applications/install_service.rb | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb index 5017fa093f3..19dc0478591 100644 --- a/app/services/clusters/applications/check_installation_progress_service.rb +++ b/app/services/clusters/applications/check_installation_progress_service.rb @@ -14,7 +14,8 @@ module Clusters else check_timeout end - rescue Kubeclient::HttpError + rescue Kubeclient::HttpError => e + Rails.logger.error "Kubernetes error: #{e.class.name} #{e.message}" app.make_errored!("Kubernetes error") unless app.errored? end @@ -51,7 +52,8 @@ module Clusters def remove_installation_pod helm_api.delete_pod!(install_command.pod_name) - rescue + rescue => e + Rails.logger.error "Kubernetes error: #{e.class.name} #{e.message}" # no-op end diff --git a/app/services/clusters/applications/install_service.rb b/app/services/clusters/applications/install_service.rb index dd8d2ed5eb6..5a24d78e712 100644 --- a/app/services/clusters/applications/install_service.rb +++ b/app/services/clusters/applications/install_service.rb @@ -12,9 +12,11 @@ module Clusters ClusterWaitForAppInstallationWorker.perform_in( ClusterWaitForAppInstallationWorker::INTERVAL, app.name, app.id) - rescue Kubeclient::HttpError + rescue Kubeclient::HttpError => e + Rails.logger.error "Kubernetes error: #{e.class.name} #{e.message}" app.make_errored!("Kubernetes error.") - rescue StandardError + rescue StandardError => e + Rails.logger.error "Can't start installation process: #{e.class.name} #{e.message}" app.make_errored!("Can't start installation process.") end end |