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

waagent: fix build #354183

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

camelpunch
Copy link
Contributor

@camelpunch camelpunch commented Nov 7, 2024

Use latest Python to avoid #353830

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Use latest Python to avoid NixOS#353830

Co-authored-by: Sarah Stoltze <sarah.stoltze@maersk.com>
@dotlambda
Copy link
Member

Why was this pinned to python39 in the first place?

@camelpunch
Copy link
Contributor Author

As the original derivation mentions, the upstream GitHub workflow tests against several ancient versions of Python, and 39 is (still) the most recent.

@camelpunch
Copy link
Contributor Author

But I would guess that most people using this derivation want to put an up-to-date NixOS VM on Azure.

@dotlambda dotlambda merged commit 4476c3a into NixOS:master Nov 8, 2024
38 of 42 checks passed
@camelpunch
Copy link
Contributor Author

Thanks!

@camelpunch camelpunch deleted the waagent-upgrade-python branch November 8, 2024 20:54
@sstoltze
Copy link
Contributor

We have discovered that this PR fixes the build, but the waagent service does not start up with python 3.12

Nov 11 09:16:35 localhost systemd[1]: Started Windows Azure Agent Service.
Nov 11 09:16:35 localhost waagent[14455]: Traceback (most recent call last):
Nov 11 09:16:35 localhost waagent[14455]:   File "/nix/store/najm5yzvdysjvrc22m8rjzf8gvhqlbxi-waagent-2.11.1.12/lib/python3.12/site>
Nov 11 09:16:35 localhost waagent[14455]:     import azurelinuxagent.agent as agent
Nov 11 09:16:35 localhost waagent[14455]:   File "/nix/store/najm5yzvdysjvrc22m8rjzf8gvhqlbxi-waagent-2.11.1.12/lib/python3.12/site>
Nov 11 09:16:35 localhost waagent[14455]:     from azurelinuxagent.ga import logcollector, cgroupconfigurator
Nov 11 09:16:35 localhost waagent[14455]:   File "/nix/store/najm5yzvdysjvrc22m8rjzf8gvhqlbxi-waagent-2.11.1.12/lib/python3.12/site>
Nov 11 09:16:35 localhost waagent[14455]:     from azurelinuxagent.common.event import initialize_event_logger_vminfo_common_parame>
Nov 11 09:16:35 localhost waagent[14455]:   File "/nix/store/najm5yzvdysjvrc22m8rjzf8gvhqlbxi-waagent-2.11.1.12/lib/python3.12/site>
Nov 11 09:16:35 localhost waagent[14455]:     from azurelinuxagent.common.osutil import get_osutil
Nov 11 09:16:35 localhost waagent[14455]:   File "/nix/store/najm5yzvdysjvrc22m8rjzf8gvhqlbxi-waagent-2.11.1.12/lib/python3.12/site>
Nov 11 09:16:35 localhost waagent[14455]:     from azurelinuxagent.common.osutil.factory import get_osutil
Nov 11 09:16:35 localhost waagent[14455]:   File "/nix/store/najm5yzvdysjvrc22m8rjzf8gvhqlbxi-waagent-2.11.1.12/lib/python3.12/site>
Nov 11 09:16:35 localhost waagent[14455]:     from distutils.version import LooseVersion as Version  # pylint: disable=no-name-in-m>
Nov 11 09:16:35 localhost waagent[14455]:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 11 09:16:35 localhost waagent[14455]: ModuleNotFoundError: No module named 'distutils'
Nov 11 09:16:35 localhost systemd[1]: waagent.service: Main process exited, code=exited, status=1/FAILURE
Nov 11 09:16:35 localhost systemd[1]: waagent.service: Failed with result 'exit-code'.

@camelpunch
Copy link
Contributor Author

camelpunch commented Nov 11, 2024

Initial findings suggest that Python 3.11 is going to work (the last version to include distutils). We're just reprovisioning a machine to confirm and will make a follow-up PR.

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.

3 participants