Bug 2065713
| Summary: | ZTP sync failure leaves lock in place, subsequent syncs hang waiting to obtain lock | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Ian Miller <imiller> | |
| Component: | Telco Edge | Assignee: | Vitaly Grinberg <vgrinber> | |
| Telco Edge sub component: | ZTP | QA Contact: | yliu1 | |
| Status: | CLOSED ERRATA | Docs Contact: | ||
| Severity: | urgent | |||
| Priority: | unspecified | CC: | jgato, mcornea, shreepat, vgrinber | |
| Version: | 4.9 | |||
| Target Milestone: | --- | |||
| Target Release: | 4.9.z | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2066102 (view as bug list) | Environment: | ||
| Last Closed: | 2022-04-11 17:20:54 UTC | Type: | Bug | |
| 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: | 2066102 | |||
| Bug Blocks: | ||||
|
Description
Ian Miller
2022-03-18 14:54:39 UTC
*** Bug 2069066 has been marked as a duplicate of this bug. *** Issue can be resolved by updating the post-sync.yaml hooks within the monitored git repository (one each in the directories containing SiteConfig and PolicyGenTemplate files). The argocd.argoproj.io/hook annotation needs to be updated to include SyncFail:
argocd.argoproj.io/hook: PostSync,SyncFail
Verified in release-4.9 branch. And added additional configs in PGT to verify it after a failed sync. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (4.9 27 Stream bugfixes for Telco RAN), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1219 (In reply to Ian Miller from comment #2) > Issue can be resolved by updating the post-sync.yaml hooks within the > monitored git repository (one each in the directories containing SiteConfig > and PolicyGenTemplate files). The argocd.argoproj.io/hook annotation needs > to be updated to include SyncFail: > > argocd.argoproj.io/hook: PostSync,SyncFail Once the bug has been fixed, is still need it to add the SyncFail? Yes. The fix for this issue is to trigger the post-sync logic when the argocd sync fails. To do this the SyncFail must be added. Hit This issue in Test harness: OC 4.10 SNO 4.9.29 and 4.9.25 ZTP 4.9.42 (registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.9.0-42) ztp-hooks.presync Mon, 02 May 2022 20:56:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock 1 ztp-hooks.presync Mon, 02 May 2022 20:57:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock Can you please provide the "post-sync.yaml" file from the git repository which is being synchronized? hreepat@infra1 site-policies]$ cat post-sync.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: policygentemplates-post
namespace: policies-sub
generateName: post-sync-
annotations:
argocd.argoproj.io/hook: PostSync,SyncFail
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
spec:
template:
spec:
containers:
- name: ztp-site-generator
image: registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.9.0-42
command: ["/bin/bash", "post-sync-entrypoint.sh", "policygentemplates"]
restartPolicy: Never
backoffLimit: 0
# ttlSecondsAfterFinished: 60
the workaround not working
a) oc delete -n clusters-sub openshift-ztp-lock
or
post-sync
annotations:
argocd.argoproj.io/hook: PostSync,SyncFail
ztp-hooks.presync Mon, 02 May 2022 21:30:55 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:31:55 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:32:55 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:33:55 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:34:55 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:35:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:36:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:37:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:38:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:39:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:40:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:41:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:42:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:43:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:44:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:45:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:46:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:47:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:48:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:49:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:50:56 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:51:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:52:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:53:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:54:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:55:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:56:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:57:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:58:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 21:59:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:00:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:01:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:02:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:03:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:04:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:05:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:06:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:07:57 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:08:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:09:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:10:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:11:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:12:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:13:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:14:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:15:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:16:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:17:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:18:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:19:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:20:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:21:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:22:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:23:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:24:58 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
ztp-hooks.presync Mon, 02 May 2022 22:25:59 +0000 INFO [pre-sync-entrypoint] Waiting to acquire sync lock
^C
[kni@infra1 ~]$ oc get pods
NAME READY STATUS RESTARTS AGE
policygentemplates-pre-tjh4c 1/1 Running 0 70m
(In reply to shreepat from comment #12, #13) > hreepat@infra1 site-policies]$ cat post-sync.yaml > apiVersion: batch/v1 > kind: Job > metadata: > name: policygentemplates-post > namespace: policies-sub > generateName: post-sync- > annotations: > argocd.argoproj.io/hook: PostSync,SyncFail ------------------------------------ > the workaround not working > > a) oc delete -n clusters-sub openshift-ztp-lock > > or > > post-sync > annotations: > argocd.argoproj.io/hook: PostSync,SyncFail Hi, it seems the lock was deleted in the "clusters-sub" namespace, but the pod waiting on the lock is in the policies-sub namespace. |