Commit 98762fe6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents bbed1b09 e587f11f
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment