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

fetch-ssh-keys.service fails on GCE #756

Closed
P-E-Meunier opened this issue Oct 31, 2017 · 5 comments
Closed

fetch-ssh-keys.service fails on GCE #756

P-E-Meunier opened this issue Oct 31, 2017 · 5 comments

Comments

@P-E-Meunier
Copy link

On GCE, Nix tries to start a service called fetch-ssh-keys, but it seems to be using obsolete calls to the GCE API.

I feel like this is something I could fix myself (and submit a PR), but the documentation doesn't mention anything about where this is defined.

Is the standard way a find/grep on nixpkgs? on the nixops source?

@P-E-Meunier P-E-Meunier changed the title fest-ssh-keys.service fails on GCE fetch-ssh-keys.service fails on GCE Oct 31, 2017
@P-E-Meunier
Copy link
Author

The last part of the URL seems to be called ssh-keys now, not sshKeys (which is what the service calls).

@AmineChikhaoui
Copy link
Member

@P-E-Meunier you can find the definition in nixpkgs:nixos/modules/virtualisation/google-compute-image.nix, I think I saw this issue as well, would be nice if you fix it.

@P-E-Meunier
Copy link
Author

Will fix in exchange for documentation (in the manual or on the wiki) on how these images are supposed to work, how they're generated and uploaded.

I am willing to test and to write it up in the manual. I like this project, I want to use it, but I have absolutely no clue how this works right now (I've learned mostly from looking at nix and python code, and this was done manually by someone, apparently).

@P-E-Meunier
Copy link
Author

Here is an extra problem with that service: even if they're fetched, authorized keys get written to /root/.ssh/authorized_keys, which is probably the only option, but is ignored by nix (as far as I can tell) if you also set your authorized keys in the nix file.

@pvgoran
Copy link

pvgoran commented Dec 18, 2017

As far as I understand, Nixos writes authorized keys into /etc/ssh/authorized_keys.d/user, rather than into ~user/.ssh/authorized_keys. So maybe this is not a problem after all?

rbvermaa pushed a commit to NixOS/nixpkgs that referenced this issue Jan 18, 2018
Seems the google compute metadata service behavior changed a bit
recently which caused this issue ?
see: https://cloud.google.com/compute/docs/storing-retrieving-metadata

(cherry picked from commit 5dba59d)
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

3 participants