Search code examples
google-cloud-platformgcp-ai-platform-notebook

Google Cloud: can't disable notebooks.googleapis.com


I tried to disable notebooks.googleapis.com with the command line and the developer interface but it is failing. From the command line when I try

gcloud services disable notebooks.googleapis.com --force

I get the error message:

The operation "operations/acf.p17-742562465356-a48e3333-4d5a-4d82-344e-3d7c345f0c89" resulted in a failure "[Hook call/poll resulted in failed op for service 'notebooks.googleapis.com': Not ready to deactivate the service on this project; ensure there are no more resources managed by this service.] with failed services [notebooks.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
 properties: [<Property
 key: 'type'
 value: <JsonValue
 string_value: 'googleapis.com'>>, <Property
 key: 'subject'
 value: <JsonValue
 string_value: '160008'>>]>>]>>>]>]".

Please is somebody known what is going on and how to solve this?


Solution

  • Notebooks are based on Compute Instances. If you activate Notebooks API and create a new Notebook from Notebooks UI, you will see the corresponding VM in both Notebooks UI and Compute Engine page. If you want to disable Notebooks API you need to:

    1. Backup Noteboks information
    2. Delete Notebooks from Notebooks UI page. This will delete Notebooks records and VMs
    3. Deactivate Notebooks API
    4. Go to Notebooks UI and create back the Notebooks (this will use Compute Engine API instead) We use Compute Engine API when Notebooks API is not enabled. This is currently discouraged but you have this option. (You will miss features such as auto-upgrade, health endpoint, instance monitoring)

    Curious: Why you want to Disable Notebooks API?