diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-11-26 16:54:44 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-11-27 14:54:32 +0300 |
commit | 6a66e4a1f116ff98d8f9b8dffa3beed62d74e0b3 (patch) | |
tree | 8482cbcee599f0c63172d2559eea37a44335d8fc /app/services | |
parent | 242baf1287302bded45164558986150ac8d9881f (diff) |
Don't remove failed install pods
We want to keep failed install pods around so that it is easier to debug
why a failure occured. With this change we also need to ensure that we
remove a previous pod with the same name before installing so that
re-install does not fail.
Another change here is that we no longer need to catch errors from
delete_pod! in CheckInstallationProgressService as we now catch the
ResourceNotFoundError in Helm::Api. The catch statement in
CheckInstallationProgressService was also probably too broad before and
should have been narrowed down simply to ResourceNotFoundError.
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/clusters/applications/check_installation_progress_service.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb index ca0f7b30053..6794580e1e8 100644 --- a/app/services/clusters/applications/check_installation_progress_service.rb +++ b/app/services/clusters/applications/check_installation_progress_service.rb @@ -29,17 +29,13 @@ module Clusters end def on_failed - app.make_errored!('Installation failed') - ensure - remove_installation_pod + app.make_errored!("Installation failed. Check pod logs for #{install_command.pod_name} for more details.") end def check_timeout if timeouted? begin - app.make_errored!('Installation timed out') - ensure - remove_installation_pod + app.make_errored!("Installation timed out. Check pod logs for #{install_command.pod_name} for more details.") end else ClusterWaitForAppInstallationWorker.perform_in( @@ -53,9 +49,6 @@ module Clusters def remove_installation_pod helm_api.delete_pod!(install_command.pod_name) - rescue => e - Rails.logger.error("Kubernetes error: #{e.class.name} #{e.message}") - # no-op end def installation_phase |