werf icon indicating copy to clipboard operation
werf copied to clipboard

Converge hands on deploy error when there is a PV with finalizer in the chart

Open distorhead opened this issue 3 years ago • 0 comments

Before proceeding

  • [X] I didn't find a similar issue

Version

1.2.175

How to reproduce

  1. Suppose there is an error in some-resource*, this error reported by the apiserver at the resource-apply stage (for example admission controller error).
  2. Deploy release first time (install release).
  3. Deploy will successfully create some resources (including PV), but will fail on creaing some-resource*.
  4. Cleanup-on-fail will try to remove successfully created resources and hang on deleting PV with finalizer
  5. No log messages will be shown why werf tries to remove resources and why it actually hangs.

Result

Converge hangs on PV removal because finalizers not empty.

Expected result

Converge reports in the log original error, and only then hangs on cleanup-on-fail procedure.

Additional information

Related source code: https://github.com/werf/3p-helm/blob/48f5b331d01d0ea62b25c3f72ca7053b744887a5/pkg/action/upgrade.go#L535

distorhead avatar Sep 28 '22 09:09 distorhead