Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

"az sig update" ability to update gallery that has SoftDeletePolicy set to False #27017

Open user127057 opened 1 year ago

user127057 commented 1 year ago

Related command az sig update

Is your feature request related to a problem? Please describe. For Azure Shared Image Galleries (SIG) with property “softDeletePolicy” set to False, instead of Null, "az sig update" is failing with error: "Subscription is not registered with the feature Microsoft.Compute/SigSoftDelete. Please register the subscription before retrying the call" image

Describe the solution you'd like Be able to use "az sig update" to update Azure Shared Image Galleries (SIG) whose property “softDeletePolicy” was set to False.

Describe alternatives you've considered Right now, newly created Azure Shared Image Galleries (SIG) property “softDeletePolicy” is set to Null by default.

Additional context +Cx had three galleries which were created in April 2022, all having this the issue. The same happens when calling powershell command "Update-AzGallery"

yonzhan commented 1 year ago

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

zhoxing-ms commented 1 year ago

"Subscription is not registered with the feature Microsoft.Compute/SigSoftDelete. Please register the subscription before retrying the call"

I guess this is because this feature is still in the private preview stage and requires customers to register it first. @kangsun-ctrl Could you please take a look at this issue?

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @avirishuv, @vaibhav-agar, @amjads1.

Issue Details
**Related command** az sig update **Is your feature request related to a problem? Please describe.** For Azure Shared Image Galleries (SIG) with property “softDeletePolicy” set to False, instead of Null, "az sig update" is failing with error: "Subscription is not registered with the feature Microsoft.Compute/SigSoftDelete. Please register the subscription before retrying the call" ![image](https://github.com/Azure/azure-cli/assets/140574211/bab60e1c-cb56-4fbe-9c4e-83835a31b9d1) **Describe the solution you'd like** Be able to use "az sig update" to update Azure Shared Image Galleries (SIG) whose property “softDeletePolicy” was set to False. **Describe alternatives you've considered** Right now, newly created Azure Shared Image Galleries (SIG) property “softDeletePolicy” is set to Null by default. **Additional context** +Cx had three galleries which were created in April 2022, all having this the issue. The same happens when calling powershell command "Update-AzGallery"
Author: user127057
Assignees: zhoxing-ms
Labels: `Compute`, `Service Attention`, `customer-reported`, `Auto-Assign`, `Azure CLI Team`
Milestone: August 2023 (2023-09-05)
user127057 commented 1 year ago

Thanks for the reply, but +Cx had never set this “softDeletePolicy" when creating the gallery. According to MS Product team, this feature is not currently supposed to be used/registered.

+Not sure why Cx gallery, which was created back in April 2022, had this property set to False instead of Null at the beginning.

+Now, since “softDeletePolicy" is False, is there a work around to update/change this property, so that Cx can keep using "az sig update" to update his gallery.

kangsun-ctrl commented 1 year ago

@zhoxing-ms hey Xing, looks like this issue is a regression on https://github.com/Azure/azure-cli/issues/20658, the mentioned issue should prevent this problem.

@user127057 Hey for your mitigation, the easiest one is to use ARM template to deploy the change, and when you input gallery, do not include softDeletePolicy in the payload, then you should be fine I think.

TravisCragg-MSFT commented 1 year ago

@sandeepraichura FYI

user127057 commented 1 year ago

@zhoxing-ms hey Xing, looks like this issue is a regression on #20658, the mentioned issue should prevent this problem.

@user127057 Hey for your mitigation, the easiest one is to use ARM template to deploy the change, and when you input gallery, do not include softDeletePolicy in the payload, then you should be fine I think.

Thanks @kangsun-ctrl message. We actually tried to deploy using ARM template, but after deployment, this softDeletePolicy showed up again and set to False for some reason.

kangsun-ctrl commented 1 year ago

@zhoxing-ms hey Xing, looks like this issue is a regression on #20658, the mentioned issue should prevent this problem. @user127057 Hey for your mitigation, the easiest one is to use ARM template to deploy the change, and when you input gallery, do not include softDeletePolicy in the payload, then you should be fine I think.

Thanks @kangsun-ctrl message. We actually tried to deploy using ARM template, but after deployment, this softDeletePolicy showed up again and set to False for some reason.

@user127057 in my opinion, it is fine that it is false since it is actually false, but i can modify it to null for you in the backend if you want. The problem happens due to a past regression in SIG side and unfortunately your gallery was created during that time so it has 'false' as the softDeletePolicy, we fix the issue and after that, it is always null if you do not input it.

user127057 commented 1 year ago

@user127057 in my opinion, it is fine that it is false since it is actually false, but i can modify it to null for you in the backend if you want. The problem happens due to a past regression in SIG side and unfortunately your gallery was created during that time so it has 'false' as the softDeletePolicy, we fix the issue and after that, it is always null if you do not input it.

+Thanks for the information. These galleries belong to one customer, let me check with customer and maybe you can help reset it on one gallery for test. What information do you need? Subscription ID and gallery resource URI? +Customer just hopes to be able to use "az sig update" and "Update-AzGallery" command to update these galleries property, such as tags. Right now, with softDeletePolicy =False, it seems these commands keep failing.

kangsun-ctrl commented 1 year ago

@user127057 if the AzCLi fix got in, then cx should be able to do so, for my backend, i only need ARM id for this resource.

user127057 commented 1 year ago

@user127057 if the AzCLi fix got in, then cx should be able to do so, for my backend, i only need ARM id for this resource.

As you can see in the screenshot below, customer was using latest AzCLi in cloud shell, the fix should be in I assume, but still, seeing errors when attempting to update any property using "az sig update" image

What is ARM id, where can we find it? Thanks!

kangsun-ctrl commented 1 year ago

@user127057 what i mean is that CLI has a bug now, that's why this problem is surfacing while it was fine in the past.

The arm id is like /subscription/xxx/resourcegroup/xxx/Microsoft.Compute/Galleries/xxx

user127057 commented 1 year ago

CLI has a bug now, that's why this problem is surfacing while it was fine in the past.

Thanks Kangsun. We've got customer approval, how should I deliver the resource ID to you? is there an email address?

user127057 commented 1 year ago

@user127057 what i mean is that CLI has a bug now, that's why this problem is surfacing while it was fine in the past.

The arm id is like /subscription/xxx/resourcegroup/xxx/Microsoft.Compute/Galleries/xxx

HI @kangsun-ctrl How can sent the ARM ID to you? I don't think we can put down here

mikazka commented 11 months ago

Hi @kangsun-ctrl I have loaded a ticket with MS but apparently they don't have access to change it. Are you able to set mine to null as well? I can ping you the arm ID directly

kangsun-ctrl commented 11 months ago

Hi @kangsun-ctrl I have loaded a ticket with MS but apparently they don't have access to change it. Are you able to set mine to null as well? I can ping you the arm ID directly

Hey @mikazka and @user127057 , you can send me the ARM id by email, thanks!

sandeepraichura commented 2 months ago

Hello @user127057 - Is this still an issue ? SoftDelete feature is not yet available and shouldn't be enabled. and I noticed that the associated issue was also resolved. Can you verify and confirm if this is still an issue ?

microsoft-github-policy-service[bot] commented 2 weeks ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT, @ramankumarlive, @ushnaarshadkhan.

microsoft-github-policy-service[bot] commented 1 week ago

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!