awx-operator
awx-operator copied to clipboard
AWXBackup Operator - when job is finished successfully, the status of running remains true and does not switch to false
Please confirm the following
- [X] I agree to follow this project's code of conduct.
- [X] I have checked the current issues for duplicates.
- [X] I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.
Bug Summary
This issue is related to the AWXBackup Operator
- When job is finished and fails, the status of running switches to false as expected.
- When job is finished successfully, the status of running remains true and does not switch to false
AWX Operator version
2.17.0
AWX version
24.4.0
Kubernetes platform
kubernetes
Kubernetes/Platform version
k3s
Modifications
no
Steps to reproduce
Run a backup to success. Then repeat and run to failure by setting an invalid deployment name. i.e.
kubectl apply -f - <<EOF
---
apiVersion: awx.ansible.com/v1beta1
kind: AWXBackup
metadata:
name: awxbackup-test
namespace: awx
spec:
deployment_name: ansible-awx
clean_backup_on_delete: True
EOF
Expected results
#Output of failed backup and running is false - kubectl get awxbackup awxbackup-fail -n awx -o yaml
creationTimestamp: "2024-05-31T19:18:53Z"
finalizers:
- awx.ansible.com/finalizer
generation: 1
labels:
app.kubernetes.io/component: awx
app.kubernetes.io/managed-by: awx-operator
app.kubernetes.io/operator-version: 2.17.0
app.kubernetes.io/part-of: awxbackup-fail
name: awxbackup-fail
namespace: awx
resourceVersion: "75300"
uid: c6ff9f31-847a-462b-b40f-880c23363959
spec:
backup_pvc: misingpvc
clean_backup_on_delete: true
deployment_name: ansible-awx
image_pull_policy: IfNotPresent
no_log: true
set_self_labels: true
status:
conditions:
- lastTransitionTime: "2024-05-31T19:19:01Z"
reason: Failed
status: "True"
type: Failure
- lastTransitionTime: "2024-05-31T19:19:01Z"
reason: ""
status: "False"
type: Successful
- lastTransitionTime: "2024-05-31T19:20:24Z"
reason: Running
status: "False"
type: Running
Actual results
#Output of successful backup, running does not change to false - kubectl get awxbackup awxbackup-fail -n awx -o yaml
Output of successful backup - kubectl get awxbackup awxbackup-succeed -n awx -o yaml
apiVersion: awx.ansible.com/v1beta1
kind: AWXBackup
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"awx.ansible.com/v1beta1","kind":"AWXBackup","metadata":{"annotations":{},"name":"awxbackup-succeed","namespace":"awx"},"spec":{"backup_pvc":"awx-backup-claim","clean_backup_on_delete":true,"deployment_name":"ansible-awx"}}
creationTimestamp: "2024-05-31T18:38:58Z"
finalizers:
- awx.ansible.com/finalizer
generation: 1
labels:
app.kubernetes.io/component: awx
app.kubernetes.io/managed-by: awx-operator
app.kubernetes.io/operator-version: 2.17.0
app.kubernetes.io/part-of: awxbackup-succeed
name: awxbackup-succeed
namespace: awx
resourceVersion: "72976"
uid: 3d3a0ce2-8157-4b97-8e06-6fa48cbf72ac
spec:
backup_pvc: awx-backup-claim
clean_backup_on_delete: true
deployment_name: ansible-awx
image_pull_policy: IfNotPresent
no_log: true
set_self_labels: true
status:
backupClaim: awx-backup-claim
backupDirectory: /backups/tower-openshift-backup-2024-05-31-183911
conditions:
- lastTransitionTime: "2024-05-31T18:39:32Z"
reason: ""
status: "False"
type: Failure
- lastTransitionTime: "2024-05-31T18:38:58Z"
reason: Successful
status: "True"
type: Running
- lastTransitionTime: "2024-05-31T18:40:10Z"
reason: Successful
status: "True"
type: Successful
Additional information
See output provided in results
Operator Logs
See outputs provided in results