Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Add-AzureRmServiceFabricApplicationCertificate added cert cannot be removed #1460

Closed
yuez1989 opened this issue Feb 27, 2019 · 3 comments
Closed

Comments

@yuez1989
Copy link

yuez1989 commented Feb 27, 2019

Hi Service Fabric Team,

Our team encountered an issue that is similar to issue #932 . We first tried to use Add-AzureRmServiceFabricApplicationCertificate on a Azure Key Vault that is not in the same location as our SF cluster. It thrown an error, so we changed to another Key Vault. However, the VM setting still remembers the previous key vault address, thus the certificate cannot be installed and we got blocked.

The version of our Azure PowerShell was behind the bug fix version when we first called Add-AzureRmServiceFabricApplicationCertificate. After that, it was updated to the latest version. However the issue still persists. I think we still need to remove the old certificate from the VMs.

We applied the the workaround @rovinbhandari provided in the original bug report. However, the last step could not work out:

Update-AzureRmVmss -ResourceGroupName $vmssrgname -Name $vmssname -VirtualMachineScaleSet $vmss

Error message:

Update-AzureRmVmss : Long running operation failed with status 'Failed'. Additional Info:'Key Vault https://[My KV]/secrets/[secret name]/[secret version]
either has not been enabled for deployment or the vault id provided,
/subscriptions/[resource ID]/resourceGroups/[OLD KeyVault Name]/providers/Microsoft.KeyVault/vaults/[OLD KeyVault Name], does not match the Key Vault's true resource id.'
ErrorCode: KeyVaultAccessForbidden

Please note that we supplied valid information both for secret identifier and for NEW key vault name. However, in the error message, OLD key vault name overwrote the NEW key vault name we supply.

Could you kindly help us solve this issue?

@yuez1989
Copy link
Author

Appreciate your help since our production is blocked by this issue. Thank you!

@ashishnegi
Copy link
Contributor

Please raise support request ICM from Microsoft support channel for production issues.
Does the workaround mentioned in this comment works for you :

The workaround is to remove the offending cert in the vmss model by going to resources.azure.com

@yuez1989
Copy link
Author

yuez1989 commented Mar 5, 2019

We redeployed the service and the cert is removed. Thank you!

@yuez1989 yuez1989 closed this as completed Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants