Config Server update command fails with "Cannot scale this process while a deployment is in flight." in Spring Cloud Services for Tanzu
search cancel

Config Server update command fails with "Cannot scale this process while a deployment is in flight." in Spring Cloud Services for Tanzu

book

Article ID: 297184

calendar_today

Updated On:

Products

VMware Tanzu Spring Essentials

Issue/Introduction

A Config Server update operation fail with this message:

status: update failed message: CF-ScaleDisabledDuringDeployment(390016): Cannot scale this process while a deployment is in flight.


Checking the broker logs, you see a similar error:

ERROR 36 --- [ry-client-nio-2] o.s.c.a.d.c.CloudFoundryAppDeployer      : Error updating environment. applicationId=<ID>, error=CF-ScaleDisabledDuringDeployment(390016): Cannot scale this process while a deployment is in flight.



Environment

Spring Cloud Services v3.3.11

Resolution

To resolve this, you will need to cancel the deployment against the backing config server application. To do this, follow these steps:

1. First check the broker logs located in /var/vcap/sys/log/scs-service-broker/scs-service-broker.stdout.log in the VM spring-cloud-services/. In the error message "Cannot scale this process while a deployment is in flight", record the value of the applicationId.

2. Run the following command to confirm that there is an active deployment that is still running.  Replace APPID with the actual applicationId value retrieved from step 1.

cf curl "/v3/deployments/?app_guids=APPID&states=DEPLOYING"

3. Retrieve the cancel endpoint URL from the output from step 3.  The URL is the value of .links.cancel.href from the output.

e.g.,

...
"links": {
   ...
    "cancel": {
        "href": "https://api.example.org/v3/deployments/xxx999/actions/cancel",
        "method": "POST"
    }
}

4. Run the following command to cancel the deployment.  Copy the relative path from the URL retrieved in step 3 (not including the https protocol and FQDN), and use it as the path to the 'cf curl' command. 

e.g.,

cf curl "/v3/deployments/xxx999/actions/cancel" -X POST

5. Confirm that there is no active deployment by running step 2 again.  It should have no active deployments in the output.