Cloud Service Broker Upgrade Fails Due to Out of Date Service Instances
search cancel

Cloud Service Broker Upgrade Fails Due to Out of Date Service Instances

book

Article ID: 382553

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

Per the official guidelines, service instances must be upgraded before proceeding with the broker upgrade. Therefore, if service instances are out of the date the Cloud Service Broker Upgrade will fail.

            
          Pre-install check failed. There are service instances pending upgrade to a previous version. Please ensure all service instances are up to date before retrying the installation. Read the documentation for detailed instructions in the upgrading section of the previous release needed to upgrade: https://docs.vmware.com/en/Cloud-Service-Broker-for-VMware-Tanzu/index.html.  
            
Stderr     upgrade-all-services plugin failed: found 2 service instances with a version less than the minimum required  
1 errand(s)

===== 2024-11-13 00:31:18 UTC Finished "/usr/local/bin/bosh --no-color --non-interactive --tty --environment=##.###.#.## --deployment=cloud-service-broker-azure-c4########### run-errand deploy-all"; Duration: 354s; Exit Status: 1
Exited with 1.
Exited with 1.

 

Here are some helpful links for reference:

 

If you are not able to upgrade the service instances for any reason, you can transition these instances to user-provided service instances (UPSI) so the upgrade can proceed.

Cause

 

After an unsuccessful upgrade operation, the service instance enters a locked state where it does not admit any operations, including bind, unbind, update, or delete. This behavior is designed to preserve the integrity of the service instance and prevent further disruptions. If this state is encountered, it is necessary to resolve the root cause of the upgrade failure or transition to an alternative solution, such as creating a user-provided service instance with the current credentials.

Resolution

Suggested Resolution: Use User-Provided Service Instances

Since the two service instances cannot be upgraded due to the disk space constraint, the fastest workaround is to transition these instances to user-provided service instances (UPSI). This approach ensures the upgrade can proceed while maintaining access to the database credentials.

Here’s what you can do:
1. Retrieve the credentials that your app is using from the affected service instances.

  • You can get the credentials using the `cf env` command. Example:
cf env app-cord-snout 

If your installation is configured to store credentials in Credhub, you’ll see a reference like the example below:

VCAP_SERVICES: { 
"csb-azure-mssql-db-failover-group": [ 
   { 
      "credentials":
{            "credhub-ref": "/c/csb/csb-azure-mssql-db-failover-group/######-####-####-####-###########/secrets-and-services"     }

   } 
 ] 
} 

To fetch credentials stored in Credhub, follow the instructions provided here:

2. Create UPSI instances with the retrieved credentials:

Refer to these resources for guidance:

3. Bind the User-Provided Service Instance to the app. Use the “cf bind-service” command for this. Note that you should not unbind the existing binding, because this will trigger a deletion of binding in the service, and the credentials you just obtained will no longer be usable.

4. Purge the original service instance using the “cf purge-service-instance” command. This will delete the original service instance and all bindings from the CloudFoundry database, but it will not invalidate the credentials.

5. Restart the app so that it will switch to using the new User-Provided Service Instance