Search code examples
pythongoogle-apiweb-deploymentgcloud

error while deploying gcloud python app - what is it?


This error came when trying to deploy a python web app through gcloud - after the y/n question when you code gcloud app deploy

  ERROR: (gcloud.app.deploy) The operation "operations/acf.p2-222084527338-d61d0401-cb0a-4f69-a07c-131799bd4cf8" resulted in a failure "[Hook call/poll resulted in failed op for service 'compute.googleapis.com': The service is currently being deactivated and deactivation must complete before activation can occur.
    Help Token: Ae-hA1M43mY8ADlPerCsLr9bUDXGJzibJgQCO0CGx3Kz1JRn6XpVB5Q_ebTfPxKEuaBwHKVFwspMAyx7_epjrFKFEzDDbDBy_oYncVroZlxGECPx] with failed services [compute.googleapis.com]".
    Details: "[<DetailsValueListEntry
     additionalProperties: [<AdditionalProperty
     key: '@type'
     value: <JsonValue
     string_value: 'type.googleapis.com/google.rpc.PreconditionFailure'>>, <AdditionalProperty
     key: 'violations'
     value: <JsonValue
     array_value: <JsonArray
     entries: [<JsonValue
     object_value: <JsonObject

Solution

  • It appears that you're deploying to App Engine flex.

    This uses Compute Engine VMs for (App Engine) app instances.

    You must use|enable Compute Engine in order to use App Engine flex.

    I suspect (!?) that someone in your project disabled Compute Engine before you tried to deploy your app and it's telling you that, if you want to deploy to App Engine flex, you will need to (re)enable Compute Engine.