Bug 2170104
| Summary: | [Azure][WALA][RHEL-8] systemd service should not use python3 | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Klaas Demter <klaas> | |
| Component: | WALinuxAgent | Assignee: | Vitaly Kuznetsov <vkuznets> | |
| Status: | CLOSED ERRATA | QA Contact: | Yuxin Sun <yuxisun> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 8.7 | CC: | eterrell, jmaloy, mrezanin, pvlasin, rmcswain, vkuznets, xuli, yacao, ymankad, yuxisun | |
| Target Milestone: | rc | Keywords: | Triaged, ZStream | |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | WALinuxAgent-2.7.0.6-8.el8_8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2174895 2175255 (view as bug list) | Environment: | ||
| Last Closed: | 2023-05-16 08:44:25 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2174895, 2175255 | |||
|
Description
Klaas Demter
2023-02-15 16:31:17 UTC
Hi Klaas, Thank you for reporting this issue! We also have a BZ#2170211 to track this issue. Would you mind me to duplicate this issue to BZ#2170211 and track in that one? Thanks! @yuxisun can you make that other report public - in that case I don't care if this bug lives on or the other one? But judging from the number 2170211 should be a duplicate of 2170104 :) Greetings Klaas (In reply to Klaas Demter from comment #2) > @yuxisun > can you make that other report public - in that case I don't care if this > bug lives on or the other one? But judging from the number 2170211 should be > a duplicate of 2170104 :) > > Greetings > Klaas Hi Klaas, I double checked these 2 issues and they are actually not exactly the same issues. So I'd like to still track them separately. Thanks! Hi Vitaly, I can reproduce this issue. Could you please help to check which one we should use in both waagent.service and /usr/sbin/waagent? /usr/bin/python3 or /usr/libexec/platform-python? Thanks! (In the spec file the RHEL-8 WALA package requires python36) (In reply to Yuxin Sun from comment #3) > > Hi Vitaly, > > I can reproduce this issue. Could you please help to check which one we > should use in both waagent.service and /usr/sbin/waagent? /usr/bin/python3 > or /usr/libexec/platform-python? Thanks! (In the spec file the RHEL-8 WALA > package requires python36) My idea was to remove python from the service file and just let /usr/sbin/waagent handle the interpreter choice. Is there any advantage of using python directly inside the service file? (In reply to Yuxin Sun from comment #3) > I can reproduce this issue. Could you please help to check which one we > should use in both waagent.service and /usr/sbin/waagent? /usr/bin/python3 > or /usr/libexec/platform-python? Thanks! (In the spec file the RHEL-8 WALA > package requires python36) I also think that relying on the shabang in /usr/sbin/waagent is the right fix here. *** Bug 2170211 has been marked as a duplicate of this bug. *** Yuxin, This does help one of my customers. One more question from case 03440559
I understand the LinuxDiagnostic extension install will fail on RHEL8. I am trying to use the images published by RedHat on the Azure MarketPlace. This one too fails as Python2. Do you have any plans to change this behavior in the images published by RedHat to make it work.
"imageReference": {
"publisher": "RedHat",
"offer": "RHEL",
"sku": "8-LVM",
"version": "8.7.2022112213"
},
(In reply to Robert McSwain from comment #15) > Yuxin, This does help one of my customers. One more question from case > 03440559 > > > I understand the LinuxDiagnostic extension install will fail on RHEL8. I am > trying to use the images published by RedHat on the Azure MarketPlace. This > one too fails as Python2. Do you have any plans to change this behavior in > the images published by RedHat to make it work. > > "imageReference": { > "publisher": "RedHat", > "offer": "RHEL", > "sku": "8-LVM", > "version": "8.7.2022112213" > }, I think you're wrong here about this, the extension is not made by Red Hat (neither is the image btw), you have to complain to the Microsoft Team in charge of the Linux Diagnostic Extension, but I'd say for now it's on purpose: https://github.com/MicrosoftDocs/azure-docs/issues/91647 Greetings Klaas @mrezanin will there be a zstream backport of this to 8.7 ? (In reply to Klaas Demter from comment #19) > (In reply to Robert McSwain from comment #15) > > Yuxin, This does help one of my customers. One more question from case > > 03440559 > > > > > > I understand the LinuxDiagnostic extension install will fail on RHEL8. I am > > trying to use the images published by RedHat on the Azure MarketPlace. This > > one too fails as Python2. Do you have any plans to change this behavior in > > the images published by RedHat to make it work. > > > > "imageReference": { > > "publisher": "RedHat", > > "offer": "RHEL", > > "sku": "8-LVM", > > "version": "8.7.2022112213" > > }, > > I think you're wrong here about this, the extension is not made by Red Hat > (neither is the image btw), you have to complain to the Microsoft Team in > charge of the Linux Diagnostic Extension, but I'd say for now it's on > purpose: https://github.com/MicrosoftDocs/azure-docs/issues/91647 > > Greetings > Klaas Thanks Klass! I also opened an issue in LAD upstream: https://github.com/Azure/azure-linux-extensions/issues/1681 > @mrezanin will there be a zstream backport of this to 8.7 ? Yes. We've already requested for 8.7.z and is waiting for approval now. Thanks! (In reply to Klaas Demter from comment #20) > @mrezanin will there be a zstream backport of this to 8.7 ? Approving zstream for 8.7. The 8.7 clone will be created shortly. @mrezanin I can't see the PR, does this also change the dependencies from python3.6 to platform python? I noticed walinuxagent gets removed when a user removes python3.6 Patch https://gitlab.com/redhat/centos-stream/rpms/WALinuxAgent/-/blob/c8s/wla-Use-platform-python-in-waagent.service.patch I am guessing this also needs to go into rhel9/c9s Greetings Klaas (In reply to Klaas Demter from comment #35) > Patch > https://gitlab.com/redhat/centos-stream/rpms/WALinuxAgent/-/blob/c8s/wla-Use-platform-python-in-waagent.service.patch > I am guessing this also needs to go into rhel9/c9s WALinuxAgent in RHEL9/C9S does not override shebang in /usr/sbin/waagent, it is #!/usr/bin/python3 and waagent.service calling it with ExecStart=/usr/bin/python3 -u /usr/sbin/waagent -daemon doesn't really change anything. Also, using /usr/bin/python3 is recommended in RHEL9: (https://access.redhat.com/solutions/6736391): """ The /usr/libexec/platform-python is implemented as a symbolic link to /usr/bin/python3 . Although this platform-python symlink is deprecated in RHEL 9 and is added for backwards compatibility with RHEL 8. The /usr/bin/python3 is used by Red Hat shipped applications and is recommended to be used for third party applications, User scripts and custom use of python library instead of /usr/libexec/platform-python """ hehe okay, I actually did not know that, not using rhel9 that much yet, I still think it would be cleaner to let waagent decide the python version, but well - if it works and doesn't break then I don't care :) (In reply to Klaas Demter from comment #37) > hehe okay, I actually did not know that, not using rhel9 that much yet, I > still think it would be cleaner to let waagent decide the python version, > but well - if it works and doesn't break then I don't care :) Generally, I agree that overriding /usr/sbin/waagent's shebang in waagent.service is not a good idea, hope https://github.com/Azure/WALinuxAgent/pull/2729 will get accepted. So Microsoft considers that file to be Red Hats problem, https://github.com/Azure/WALinuxAgent/issues/2728#issuecomment-1479788371 , maybe give them a kick in the PR, maybe we can finally close this for good :) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (WALinuxAgent bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:2944 |