-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
nixos/waagent: init module #362101
nixos/waagent: init module #362101
Conversation
cae02f8
to
543bb86
Compare
cc57a8d
to
45c2def
Compare
81f3397
to
fa1c48a
Compare
fa1c48a
to
ec44d86
Compare
ec44d86
to
0d7c515
Compare
@ofborg build waagent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with anything Azure, so I'm not sure how much help I can be -- but here are some issues I found on the Nix code side. Everything else looks good at a glance
@@ -63,14 +65,24 @@ python.pkgs.buildPythonApplication rec { | |||
|
|||
dontWrapPythonPrograms = false; | |||
|
|||
meta = { | |||
passthru = { | |||
tests = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests = { | |
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { |
These prevents OfBorg from attempting to evaluate and build this test on non-Linux platforms (where it will never work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the latest iteration I added meta.platforms = lib.platforms.linux;
to make this package Linux-only, as the project does not support Darwin officially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passthru.tests
are still evaluated on Darwin regardless IIRC
@ofborg build waagent |
@ofborg build waagent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to test this, but everything LGTM
Should probably have someone else actually test it before a merge, though :p
I did some quick tests on my existing Azure VM and made sure it is compatible with existing configurations. If anyone is interested one can fork codgician:azure-aarch64-nixos and change the flake's nixpkgs input to the branch of this PR for generating a new vhdx to upload and validate with new Azure VM. |
Let's get this in! Thanks for the work. |
Hey there! We found that after this change, OpenSSL errors prevented new machines from completing their provisioning. The openssl binary was expected to be at The fix for us was to set:
Not sure where the fix should go: perhaps a rewrite of |
We already add openssl to the $PATH of waagent. Ideally we can patch waagent source to pick it up from there. |
This is intended to be fixed with #359365, where a default value of |
Adds a module for waagent (Windows Azure Linux Agent), providing
services.waagent
option. With this change, the options available inwaagent.conf
could be defined usingservices.waagent.settings
, which fix #272460.The format of
waagent.settings
follow: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-linux#configuration:settings
has a type offreeform
.Below provides an example of
services.waagent
(used as test) with further explanations in comments:The resulting
/etc/waagent.conf
of above definition should be:Some other notable changes include:
waagent.service
definition referencing unit tests of Azure/WALinuxAgentazure-agent.nix
(which is not imported automatically)./etc/waagent.conf
.passthru.updateScript
for waagent package, and added myself as maintainer.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.