k8s module - operator install - wait_condition does not wait for readiness of operator

24 views
Skip to first unread message

Martin Evans

unread,
Aug 6, 2021, 4:03:15 AM8/6/21
to Ansible Project
Hi,

When I am installing an Operator with a wait condition such as: 

 wait_condition: type: "CatalogSourcesUnhealthy" 
 status: "False" 
 reason: "AllCatalogSourcesHealthy" 

The role continues to the next task even when the operator is not fully ready and fails. Subsequent execution of the same role completes ok as a little time has elapsed and the operator is ready.

Task after the operator install fails with:

Error: TASK [storage_ocs : setup storage cluster] ******************************************************************************************************************************************************** fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Failed to find exact match for ocs.openshift.io/v1.StorageCluster by [kind, name, singularName, shortNames]"} 

Is there a way to check something other than CatalogSourcesUnhealthy, can I put in an short delay (not ideal but might be an acceptable workaround) ?

Running on OpenShift 4.7
Ansible 2.9.24 
I have tried both RH yum installed Ansible and pip3

And,

kubernetes.core
ommunity.kubernetes

Thanks,

Martin

Martin Evans

unread,
Aug 6, 2021, 6:49:15 AM8/6/21
to Ansible Project
As a (not ideal workaround) I have added:

- name: taking a slight pause for the Operator install to fully complete
  pause:
    minutes: 1

But I would prefer a way to check that the Operator has fully completed, especially as it may only take a few seconds.
Reply all
Reply to author
Forward
0 new messages