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

Adding a workload profile to existing Container Apps Environment fails #28998

Closed
miceiken opened this issue May 21, 2024 · 6 comments · Fixed by #29682
Closed

Adding a workload profile to existing Container Apps Environment fails #28998

miceiken opened this issue May 21, 2024 · 6 comments · Fixed by #29682
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. Possible-Solution Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@miceiken
Copy link

Describe the bug

Adding a workload profile to existing Container Apps Environment fails

Related command

az containerapp env workload-profile add \
  --name -snip- \
  --resource-group -snip- \
  --workload-profile-name consumption \
  --workload-profile-type Consumption \
  --min-nodes 1 \
  --max-nodes 5

Errors

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 701, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 334, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/containerapp/custom.py", line 4932, in add_workload_profile
    workload_profiles_lower = [p["name"].lower() for p in workload_profiles]
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

Issue script & Debug output

unrecognized arguments:  --debug

😉

Expected behavior

A workload profile is created and added to the Container Apps Environment.

Environment Summary

azure-cli                         2.61.0

core                              2.61.0
telemetry                          1.1.0

Extensions:
arcdata                           1.5.13
azure-devops                       1.0.1
containerapp                      0.3.52
resource-graph                     2.1.0

Dependencies:
msal                              1.28.0
azure-mgmt-resource               23.1.1

Python location '/usr/local/Cellar/azure-cli/2.61.0/libexec/bin/python'
Extensions directory '/Users/michaeleikelandtt/.azure/cliextensions'

Python (Darwin) 3.11.9 (main, Apr  2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]

Additional context

No response

@miceiken miceiken added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 21, 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 ContainerApp Service Attention This issue is responsible by Azure service team. labels May 21, 2024
Copy link

Hi @miceiken
Find similar issue #22235.

Issue title Storage commands failling on Fedora 35 when Python 3.6 is not present
Create time 2022-04-29
Comment number 7

Possible solution:
It seems that the error message you are seeing is related to a missing package libpython3.6m.so.1.0()(64bit) which is not included in the RPM's requirement since 2.35.0. One workaround is to specify python36 in the RPM's requirement. Another workaround is to install Azure CLI using pip instead of RPM.

However, since Python 3.6 is now deprecated, the better solution is to build RPMs with the latest Fedora. You can use dnf command to query the package contents.


Please confirm if this resolves your issue.

@yonzhan
Copy link
Collaborator

yonzhan commented May 21, 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 @calvinsID.

@miceiken
Copy link
Author

Hi @miceiken Find similar issue #22235.

Issue title Storage commands failling on Fedora 35 when Python 3.6 is not present
Create time 2022-04-29
Comment number 7
Possible solution: It seems that the error message you are seeing is related to a missing package libpython3.6m.so.1.0()(64bit) which is not included in the RPM's requirement since 2.35.0. One workaround is to specify python36 in the RPM's requirement. Another workaround is to install Azure CLI using pip instead of RPM.

However, since Python 3.6 is now deprecated, the better solution is to build RPMs with the latest Fedora. You can use dnf command to query the package contents.

Please confirm if this resolves your issue.

This does not seem related.

@Greedygre
Copy link
Contributor

Hi @miceiken
Thanks for reporting this issue, I will take a look.

May I ask what this the result when you execute this command:
az containerapp env show -n {env-name} -g {rg} --query "properties.workloadProfiles"

Thanks

@Greedygre
Copy link
Contributor

Greedygre commented May 30, 2024

Hi @miceiken
I have checked this error. This is due to your managed environment is not an environment that enable workload profiles.
We don't support adding workload profiles for an environment that doesn't enable workload profiles. The existing environment which not enable workload profiles also not support change to enable.

You can create a new environment enable workload-profiles with following command:
az containerapp env create -g {} -n {} --location {} --logs-destination none --enable-workload-profiles

I will create a PR to give a more friendly message for this issue.

Thanks

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 Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. Possible-Solution Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
3 participants