Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for GCE OS Login #208

Open
rdhyee opened this issue Oct 8, 2018 · 5 comments
Open

Support for GCE OS Login #208

rdhyee opened this issue Oct 8, 2018 · 5 comments

Comments

@rdhyee
Copy link

rdhyee commented Oct 8, 2018

The current support for SSH offered by this provider makes use of adding SSH keys in GCE metadata. I'm inquiring about whether there's any interest in supporting the alternative way of accessing GCE instances: OS Login.

When I naively turned on OS Login, Vagrant was able to ssh into the instance but failed when trying to rsync with the instance. In my Vagrantfile, I had the configuration line

override.ssh.username = "raymond_yee_gmail_com"

to match the username key for the SSH key configured in OS Login

==> opencontext: Machine is ready for SSH access!
==> opencontext: Installing rsync to the VM...
==> opencontext: Rsyncing folder: /Users/raymondyee/C/src/open-context-py/sysadmin/ => /vagrant
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

find /vagrant '!' -type l -a '(' ! -user raymond_yee_gmail_com -or ! -group raymond_yee_gmail_com ')' -exec chown raymond_yee_gmail_com:raymond_yee_gmail_com '{}' +

Stdout from the command:



Stderr from the command:

find: ‘raymond_yee_gmail_com’ is not the name of an existing group


Apparently, it seems that the rsync action assumes that there would be a group with the same name as the username -- and this assumption is not correct when using OS Login.

@Temikus
Copy link
Collaborator

Temikus commented Oct 19, 2018

@rdhyee rsync is actually provided by the vagrant core module, so this may mean that we need to make a change in vagrant or at the very least pull POSIX names out of the Directory API (then a code change in fog is needed)

I'm not sure this is something I can change fairly quickly as I don't have a lot of cycles nowadays. However, I'd be happy to give pointers or review a PR if you're willing to take a crack at it.

@sryabkov
Copy link

Google documentation steers people towards using OS Login:
image

So, I think it is important to implement support for it. I ran into the same issue that was reported here, and if this issue is not resolved, that would prevent us from using vagrant.

@Temikus Could you outline in a bit more detail what needs to change in the vagrant core module and/or fog?

@konstantin-recurly
Copy link

The most interesting part that I discovered today is that it works with the same Vagrantfile in centos 7 and doesn't work in ubuntu 16 or ubuntu 18. All this was tested in GCP.

@konstantin-recurly
Copy link

Are there any plans to review this issue? it's very painful not to be able to use it with GCP and Ubuntu OS family.

@Temikus
Copy link
Collaborator

Temikus commented Jun 27, 2020

@konstantin-recurly As I said in #208 (comment) this is a free time project and I don't have a lot of bandwith to implement this. However, if you'd like to contribute I'm happy to review PR's and give pointers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants