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

az connectedk8s enable-features doesn't check if custom-locations-oid input parameter is valid #7375

Open
flecoqui opened this issue Mar 12, 2024 · 1 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. Connected Kubernetes Service Attention This issue is responsible by Azure service team.

Comments

@flecoqui
Copy link

Describe the bug

It's an issue related to "az connectedk8s enable-features" Azure client extension
azure client version: 2.58.0 running in an Ubuntu virtual machine in eastus2 region.

The command was used in a virtual machine hosting K3S cluster.

A script called the command line below, though the input parameter custom-locations-oid was incorrect (=4d5bfd0f-2428-4dcb-b8c7-9e439054b9a9), the command didn't raise any error like invalid GUID.

sudo -u azureuser az connectedk8s enable-features -n vmaio6989devcloudcorp -g rgaio6989devcloud --custom-locations-oid =4d5bfd0f-2428-4dcb-b8c7-9e439054b9a9 --features cluster-connect custom-locations
"Successsfully enabled features: ['cluster-connect', 'custom-locations'] for the Connected Cluster vmaio6989devcloudcorp"

Below the command and result with the correct GUID input:

sudo -u azureuser az connectedk8s enable-features -n vmaio6989devcloudcorp -g rgaio6989devcloud --custom-locations-oid **4d5bfd0f-2428-4dcb-b8c7-9e439054b9a9** --features cluster-connect custom-locations
"Successsfully enabled features: ['cluster-connect', 'custom-locations'] for the Connected Cluster vmaio6989devcloudcorp"

Actually, it seems this command 'az connectedk8s enable-features' accepts any string as input parameter without raising any error.

Related command

sudo -u azureuser az connectedk8s enable-features -n vmaio6989devcloudcorp -g rgaio6989devcloud --custom-locations-oid =4d5bfd0f-2428-4dcb-b8c7-9e439054b9a9 --features cluster-connect custom-locations

Errors

No error raised

Issue script & Debug output

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
This operation might take a while...

"Successsfully enabled features: ['cluster-connect', 'custom-locations'] for the Connected Cluster vmaio6989devcloudcorp"

Expected behavior

An error should be raised

Environment Summary

az --version
azure-cli 2.58.0

core 2.58.0
telemetry 1.1.0

Extensions:
azure-iot-ops 0.4.0b1
connectedk8s 1.6.6
customlocation 0.1.3
k8s-configuration 1.7.0
k8s-extension 1.6.1

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Python location '/opt/az/bin/python3'
Extensions directory '/home/azureuser/.azure/cliextensions'

Python (Linux) 3.11.7 (main, Feb 29 2024, 02:08:19) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@flecoqui flecoqui added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 12, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 12, 2024

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

@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Connected Kubernetes Service Attention This issue is responsible by Azure service team. labels Mar 12, 2024
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. Connected Kubernetes Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants