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

lib/azure-fence.py.py: python-msrestazure deprecated #599

Open
varkoly opened this issue Nov 4, 2024 · 6 comments
Open

lib/azure-fence.py.py: python-msrestazure deprecated #599

varkoly opened this issue Nov 4, 2024 · 6 comments

Comments

@varkoly
Copy link

varkoly commented Nov 4, 2024

As described in https://pypi.org/project/msrestazure/ python-msrestazure is deprecated and should be replaced by azure-identity and azure-mgmt-core resp.

@oalbrigt
Copy link
Collaborator

oalbrigt commented Nov 4, 2024

It is needed for backwards compatibility with RHEL8 (except ImportError-cases).

The network-fencing part isnt currently used, so that will have to be addressed in the future if there is a reason to use that part again.

So the only part that needs updating is the cloud-imports it seems like (should have fallbacks with except ImportError until RHEL8 is EOL).

@glaubitz
Copy link

glaubitz commented Nov 4, 2024

Would it be possible for RHEL-8 to migrate away from the unmaintained msrestazure?

@oalbrigt
Copy link
Collaborator

oalbrigt commented Nov 4, 2024

I cant find an equivalent of the msrestazure cloud configs:
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/sphinx/multicloud.rst

Can you point me to an equivalent that we can use instead?
https://github.com/ClusterLabs/fence-agents/blob/main/lib/azure_fence.py.py#L273-L289

@varkoly
Copy link
Author

varkoly commented Dec 18, 2024

The cloud host are defined in the AzureAuthorityHosts of azure.identity
The problem is that at the moment only 3 hosts are defiend:
https://azuresdkdocs.blob.core.windows.net/$web/python/azure-identity/latest/azure.identity.html#azure.identity.AzureAuthorityHosts
AZURE_GERMAN_CLOUD is missing.
There is already an issue opened for it: Azure/azure-sdk-for-python#29023

@varkoly
Copy link
Author

varkoly commented Dec 18, 2024

In code of azure.identity stands that AZURE_GERMANY is deprecated:
class AzureAuthorityHostsMeta(type):
def getattr(cls, name):
if name == "AZURE_GERMANY":
warnings.warn(
"AZURE_GERMANY is deprecated. Microsoft Cloud Germany was closed on October 29th, 2021.",
DeprecationWarning,
stacklevel=2,
)
return "login.microsoftonline.de"
raise AttributeError(f"{name} not found in {cls.name}")

@varkoly
Copy link
Author

varkoly commented Dec 18, 2024

Created new pull request:
#602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants