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

google-compute-config.nix: fix comments, update google-*.service units, fix paths in gce #67848

Merged
merged 6 commits into from Sep 1, 2019

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Aug 31, 2019

Motivation for this change

With local-fs.target part of sysinit.target
(#61321), we don't need to add it
explicitly to certain units anymore, and can change dependencies like
they are in other distros (I picked from Google's official CentOS 7
image here).

Like them, use StandardOutput=journal+console to pipe google-*.service
output to the serial console as well.

Update comment about ssh login and move enabling OS Login (together with
a comment) next to it

Remove a comment accidentially copied over from amazon-image.nix.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

also move OS Login next to it, for better understandability
With local-fs.target part of sysinit.target
(NixOS#61321), we don't need to add it
explicitly to certain units anymore, and can change dependencies like
they are in other distros (I picked from Google's official CentOS 7
image here).

Like them, use StandardOutput=journal+console to pipe google-*.service
output to the serial console as well.
@flokli
Copy link
Contributor Author

flokli commented Aug 31, 2019

I tested this by successfully booting a new GCP instance based on this config.

The services still boot up. There's some missing shebangs in some scripts (which were before too, will update the google-compute-engine accordingly.

@flokli
Copy link
Contributor Author

flokli commented Aug 31, 2019

I patched shebangs and fixed paths. The scripts previously erroring into syslog are now properly executed.

We now set virtionet IRQ affinities, and local SSD parameters as well :-)

@flokli flokli requested a review from andir August 31, 2019 23:11
@flokli flokli changed the title google-compute-config.nix: fix comments, update google-*.service units google-compute-config.nix: fix comments, update google-*.service units, fix paths in gce Aug 31, 2019
@flokli flokli force-pushed the google-compute-config-units branch from 667300f to d658dd4 Compare August 31, 2019 23:23
@flokli
Copy link
Contributor Author

flokli commented Aug 31, 2019

I also verified startup and shutdown scripts configured in metadata are properly executed:

	metadata {
        enable-oslogin = "TRUE"
		startup-script = "echo METADATA > /var/lib/start.txt"
		shutdown-script = "echo METADATA > /var/lib/stop.txt"
	}

We make them available at ${gce}/sysctl.d and add them to
environments.etc, like we do with the systemd ones.
@flokli flokli merged commit 7f42adf into NixOS:master Sep 1, 2019
@flokli flokli deleted the google-compute-config-units branch September 1, 2019 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant