-
Notifications
You must be signed in to change notification settings - Fork 378
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
[BUG][RHEL8] systemd service should not use python3 #2728
Comments
@Klaas- Installation of Python and the setup in the service file are done by the publisher of the image. If this is the standard image coming published by Red Hat, could you report the issue on their site? At some point they were using the platform Python, but there were some issues and they changed that after 1 release (AFAIK). |
@narrieta yeah, but it's your file that is creating the issues and easily fixed by my PR #2729 - then it'll trickle down into RHEL, I'll create a backport request once it's merged here. About which python version rhel uses, the beauty is I don't care :D Look at the PR, there is no need to specify which python in the service file, as long as the shebang is correct that service file will work. |
@narrieta any progress here? :) |
@Klaas- As previously mentioned, the Python setup is done by the image publisher. I left your PR open in case in the future we find time to test it and see if we should merge it. |
but that is the whole point, you supply a systemd service that specifies which python is used, red hat uses that file as is, but you could be leaving the python selection up to the image publisher, which is what the PR introduces |
@Klaas- yes, thank you for your contribution. we'll consider it at a later time |
So Red Hat will now patch the service file downstream: https://gitlab.com/redhat/rhel/src/walinuxagent/-/merge_requests/16 // https://bugzilla.redhat.com/show_bug.cgi?id=2170104 |
Closing this issue. Image publishers adapt the service files as best suited to their image. |
@narrieta I still think you should give a good example upstream :) |
@Klaas- thanks for pointing this out. I took a look at the service files of the distros we tests and there are several differences between them. There is really not a "good example", it's up to the distro owner to set this up. Ideally we would like the different customizations of the agent to be submitted upstream, but that does not always happen. |
@narrieta rhel 8.8 will use the suggestion from my PR, so I am guessing you can consider that PR rhel upstreaming their changes :) |
@Klaas- Thanks for letting me know. We'll consider that when we do some work on this area. RHEL 8.8 is only 1 of 100+ distros/versions where the agent is used, but it is a good start. |
the file is just for redhat based distros "init/redhat/waagent.service" :) But with rhel9 it seems to be a little different: https://bugzilla.redhat.com/show_bug.cgi?id=2170104#c36 I still think it makes sense not to set the python version in the service file, but then I do no longer care if python3 is static :) |
Describe the bug: A clear and concise description of what the bug is.
Hi,
it seems on systems where python3 is not pointing to the same python version as platform-python waagent fails to start. This happens because you try to directly use python3 in the systemd service file.
I'd guess this happens on any rhel8 system where /usr/bin/python3 is not pointing to python 3.6 (platform-python)
Distro and WALinuxAgent details (please complete the following information):
Additional context
Workaround: Create an override for the waagent.service file, something like this:
This happens because WALinuxAgent uses platform-python (3.6 on RHEL8).
I am guessing you could also change it to start /usr/sbin/waagent directly, without python, then it will work as well because /usr/sbin/waagent has the correct shebang and is executable
The text was updated successfully, but these errors were encountered: