-
Bug
-
Resolution: Unresolved
-
Major
-
None
If I create an openshift secret that is synced to Jenkins, I can see the value fine.
IF I then update the secret in Openshift (oc apply -f new.yaml) I see an error in the logs :
2021-05-25 16:50:15 INFO io.fabric8.jenkins.openshiftsync.SecretWatcher modifyCredential Modifying Secret with Uid 207796ad-4cbd-4e92-b0b4-3304a19cc135 with Name changeme
2021-05-25 16:50:15 INFO io.fabric8.jenkins.openshiftsync.SecretWatcher validSecret Validating Secret with Uid 207796ad-4cbd-4e92-b0b4-3304a19cc135 with Name changeme
2021-05-2516:50:15 WARNING io.fabric8.jenkins.openshiftsync.CredentialsUtils upsertCredential Setting secret failed for secret with new Id changeme from Secret null with revision: 681558638
{{ 2021-05-25 16:50:15 WARNING io.fabric8.jenkins.openshiftsync.CredentialsUtils upsertCredential Check if Id changeme is not already used.}}
(changeme is not used and was only created a moment ago for this test)
The new version of secret does have that UID and revision (from oc get secret :
resourceVersion: "681558638"
uid: 207796ad-4cbd-4e92-b0b4-3304a19cc135 )
I think the problem is caused because it thinks the UID is "null" when it tries to get the new secret value from openshift.
[JENKINS-65712] Openshift sync doesn't update changed secrets
All comments
Pinned by
Shevangi
Hi,
Similar issue is seen in my case which was observed after an upgrade was done to jenkins from version 2.387.1 to 2.426.3.
The Openshift sync plugin version was bumped from 1.0.55 to 1.1.0.802.v45585f8cdc07
Logs:
New creation gets synced:
2024-07-01 08:49:43 INFO io.fabric8.jenkins.openshiftsync.SecretInformer onAdd Secret informer received add event for: test-sync
95882024-07-01 08:49:43 INFO io.fabric8.jenkins.openshiftsync.SecretManager insertOrUpdateCredentialFromSecret Upserting Secret with Uid d51c966e-62a2-4b07-ac6e-a5d81c7a2495 with Name test-sync
95892024-07-01 08:49:43 INFO io.fabric8.jenkins.openshiftsync.SecretManager validSecret Validating Secret with Uid d51c966e-62a2-4b07-ac6e-a5d81c7a2495 with Name test-sync
95902024-07-01 08:49:43 INFO io.fabric8.jenkins.openshiftsync.CredentialsUtils insertOrUpdateCredentialsFromSecret Updated credential null with new Id test-sync from Secret NamespaceName
with revision: 1060863905
Updation sync fails:
95912024-07-01 08:51:18 INFO io.fabric8.jenkins.openshiftsync.SecretInformer onUpdate Secret informer received update event for: test-sync
95922024-07-01 08:51:18 INFO io.fabric8.jenkins.openshiftsync.SecretManager updateCredential Modifying Secret with Uid d51c966e-62a2-4b07-ac6e-a5d81c7a2495 with Name test-sync
95932024-07-01 08:51:18 INFO io.fabric8.jenkins.openshiftsync.SecretManager validSecret Validating Secret with Uid d51c966e-62a2-4b07-ac6e-a5d81c7a2495 with Name test-sync
95942024-07-01 08:51:18 WARNING io.fabric8.jenkins.openshiftsync.CredentialsUtils insertOrUpdateCredentialsFromSecret Setting secret failed for secret with new Id test-sync from Secret null with revision: 1060865314
95952024-07-01 08:51:18 WARNING io.fabric8.jenkins.openshiftsync.CredentialsUtils insertOrUpdateCredentialsFromSecret Check if Id test-sync is not already used.
------
UPDATE--------------Have seen the same sync problem in a previous version of jenkins with the old version of plugin.
Also the sync used to work as expected with these versions from a long time..
Jenkins version: 2.387.1
Openshift-sync Plugin version: 1.0.55
Now, suspecting that this can be an effect due to some change on Openshift Platform as the jenkinses are openshift hosted