Ingrid Pérez
Ingrid Pérez

Reputation: 90

Cannot delete a version - gcloud app versions stop [id]

I cannot use the "gcloud app versions stop", I dont know how to quit automatic mode.

It throws the following error:

ERROR: (gcloud.app.versions.stop) INVALID_ARGUMENT: serving status cannot be changed for Automatic Scaling versions

Upvotes: 6

Views: 3274

Answers (2)

kevinmicke
kevinmicke

Reputation: 5058

It's possible to get into a situation where you're getting the error you mentioned, but can't change the yaml file as mentioned in LundinCast's answer because you're also getting this error when you try to deploy:

INVALID_ARGUMENT: Your app may not have more than 15 versions. Please delete one of the existing versions before trying to create a new version.

In that situation, I wasn't able to find a solution from the terminal, but it's easy enough to go to the "versions" page of the console to manually delete a version, which is available here:

https://console.cloud.google.com/appengine/versions

Upvotes: 0

LundinCast
LundinCast

Reputation: 9810

As documented here:

This command stops serving the specified versions. It may only be used if the scaling module for your service has been set to manual.

The scaling pattern for your app is defined in the app.yaml file (or appengine-web.xml file in Java), for example:

manual_scaling:
  instances: 5

Note that if you haven't specified scaling policy in that file, it defaults to automatic scaling, thus the error you're getting.

Upvotes: 3

Related Questions