Unable to delete gcloud composer environment

与世无争的帅哥 提交于 2021-02-08 11:33:33

问题


I'm trying to delete gcloud environments. One did not successfully create (no associated Airflow or Bucket) and one did. When I attempt to delete, I get an error message (after a really long time) of RPC Skipped due to required preoperation not finished yet. The logs don't provide any valuable information, and I wasn't able to find anything wrong in the cluster. The only solution I have found so far is to delete the entire project, but I would prefer not to. Any suggestions would be greatly appreciated!


回答1:


Follow the steps below to delete the environment's resources manually:

  • Delete GKE cluster that corresponds to the environment
  • Delete the Google Storage bucket used by the environment
  • Delete the related deployment with: gcloud deployment-manager deployments delete <DEPLOYMENT_NAME> --delete-policy=ABANDON
  • Then try again to delete the Composer environment with: gcloud composer environments delete <ENVIRONMENT_NAME> --location <LOCATION>



回答2:


I would like to share what worked for me in case someone else runs into this problem as I followed all the steps above and still could not delete the composer environment.

My 'gcloud composer environments list' command was returning '0', but I could see my environment was still in the console view and when I tried to delete it, I would get the same error message as honlicious. Additionally, I ran 'gcloud projects add-iam-policy-binding' to try to give my Compute Engine ServiceAccount the composer.serviceAgent role, but this still did not resolve my issue. What eventually worked was disabling the Cloud Composer API and then re-enabling it. This removed my old environment I was unable to previously delete.



来源:https://stackoverflow.com/questions/59363210/unable-to-delete-gcloud-composer-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!