CasC: Failure to check for CasC bundle updates when a new version is available

Article ID:360055503372
2 minute readKnowledge base

Issue

  • When a new CasC bundle version is available, A controller does not receive CasC bundle update notifications

  • When a new CasC bundle version is available, checking for CasC bundle updates at Manage Jenkins  CloudBees Configuration as Code bundle  Bundle Update  Check for Updates fails and report the following in the Jenkins logs:

WARNING: Caught unhandled exception with ID c9fc23f5-7563-4c8b-adff-e8744e917d71
javax.servlet.ServletException: java.lang.IllegalStateException: Expected 1 instance of com.cloudbees.opscenter.client.casc.ConfigurationBundleService but got 0
        [...]
Caused by: java.lang.IllegalStateException: Expected 1 instance of com.cloudbees.opscenter.client.casc.ConfigurationBundleService but got 0
	at hudson.ExtensionList.lookupSingleton(ExtensionList.java:451)
	at com.cloudbees.opscenter.client.casc.ConfigurationUpdaterHelper.checkForUpdates(ConfigurationUpdaterHelper.java:32)
	at com.cloudbees.opscenter.client.casc.visualization.BundleVisualizationLink.doBundleUpdate(BundleVisualizationLink.java:91)
  • CTR-3021: CasC for controller: error when a new version is available and click on Check when casc-api not installed

  • CTR-2618: cloudbees-casc-api plugin included in CAP

Explanation

Since version 2.249.3.1, CasC for Controllers requires the CloudBees CasC API Plugin to be installed, even if not configuring either RBAC or Folders with CasC.

This is a bug tracked by CTR-3021: CasC for Controllers: error when a new version is available and click on Check when casc-api not installed.

Resolution

Until CTR-3021 is resolved, the solution is to install the CloudBees CasC API plugin.

Workaround

To reload the latest CasC bundle updates, the workaround is to restart the controller.