SGDbOps restart, minor version upgrade and security upgrade always fail on retry
Summary
SGDbOps restart, minor version upgrade and security upgrade always fail on retry
Current Behaviour
When the SGDbOps is configured with maxRetry > 0
after the first failure the operation always fails because the operation is marked prematurely with Failed.
Steps to reproduce
- Create an SGCluster
- Create a restart SGDbOps targeting the SGCluster
- Set the operator Deployment replicas to 0 after the SGDbOps Job start running
- Set the operator Deployment replicas to 1 after the SGDbOps Job fails
Expected Behavior
After any SGDbOps Job fail the SGDbOps is not marked as Failed until the number of Pod failed reach maxRetry + 1
.
Possible Solution
Class DbOpsLauncher
should not update the SGDbOps conditions to a finished state (Completed
and Failed
).
Environment
- StackGres version: 1.11.0
- Kubernetes version: *
- Cloud provider or hardware configuration: *
Edited by Matteo Melli