Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2066102

Summary: ZTP sync failure leaves lock in place, subsequent syncs hang waiting to obtain lock
Product: OpenShift Container Platform Reporter: Vitaly Grinberg <vgrinber>
Component: Telco EdgeAssignee: Ian Miller <imiller>
Telco Edge sub component: ZTP QA Contact: yliu1
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: urgent    
Priority: unspecified CC: imiller, jgato, vgrinber, yliu1
Version: 4.9   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2065713 Environment:
Last Closed: 2022-03-20 19:05:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2065713    

Description Vitaly Grinberg 2022-03-20 19:04:38 UTC
+++ This bug was initially created as a clone of Bug #2065713 +++

Description of problem:
If the argocd sync fails the mutex lock put in place by the pre-sync-entrypoint remains in place even though the argocd sync is completed. This causes all subsequent sync processes to hang waiting for the lock

Version-Release number of selected component (if applicable): 4.9.0-42


How reproducible: 100%


Steps to Reproduce:
1. Ensure hub cluster does not have namespace "test123"
2. Create SiteConfig CR with namepaces "test123"
3. Push new SiteConfig CR to git
4. Pre-sync hook runs OK, sync fails with "cannot apply one or more resources"
5. All subsequent syncs will cause pre-sync hook to hang "waiting for lock"

Actual results: 
ConfigMap openshift-ztp-lock in clusters-sub namespace remains defined when argocd sync fails.


Expected results:
openshift-ztp-lock configmap gets deleted when sync phase is complete (even in failure)

Additional info:
Workaround: oc delete -n clusters-sub openshift-ztp-lock