Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWXBackup Operator - when job is finished successfully, the status of running remains true and does not switch to false #1888

Open
3 tasks done
mtcoffee opened this issue Jun 3, 2024 · 1 comment

Comments

@mtcoffee
Copy link

mtcoffee commented Jun 3, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • 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

@TimS-sva
Copy link

TimS-sva commented Jul 1, 2024

Same issue with Operator Version: 2.19.0 here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants