Skip to content

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

@javiercanadillas

Description

@javiercanadillas

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    samplesIssues that are directly related to samples.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions