-
Notifications
You must be signed in to change notification settings - Fork 3k
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
/usr/bin/az wrapper does not account for environments where an alternate python is used (RHEL8) #28530
Labels
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Comments
msftvito
added
the
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
label
Mar 8, 2024
Thank you for opening this issue, we will look into it. |
microsoft-github-policy-service
bot
added
the
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
label
Mar 8, 2024
yonzhan
added
Azure CLI Team
The command of the issue is owned by Azure CLI team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
and removed
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
labels
Mar 9, 2024
az requires Python 3.9. If you've prioritized a newer Python 3.9 installation in your PATH over the system's default Python, then az should use new python3.9. |
Thanks for replying Hang. The issue isn't a newer or older version, but a completely separate install that may not have all the dependencies or build options that azure-cli needs, like in the example I gave, the alternative python was built without SSL support. That's just a frivolous example that was easy to reproduce, but we may have cases like conflicting package requirements, etc.
…________________________________
From: Hang ***@***.***>
Sent: Sunday, March 10, 2024 7:53 PM
To: Azure/azure-cli ***@***.***>
Cc: Victor Tong ***@***.***>; Author ***@***.***>
Subject: Re: [Azure/azure-cli] /usr/bin/az wrapper does not account for environments where an alternate python is used (RHEL8) (Issue #28530)
az requires Python 3.9. If you've prioritized a newer Python 3.9 installation in your PATH over the system's default Python, then az should use new python3.9. This follows standard practice in Linux environments.
—
Reply to this email directly, view it on GitHub<#28530 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AURCPKJA7KQ2PDKPPPIDAX3YXUMB5AVCNFSM6AAAAABENIZ57CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGUZTINZWGM>.
You are receiving this because you authored the thread.
|
I stand by my point. Regarding your issue, you can prioritize your own |
Hello Hang, am I understanding correctly that you do not see this as a problem and therefore will not fix it?
…________________________________
From: Hang ***@***.***>
Sent: Monday, March 11, 2024 6:38 PM
To: Azure/azure-cli ***@***.***>
Cc: Victor Tong ***@***.***>; Author ***@***.***>
Subject: Re: [Azure/azure-cli] /usr/bin/az wrapper does not account for environments where an alternate python is used (RHEL8) (Issue #28530)
I stand by my point.
Regarding your issue, you can prioritize your own az which uses a hardcoded path.
—
Reply to this email directly, view it on GitHub<#28530 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AURCPKISJLIYUTPNPWOOSNDYXZMCXAVCNFSM6AAAAABENIZ57CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZG42TSMJSGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yes |
OK, I still believe this is an issue best solved from your end, but if you are unwilling to work on it, I do not have the power to force you to.
…________________________________
From: Hang ***@***.***>
Sent: Tuesday, March 12, 2024 7:59 PM
To: Azure/azure-cli ***@***.***>
Cc: Victor Tong ***@***.***>; Author ***@***.***>
Subject: Re: [Azure/azure-cli] /usr/bin/az wrapper does not account for environments where an alternate python is used (RHEL8) (Issue #28530)
Yes
—
Reply to this email directly, view it on GitHub<#28530 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AURCPKPWZXYXTNVM3MUWTW3YX66KTAVCNFSM6AAAAABENIZ57CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJTGI2TANJSG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
The 'az' shell script wrapper that sets up the call to python created during the RPM build process (scripts/release/rpm/azure-cli.spec) uses the first python3.9 that it finds in PATH:
However, we often times run az within scripts in environments where we use our own non-system Python that may not be compatible with az that can cause azure-cli to fail. Since the dnf/yum install process properly pulls down the system python3.9 as a dependency, it makes sense that az should call that instead of relying on what's in the user's environment. I realize based on the various commits and history that this is a very finicky and multi-faceted issue since many OS/distributions are involved, but at least for us it makes sense to explicitly set the PATH or python to be used so that azure-cli can be used even in environments where a conflicting Python is required. As an example, dnf uses #!/usr/libexec/platform-python in RHEL like distros.
It is possible to work around this issue by wrapping around the az wrapper and setting the right values explicitly, but it makes more sense to have the actual az wrapper handle the logic correctly in the first place.
Related command
Steps to reproduce using a Rocky Linux 8 container:
Errors
N/A
Issue script & Debug output
N/A
Expected behavior
az / azure-cli to function even when the first python in PATH is set to an alternative Python install
Environment Summary
azure-cli 2.58.0-1.el8
Additional context
No response
The text was updated successfully, but these errors were encountered: