awx-operator icon indicating copy to clipboard operation
awx-operator copied to clipboard

Upgrade to Operator SDK v1.22.2

Open rooftopcellist opened this issue 2 years ago • 5 comments

SUMMARY

Related to https://github.com/ansible/awx-operator/pull/996

ISSUE TYPE
  • Upgrade Tooling
  • New or Enhanced Feature

rooftopcellist avatar Jul 27 '22 18:07 rooftopcellist

@rooftopcellist Hi, there was a issue with Pulp Operator that the reconciliation loop would not converge: https://github.com/pulp/pulp-operator/issues/385

In Pulp Operator, we had added ENTRYPOINT for ansible-operator with --reconcile-period=0s to Dockerfile and this arg seems to be not included in this PR: https://github.com/pulp/pulp-operator/issues/385#issuecomment-1129865619 and https://github.com/pulp/pulp-operator/pull/406 I've not confirmed if this issue occurs in 1.22, but I think this should be tested.

kurokobo avatar Aug 03 '22 16:08 kurokobo

@kurokobo thank you for the reminder to check for this. It appears to have been fixed in later versions of the operator-sdk. The reconciliation loop converges on my deployment of awx from this branch.

$ oc logs deployment/awx-operator-controller-manager -c awx-manager | grep "PLAY RECAP" -A 1
PLAY RECAP *********************************************************************
localhost                  : ok=86   changed=22   unreachable=0    failed=0    skipped=35   rescued=0    ignored=0   
--
PLAY RECAP *********************************************************************
localhost                  : ok=72   changed=0    unreachable=0    failed=0    skipped=47   rescued=0    ignored=0   

rooftopcellist avatar Aug 03 '22 18:08 rooftopcellist

@rooftopcellist Thanks for testing, good to know that. After quick investigation, I understand that the defaut reconcile-period for 1.21.0 or later was increased to 10 hours: https://github.com/operator-framework/operator-sdk/pull/5781 and https://github.com/operator-framework/operator-sdk/issues/5780

I think 10 hours is acceptable for us, but I will leave it to you whether to specify 0s or not. Thanks 😃

kurokobo avatar Aug 04 '22 00:08 kurokobo

Can I know that how long does it take for this PR to be merged ? Since we are facing many critical issue from ansible-operator:v1.12.0 (mostly come from Golang v1.16). Those issues are fixed in operator-sdk:v1.22.2, so this PR could be very potential for my team.

tu-doan avatar Aug 04 '22 05:08 tu-doan

@kurokobo thank you for pointing that out. I left my deployment up overnight and confirmed that I am seeing that behavior:

$ oc logs deployment/awx-operator-controller-manager -c awx-manager | grep "PLAY RECAP" -A 1
PLAY RECAP *********************************************************************
localhost                  : ok=86   changed=22   unreachable=0    failed=0    skipped=35   rescued=0    ignored=0   
--
PLAY RECAP *********************************************************************
localhost                  : ok=72   changed=0    unreachable=0    failed=0    skipped=47   rescued=0    ignored=0   
--
PLAY RECAP *********************************************************************
localhost                  : ok=72   changed=0    unreachable=0    failed=0    skipped=47   rescued=0    ignored=0   

I have added --reconcile-period=0s to our entrypoint because the desired behavior here is to reconcile only if a change has been made to one of the child resources or the AWX spec.

rooftopcellist avatar Aug 04 '22 13:08 rooftopcellist