GoogleCloudPlatform / GoogleCloudPlatform/anthos-samples

anthos-bm-gcp-bash failing to complete due to lack of permissions

Open
#829 0 comments 0 reactions 0 assignees View on GitHub
samples
Dominant language
HCL
Stars
106
Forks
137
PR merge metrics
No merged PRs in 30d

Description

Today, ssh'ing into GCE machines resorts to using OS Login user instead of `root`, meaning that operations on the VMs requiring root permissions will fail:

```text
Setting up VxLAN in the GCE VMs...
Using OS Login user [student-04-bcdd0236eaea] instead of requested user [root]
[...]
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
+ ip link add vxlan0 type vxlan id 42 dev ens4 dstport 0
RTNETLINK answers: Operation not permitted
[...]
```

All operations trying to log into the GCE machines as root in the `install_hybrind_cluster.sh` script need to be changed so the user elevates to root permissions, for example doing a `sudo su -` as a first step.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.