Open theangrydev opened 2 years ago
Happening for me too, while trying to read secrets needed in the shutdown script.
shutdown-script: internal error, please report: running "google-cloud-cli.gcloud" failed: cannot create transient scope: DBus error "org.freedesktop.systemd1.TransactionIsDestructive": [Transaction for snap.google-cloud-cli.gcloud.d8fb0084-b578-427f-bb2d-183922334e67.scope/start is destructive (poweroff.target has 'start' job queued, but 'stop' is included in transaction).]
Tried updating gcloud-cli with:
snap refresh google-cloud-cli --classic
but that hasn't helped.
Turned out to be something problematic in snap.
In the startup script, I uninstalled the snap package:
snap remove google-cloud-cli
Then installed the gcloud cli with apt-get instead:
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.gpg
sudo apt-get update && sudo apt-get install google-cloud-cli
Ref: https://cloud.google.com/sdk/docs/install#deb
This fixed the issue during the shutdown.
Hope this could be of help, till the situation with snap gets fixed.
Facing the same issue when reading secrets using gcloud in the shutdown script.. Did you manage to figure out what the issue was @imranzunzani / @theangrydev - it seems like running gcloud commands in the shutdown script is not possible on an Ubuntu image. I was expecting more Google search hits on this...
I see the following error when I attempt a gsutil cp local.txt gs://remote in a GCP shutdown-script
What does this error mean? What can I do to resolve it?
internal error, please report: running "google-cloud-sdk.gsutil" failed: cannot create transient scope: DBus error "org.freedesktop.systemd1.TransactionIsDestructive": [Transaction for snap.google-cloud-sdk.gsutil.cf1314cb-467c-4e1c-8932-4661b0de0c98.scope/start is destructive (shutdown.target has 'start' job queued, but 'stop' is included in transaction).]
gsutil version: 5.10
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"