Skip to content

Conversation

@rjschwei
Copy link
Contributor

@rjschwei rjschwei commented Jan 6, 2025

Description

The waagent script is executable and has the interpreter set. Drop the use of the Python interpreter to execute the file from the systemd unit file. We achieve unbuffered I/O by setting the PYTHONUNBUFFERED environment variable instead. This makes it easier for distribution packaging as packagers will only have to update the pathto the interpreter used on the given distro in one file.

Issue #


PR information

  • [ x] Ensure development PR is based on the develop branch.
  • [x ] The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

The waagent script is executable and has the interpreter set. Drop the
use of the Python interpreter to execute the file from the systemd unit file.
We achieve unbuffered I/O by setting the PYTHONUNBUFFERED environment
variable instead. This makes it easier for distribution packaging as
packagers will only have to update the pathto the interpreter used on the
given distro in one file.
@Klaas-
Copy link

Klaas- commented Mar 3, 2025

I suggested drop the python execution a couple of years ago, MSFT were not interested :D
PR: #2729
Original issue: #2728

@narrieta
Copy link
Member

narrieta commented Jun 9, 2025

@rjschwei - Extensions inherit the environment of the Agent. This change ended up breaking the Microsoft.CPlat.Core.LinuxPatchExtension extension since it changes the timing of the extension. Although this is actually a bug in the extension and a fix is currently being deployed, we do not know if other extensions have similar issues, plus not all VMs may be configured to take extension updates.

The PR makes a change that applies to distros other than SUSE, so we consider it to be high risk. Probably it may be worth considering whether this change can be undone in SUSE, but if it cannot, we suggest updating this PR to apply only to SUSE.

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