[google-cloud-sdk] `gcloud container clusters get-credentials` resolves symlinks from Snap executable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
Originally reported as https:/
Not even sure whether this is the right place to file bugs for actual snap packages, as opposed to the snap tooling. https:/
Anyway, to repeat the original bug:
----
The `gcloud container clusters get-credentials` command edits `~/.kube/config` and defines, among other things, `/users/
What you expected to happen:
The `cmd-path` should be set to the command actually used to invoke `gcloud`, not the fully-resolved `argv[0]`.
Steps to reproduce:
On Ubuntu Bionic,
snap install google-cloud-sdk
to add https:/
gcloud container clusters get-credentials … --zone … --project …
Now look at `~/.kube/config`. It will contain for example
cmd-path: /snap/google-
despite
~$ which gcloud
/snap/bin/gcloud
~$ ls -l /snap/bin
total 0
lrwxrwxrwx 1 root root 19 Nov 1 17:10 bq -> google-cloud-sdk.bq
lrwxrwxrwx 1 root root 23 Nov 1 17:10 gcloud -> google-
lrwxrwxrwx 1 root root 13 Nov 1 17:10 google-cloud-sdk.bq -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Nov 1 17:10 google-
lrwxrwxrwx 1 root root 13 Nov 1 17:10 google-
lrwxrwxrwx 1 root root 23 Nov 1 17:10 gsutil -> google-
…others…
~$ ls -l /snap/google-
total 0
drwxr-xr-x 13 root root 518 Oct 30 10:23 59
lrwxrwxrwx 1 root root 2 Nov 1 17:10 current -> 59
~$ ls -l /snap/google-
total 328
drwxr-xr-x 3 root root 263 Oct 30 10:23 bin
-rwxr-xr-x 1 root root 35 Oct 30 10:23 command-bq.wrapper
-rwxr-xr-x 1 root root 39 Oct 30 10:23 command-
-rwxr-xr-x 1 root root 39 Oct 30 10:23 command-
…etc…
Workaround: manually edit the config file whenever updating the snap.