diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-11-07 19:42:12 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-11-07 19:42:12 +0300 |
commit | 98762fe651ea0c4b14106166a742feaba332c128 (patch) | |
tree | f38913a92cf7338eac73f6f99e7c3cece062d0f1 /app | |
parent | bbed1b09644c01285607002f14f15620d05ff3f7 (diff) | |
parent | e587f11f2c40d281bc10fc37d8c6be9e91ae895e (diff) |
Merge branch 'more-helm-install-error-logs' into 'master'
Add more logging for errors with kubernetes on helm install
See merge request gitlab-org/gitlab-ce!22848
Diffstat (limited to 'app')
-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 |