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

Error for rdbms module on alpine docker container #30102

Closed
hapeka72 opened this issue Oct 16, 2024 · 8 comments
Closed

Error for rdbms module on alpine docker container #30102

hapeka72 opened this issue Oct 16, 2024 · 8 comments
Assignees
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. PostgreSQL Service Attention This issue is responsible by Azure service team.

Comments

@hapeka72
Copy link

Describe the bug

We are using the Azure CLI from inside a Docker container based on Alpine Linux.
Since a few days we are getting this error when running certain commands:

Error loading command module 'mysql': cannot import name 'mysql_flexibleservers' from 'azure.mgmt.rdbms' (/usr/local/lib/python3.11/site-packages/azure/mgmt/rdbms/init.py)
Error loading command module 'rdbms': No module named 'azure.mgmt.rdbms.mysql_flexibleservers'
'postgres' is misspelled or not recognized by the system.

I am able to reproduce the error using the following steps:

  1. Install azure-cli in a docker container based on python:alpine as described on Install Azure CLI on Alpine Linux #19591
  2. Execute this command in the container: az postgres server key list

The error started to appear on October 12, one day earlier it still worked.
I suspect that something is wrong with the azure-mgmt-rdbms library (it recevied an update on that day).

Related command

az postgres server key list

Errors

Error loading command module 'mysql': cannot import name 'mysql_flexibleservers' from 'azure.mgmt.rdbms' (/usr/local/lib/python3.11/site-packages/azure/mgmt/rdbms/init.py)
Error loading command module 'rdbms': No module named 'azure.mgmt.rdbms.mysql_flexibleservers'
'postgres' is misspelled or not recognized by the system.

Issue script & Debug output

I am able to reproduce the error using the following steps:

  1. Install azure-cli in a docker container based on python:alpine as described on Install Azure CLI on Alpine Linux #19591
  2. Execute this command in the container: az postgres server key list

Expected behavior

no error

Environment Summary

azure-cli 2.65.0

core 2.65.0
telemetry 1.1.0

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/usr/local/bin/python3.13'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.13.0 (main, Oct 8 2024, 00:10:24) [GCC 13.2.1 20240309]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@hapeka72 hapeka72 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Oct 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Service Attention This issue is responsible by Azure service team. labels Oct 16, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Oct 16, 2024

Thank you for opening this issue, we will look into it.

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sunilagarwal, @sr-msft, @niklarin.

@hapeka72
Copy link
Author

I found out that I can work around the issue if I run
pip install --force-reinstall -v "azure-mgmt-rdbms==10.2.0b17"
after installing the azure-cli.

@randallt
Copy link

pip install --force-reinstall -v "azure-mgmt-rdbms==10.2.0b17"

I verified that this indeed eliminates the ERRORs for me as well.

@aymptlt
Copy link

aymptlt commented Oct 22, 2024

Isn't there a more elegant way to fix this error? I can't find where the initial problem comes from since all versions of this library seem to be fixed in the project.

My installation of the Azure CLI is automated, and I don't really want to add a 'pip force reinstall' in my Dockerfile to work around an error that could be resolved :)

Thanks

@aymptlt
Copy link

aymptlt commented Nov 12, 2024

hi, fyi the new 2.66.0 version works like a charm ! We don't have the error anymore. Thank you

@zffocussss
Copy link

hi, fyi the new 2.66.0 version works like a charm ! We don't have the error anymore. Thank you

the errors are still here,though upgrade to version 2.66.0

@hapeka72
Copy link
Author

hapeka72 commented Dec 2, 2024

for me it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. PostgreSQL Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

6 participants