vvm7ua
vvm7ua

Reputation: 1

Instance is being removed from the group

I have instance group with auto-scaling 1->2 and 2->1 But for some reason, the 2nd copy has been removed for several days.

Tried to remove that instance from the group and got this error:

Operation type [compute.instanceGroupManagers.deleteInstances] failed with message "Cannot delete instance https://www.googleapis.com/compute/v1/projects/silver-pact-<value>/zones/us-central1-a/instances/instance-group-glca that was already abandoned."

Is it possible to delete an unnecessary instance and return the number of instances in the group to 1 while there is no high load?

Thanks!

Upvotes: 0

Views: 619

Answers (1)

Alfons Mu&#241;oz
Alfons Mu&#241;oz

Reputation: 519

If the instance is already abandoned, that instance is not part of the instance-group anymore.

You cannot use gcloud compute instance-groups managed delete-instances command to delete the instance because it is not part of an instance group.

You should be able to delete the whole vm with the regular command to deletes vm:

Warning: this will delete your VM!!!

gcloud compute instances delete instance-1 --zone=us-central2-a

Upvotes: 1

Related Questions