Bug 2040810 - Jenkins purges PodTemplates after OpenShift sync
Summary: Jenkins purges PodTemplates after OpenShift sync
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Jenkins
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Alice Rum
QA Contact: Jitendar Singh
URL:
Whiteboard:
: 2043084 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-14 18:17 UTC by jamieclinton
Modified: 2022-05-17 08:08 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-31 12:11:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2038960 1 unspecified CLOSED Jenkins sync plugin does not synchronize ConfigMap having label role=jenkins-agent 2022-02-01 12:44:50 UTC

Description jamieclinton 2022-01-14 18:17:34 UTC
Description of problem:

After adding PodTemplates to a running instance of Jenkins by creating OpenShift ConfigMaps, the OpenShift Sync plugin correctly syncs the new PodTemplates, which can be successfully run in a pipeline. However, the PodTemplates are eventually purged from Jenkins. The workaround is to delete each ConfigMap in OpenShift, and then recreate it so that OpenShift syncs it again, at least until the next time it gets purged.  


Version-Release number of selected component (if applicable):
OpenShift v4.8.22
Jenkins v4.8.0
OpenShift Sync plugin v1.0.50


How reproducible:
Always

Steps to Reproduce:
1. Start Jenkins
2. Create PodTemplate by creating a new ConfigMap in OpenShift
3. Wait for some period of time (indeterminate, but typically within an hour)
4. PodTemplate gets purged by Jenkins 

Actual results:
PodTemplate is purged and is no longer recognized by Jenkins pipeline.

Expected results:
PodTemplate should stay around indefinitely

Additional info:
For example, when our 'cluster-pipeline' PodTemplate gets purged, the Jenkins console shows the following:

[...]
Still waiting to schedule task
‘Jenkins’ doesn’t have label ‘cluster-pipeline’
[...]

The Jenkins logs show the following when the PodTemplate gets purged. It always seems to happen right after the "io.fabric8.kubernetes.client.WatcherException: too old resource version" warning shown below, followed by the info message "Purging PodTemplates for from Configmap...":

[...]
2022-01-05 23:25:20 INFO    io.fabric8.jenkins.openshiftsync.PodTemplateUtils removePodTemplate Removing PodTemplate: cluster-pipeline in namespace:  null
2022-01-05 23:25:20 INFO    io.fabric8.jenkins.openshiftsync.PodTemplateUtils removePodTemplate Removing PodTemplate: cluster-pipeline in namespace:  null
2022-01-05 23:25:20 INFO    io.fabric8.jenkins.openshiftsync.PodTemplateUtils removePodTemplate Removing PodTemplate: cluster-pipeline in namespace:  null
2022-01-05 23:25:20 INFO    io.fabric8.jenkins.openshiftsync.PodTemplateUtils addPodTemplate Adding PodTemplate: cluster-pipeline
2022-01-05 23:25:48 WARNING org.jenkinsci.plugins.prometheus.DiskUsageCollector collect Cannot get disk usage data. Install CloudBees Disk Usage Simple plugin to enable
2022-01-05 23:27:48 WARNING org.jenkinsci.plugins.prometheus.DiskUsageCollector collect Cannot get disk usage data. Install CloudBees Disk Usage Simple plugin to enable
2022-01-05 23:28:13 WARNING io.fabric8.kubernetes.client.informers.cache.ReflectorWatcher onClose Watch closing with exception
io.fabric8.kubernetes.client.WatcherException: too old resource version: 108348809 (108377455)
	at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$TypedWatcherWebSocketListener.onMessage(WatchConnectionManager.java:103)
	at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323)
	at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274)
	at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: too old resource version: 108348809 (108377455)
	... 11 more

2022-01-05 23:28:13 INFO    io.fabric8.jenkins.openshiftsync.PodTemplateUtils purgeTemplates Purging PodTemplates for from Configmap with Uid 50b42ece-b630-44e6-a9e6-294a719f61ad
2022-01-05 23:28:13 INFO    io.fabric8.jenkins.openshiftsync.PodTemplateUtils removePodTemplate Removing PodTemplate: cluster-pipeline in namespace:  null
[...]

I tried upgrading to OpenShift Sync plugin v1.0.52 from the Jenkins console, but after installing it and restarting, OpenShift Sync stops working altogether and shows the following errors in the Jenkins logs:

[...]
2022-01-12 23:15:10 INFO    io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration configChange OpenShift Sync Plugin processing a newly supplied configuration
2022-01-12 23:15:10 INFO    io.fabric8.jenkins.openshiftsync.OpenShiftUtils shutdownOpenShiftClient Stopping openshift client: null
2022-01-12 23:15:10 INFO    io.fabric8.jenkins.openshiftsync.OpenShiftUtils initializeOpenShiftClient Current OpenShift Client Configuration: io.fabric8.openshift.client.OpenShiftConfig@38330e01[oapiVersion=v1,openShiftUrl=https://kubernetes.default:443/oapi/v1/,buildTimeout=300000,openshiftApiGroupsEnabled=false,disableApiGroupCheck=false,trustCerts=true,disableHostnameVerification=false,masterUrl=https://kubernetes.default:443/,apiVersion=v1,namespace=jenkins-test,caCertFile=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt,caCertData=<null>,clientCertFile=<null>,clientCertData=<null>,clientKeyFile=<null>,clientKeyData=<null>,clientKeyAlgo=<null>,clientKeyPassphrase=changeit,trustStoreFile=<null>,trustStorePassphrase=<null>,keyStoreFile=<null>,keyStorePassphrase=<null>,authProvider=<null>,requestConfig=io.fabric8.kubernetes.client.RequestConfig@5b8d45c8,contexts=[],currentContext=<null>,username=<null>,password=<null>,oauthToken=<null>,watchReconnectInterval=1000,watchReconnectLimit=-1,connectionTimeo...
2022-01-12 23:15:11 INFO    io.fabric8.jenkins.openshiftsync.OpenShiftUtils initializeOpenShiftClient New OpenShift client initialized: io.fabric8.openshift.client.DefaultOpenShiftClient@70142724
2022-01-12 23:15:11 WARNING hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error Failed to instantiate Key[type=io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration, annotation=[none]]; skipping this component
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoSuchMethodError: 'okhttp3.OkHttpClient io.fabric8.openshift.client.DefaultOpenShiftClient.getHttpClient()'
  at io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration.<init>(GlobalPluginConfiguration.java:109)

1 error
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
	at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:441)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
	at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:401)
	at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:392)
	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:349)
	at hudson.ExtensionList.load(ExtensionList.java:382)
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
	at hudson.ExtensionList.iterator(ExtensionList.java:170)
	at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1637)
	at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:2128)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
	at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:180)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1158)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NoSuchMethodError: 'okhttp3.OkHttpClient io.fabric8.openshift.client.DefaultOpenShiftClient.getHttpClient()'
	at io.fabric8.jenkins.openshiftsync.OpenShiftUtils.initializeOpenShiftClient(OpenShiftUtils.java:153)
	at io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration.start(GlobalPluginConfiguration.java:128)
	at io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration.configChange(GlobalPluginConfiguration.java:123)
	at io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration.<init>(GlobalPluginConfiguration.java:111)
	at io.fabric8.jenkins.openshiftsync.GlobalPluginConfiguration$$FastClassByGuice$$7bc306ea.newInstance(<generated>)
	at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
	at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
	at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
	at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)
	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
	at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:568)
	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	... 28 more
[...]

Comment 1 Adam Kaplan 2022-01-18 16:05:42 UTC
I think the stack trace is 1.0.52 is due to the dependencies of the sync plugin not being upgraded. Given the challenges of managing dependencies in the plugin manager, we tend to prefer that folks wait for our official image to be updated.

We believe this issue will be addressed once the 1.0.52 update merges, but will verify this before closing.

Comment 2 jamieclinton 2022-01-18 19:32:07 UTC
I've also noticed that, similarly, OpenShift Secrets that were previously synced are also getting periodically removed by Jenkins. Snippet of Jenkins log below: 

[...]
2022-01-17 19:01:32 INFO    io.fabric8.jenkins.openshiftsync.SecretInformer onUpdate Secret informer received update event for: artifactory-registry
2022-01-17 19:01:32 INFO    io.fabric8.jenkins.openshiftsync.SecretManager updateCredential Modifying Secret with Uid 9b57ca32-1c81-4e4b-bfd8-99936e7f1a87 with Name artifactory-registry
2022-01-17 19:01:32 INFO    io.fabric8.jenkins.openshiftsync.SecretManager validSecret Validating Secret with Uid 9b57ca32-1c81-4e4b-bfd8-99936e7f1a87 with Name artifactory-registry
2022-01-17 19:01:32 INFO    io.fabric8.jenkins.openshiftsync.SecretInformer onUpdate Secret informer received update event for: gitlab-scg
2022-01-17 19:01:32 INFO    io.fabric8.jenkins.openshiftsync.SecretManager updateCredential Modifying Secret with Uid e989c866-c9de-4e32-b7c3-b3ab55ddcdd0 with Name gitlab-scg
2022-01-17 19:01:32 INFO    io.fabric8.jenkins.openshiftsync.SecretManager validSecret Validating Secret with Uid e989c866-c9de-4e32-b7c3-b3ab55ddcdd0 with Name gitlab-scg
2022-01-17 19:02:12 WARNING org.jenkinsci.plugins.prometheus.DiskUsageCollector collect Cannot get disk usage data. Install CloudBees Disk Usage Simple plugin to enable
2022-01-17 19:03:25 WARNING io.fabric8.kubernetes.client.informers.cache.ReflectorWatcher onClose Watch closing with exception
io.fabric8.kubernetes.client.WatcherException: too old resource version: 119855318 (119900627)
	at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$TypedWatcherWebSocketListener.onMessage(WatchConnectionManager.java:103)
	at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323)
	at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274)
	at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: too old resource version: 119855318 (119900627)
	... 11 more

2022-01-17 19:03:25 INFO    io.fabric8.jenkins.openshiftsync.SecretInformer onDelete Secret informer received delete event for: artifactory-registry
2022-01-17 19:03:25 INFO    io.fabric8.jenkins.openshiftsync.CredentialsUtils deleteCredential Deleted credential carrier-int-artifactory-registry from Secret NamespaceName{carrier-int:artifactory-registry} with revision: 119855318
2022-01-17 19:03:25 INFO    io.fabric8.jenkins.openshiftsync.SecretInformer onDelete Secret informer received delete event for: gitlab-scg
2022-01-17 19:03:25 INFO    io.fabric8.jenkins.openshiftsync.CredentialsUtils deleteCredential About to delete credential carrier-int-gitlab-scgwhich is referenced by jobs: test-cluster-pipeline 
2022-01-17 19:03:25 INFO    io.fabric8.jenkins.openshiftsync.CredentialsUtils deleteCredential Deleted credential carrier-int-gitlab-scg from Secret NamespaceName{carrier-int:gitlab-scg} with revision: 119854874
[...]

Comment 3 Adam Kaplan 2022-01-20 19:20:33 UTC
The java.lang.NoSuchMethodError has also been reported in upstream Jenkins: https://issues.jenkins.io/browse/JENKINS-66468?focusedCommentId=420796&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-420796

Comment 6 emschu 2022-01-25 09:20:39 UTC
I could observe this behaviour with latest origin Jenkins images (+ most recent okhttp-api plugin) and this exception blocked the integration of Jenkins into the OC Cluster completely.
The following patch gets the openshift-sync and the Cluster integration plugin back to work, but before filing a PR to the openshift/jenkins-sync-plugin I would like you to review the changes, if they are correct. Thank you!


Index: src/main/java/io/fabric8/jenkins/openshiftsync/OpenShiftUtils.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/io/fabric8/jenkins/openshiftsync/OpenShiftUtils.java b/src/main/java/io/fabric8/jenkins/openshiftsync/OpenShiftUtils.java
--- a/src/main/java/io/fabric8/jenkins/openshiftsync/OpenShiftUtils.java	(revision 9330934fe76831a5838e51c6be6c49f20c6c138f)
+++ b/src/main/java/io/fabric8/jenkins/openshiftsync/OpenShiftUtils.java	(date 1642698701726)
@@ -130,7 +130,7 @@
      *
      * @param serverUrl the optional URL of where the OpenShift cluster API server
      *                  is running
-     * @param maxConnections2 
+     * @param maxConnections
      */
     public synchronized static void initializeOpenShiftClient(String serverUrl, int maxConnections) {
         if (openShiftClient != null) {
@@ -146,14 +146,12 @@
         
         String version = JENKINS_INSTANCE.getPluginManager().getPlugin("openshift-sync").getVersion();
         config.setUserAgent("openshift-sync-plugin-" + version + "/fabric8-" + Version.clientVersion());
+        if (maxConnections > 0) {
+            config.setMaxConcurrentRequestsPerHost(maxConnections);
+            config.setMaxConcurrentRequests(maxConnections);
+        }
         openShiftClient = new DefaultOpenShiftClient(config);
-        logger.log(INFO, "New OpenShift client initialized: " + openShiftClient);
-
-        DefaultOpenShiftClient defClient = (DefaultOpenShiftClient) openShiftClient;
-        Dispatcher dispatcher = defClient.getHttpClient().dispatcher();
-//        int maxConnections = 100;//GlobalPluginConfiguration.get().getMaxConnections();
-        dispatcher.setMaxRequestsPerHost(maxConnections);
-        dispatcher.setMaxRequests(maxConnections);
+        logger.log(INFO, "New OpenShift client initialized: " + OpenShiftUtils.openShiftClient);
     }
 
     public synchronized static OpenShiftClient getOpenShiftClient() {

Comment 7 Alice Rum 2022-01-28 09:33:44 UTC
Apparently this issue is already fixed by openshift-sync 1.0.52. I have been running jenkins instance built from master for a whole day, and podtemplate is still there. As for the `NoSuchMethodError: 'okhttp3.OkHttpClient io.fabric8.openshift.client.DefaultOpenShiftClient.getHttpClient()'` error, it happens when `openshift-sync` is updated, but `kubernetes` and `kubernetes client api` plugins (on which `openshift-sync` depends) are not. They end up being built against different versions of underlying dependencies, which leads to this error.

Comment 8 Raúl González 2022-01-28 11:03:50 UTC
Sorry Alice, but we keep seeing the 'getHttpClient' with the latest version of every plugin:

Openshift 4.8
Jenkins 2.303.3
Opensift syn plugin: 1.0.52
Kubernetes plugin: 1.31.3
Kubernetes Client Api Plugin: 5.11.2-182

We're running Jenkins from the last and official certified (and supported) image in RH Catalog, not built from master, that's a difference with your test environment.

Comment 9 Alice Rum 2022-01-28 11:39:29 UTC
`openshift-sync` 1.0.52 depends on earlier versions of Kubernetes plugins, as seen from https://github.com/openshift/jenkins-sync-plugin/blob/539b071fad9b7e2225ec6a9cee0b8a22c01effb1/pom.xml
Problem is, these different versions of plugins all point towards different versions of Jenkins's BOM (which lists versions of libraries provided by jenkins), and eventually these plugins are compiled against different versions of underlying http client library. It seems that some code might have been deprecated and later removed, which is affecting some of the plugins in some situations.
However, please feel free to create PR to the openshift/jenkins-sync-plugin, and if it all works, we'll get it merged.

These are versions which current master branch of our jenkins image gets bundled with:
    <dependency>
      <groupId>org.csanchez.jenkins.plugins</groupId>
      <artifactId>kubernetes</artifactId>
      <version>1.31.0</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>kubernetes-client-api</artifactId>
      <version>5.10.1-171.vaa0774fb8c20</version>
    </dependency>

Comment 11 Raúl González 2022-01-29 19:03:03 UTC
Thanks, Alice,

I see there's a little mess with plugin versions. Just to clarify... do you think that downgrading the kubernetes and kubernetes-client-api to those previous versions will work? Or does it's needed a full build of Jenkins so the proper dependent libraries get bundled?

About the PR, don't know what you mean, I don't have a solution for this bug, so I can't create a PR. Maybe you refer to the user 'emschu' proposal above? I think he/she is waiting for your review before creating the PR.

Regards,
Raúl

Comment 12 Raúl González 2022-01-29 19:35:32 UTC
Hi again Alice,

Following your suggestion, just tested with these versions:

Openshift 4.8
Jenkins 2.303.3
Opensift syn plugin: 1.0.52
Kubernetes plugin: 1.31.0
Kubernetes Client Api Plugin: 5.10.1-171.vaa0774fb8c20

Just downgraded versions of Kubernetes and Kubernetes-client-api, ant it worked. httpClient error is gone and secrets and other objects are in sync now.

Thank you!

Comment 13 Alice Rum 2022-01-31 12:11:47 UTC
Yes, Raúl, I'm sorry, I meant to tell the PR thing to emschu.
I am going to close the bug.

Comment 14 Raúl González 2022-01-31 16:34:54 UTC
Hi Alice,

As you wish, there's a workaround if you know the exact combination of plugin versions, but, from my humble perspective, this is still a bug because Jenkins doesn't work properly in Openshift with the latest supported versions of those plugins.

Comment 15 eribeir2 2022-01-31 20:23:16 UTC
Hi everyone!


We are experiencing the same problem here... 
I have an Openshift cluster created using ROSA (AWS) and after create Jenkins using RedHat templates, I'm unable to use it consistently because every day I lose my credentials, history of pipelines and the pipelines as well... 
To make Jenkins functional again, I need to delete the templates and import them again.
Monitoring Jenkins logs, I see same behavior reported by jamieclinton 

My current settings are:

Openshift 4.8.23
Jenkins 2.303.3
Openshift sync plugin: 1.0.50
Kubernetes plugin: 1.30.1
Kubernetes Client Api Plugin: 5.4.1

I agree with Raul, this seems to be a bug that needs to have some attention.

Comment 16 jamieclinton 2022-01-31 21:04:24 UTC
I agree. I still don't know how to fix this issue. The Jenkins Plugin Manager doesn't seem to allow me to upgrade/downgrade to the recommended combination of plugins, which apparently is the following:

Openshift 4.8.2x
Jenkins 2.303.3
Opensift sync plugin: 1.0.52
Kubernetes plugin: 1.31.0
Kubernetes Client Api Plugin: 5.10.1-171.vaa0774fb8c20

Is there some other way I can install these specific versions of the plugins?

Thanks,
  Jamie

Comment 17 jamieclinton 2022-01-31 21:52:46 UTC
Hi Alice,

Can you please reopen this? Unless I'm missing something, it still seems to be a bug that is blocking us (and, apparently, others) from running Jenkins pipelines reliably on OpenShift 4.8

Thanks,
  Jamie

Comment 18 Raúl González 2022-02-01 10:18:46 UTC
Hi Jamie,

In the plugin manager in Jenkins, you can find an "Advanced" tab. There you can upload and install specific versions of plugins. Just download manually the plugin version from the Releases link in jenkins.io in hpi format( i.e: from kubernetes plugins -> https://updates.jenkins.io/download/plugins/kubernetes/1.30.1/kubernetes.hpi ), and upload and install. Then restart and voilà. That worked for me in order to apply this workaround. 

Anyway, I agree, this should be considered a bug because we're locked to a set of versions that we cant change/upgrade without breaking Jenkins. The bug will show again in automatic process upgrades for Jenkins, or Jenkins plugins.

Comment 19 Adam Kaplan 2022-02-02 15:28:21 UTC
Due to the nature of the Jenkins plugin ecosystem, we must pin the plugin versions of our dependencies. Upgrading Jenkins plugins independently is not supported outside of exceptional circumstances.

We do provide backports of plugin upgrades through the Jenkins image in the OpenShift payload, based on bug severity and OCP version support level. The default Jenkins templates ensure that Jenkins is upgraded when the cluster is upgraded.

Comment 20 Raúl González 2022-02-02 17:15:18 UTC
Thank you Adam.

Just to clarify, even if Jenkins shows recommendations to update plugins in the Plugin Manager (in theory, compatible with the Jenkins version), if Jenkins is provided as an image stream in Openshift, your recommendation is to don't upgrade and stick to the version of the plugin provided in the base image. Right?

Comment 21 jamieclinton 2022-02-03 16:05:50 UTC
Hi Raúl,

Thanks for your instructions on how to install the recommended plugin versions from the Plugin Manager Advanced tab. It works! The workaround appears to have fixed the OpenShift Sync problems using this combination:

Openshift 4.8.22
Jenkins 2.303.3
Opensift sync plugin: 1.0.52
Kubernetes plugin: 1.31.0
Kubernetes Client Api Plugin: 5.10.1-171.vaa0774fb8c20

Comment 22 Alice Rum 2022-05-17 08:08:07 UTC
*** Bug 2043084 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.