Azure / Azure/aksArc

[BUG] After unsuccessful installation arc with Enable-AksHciArcConnection, Disable-AksHciArcConnection should delete addon on management cluster

Open
#182 1 comment 0 reactions 1 assignee Claimed by @nwoodmsft View on GitHub
Bug
Dominant language
PowerShell
Stars
118
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Arc installation without proper parameters with Enable-AksHciArcConnection leads to arc-onboarding process fail. To cleanup failed arc onboarding process execution of Disable-AksHciArcConnection does not delete addon < target-cluster >-arc-onboarding"

**To Reproduce**
Steps to reproduce the behavior:
1. Enable-AksHciArcConnection without or wrong authentication paramters
2. watch pods in azure-arc-onboarding namesace to fail
3. Disable-AksHciArcConnection
4. Enable-AksHciArcConnection with proper parameters.
´´´
cluster addons arc install --cluster-name target1 --kubeconfig "V:\AKS-HCI\WorkingDir\1.0.9.10413\kubeconfig-mgmt" --subscription-id xxxxx --tenant-id xxxxxx --resource-group AksHciAzureEval --location eastus --azure-creds-stdin returned a non zero exit code 1 [Error: addons.msft.microsoft "target1-arc-onboarding" already exists ]. At C:\Program Files\WindowsPowerShell\Modules\Kva\1.0.25\Kva.psm1:4230 char:9 + throw $([System.String]::Format([System.Globalization.Culture ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: ( cluster addons...eady exists ].:String) [], RuntimeException + FullyQualifiedErrorId : cluster addons arc install --cluster-name target1 --kubeconfig "V:\AKS-HCI\WorkingDir\1 .0.9.10413\kubeconfig-mgmt" --subscription-id xxxx--tenant-id xxxx --resource-group AksHciAzureEval --location eastus --azure-creds-stdin returned a non zero exit code 1 [Error: addons.msft.microsoft "target1-arc-onboarding" already exists ].
```
**Expected behavior**
Disable-AksHciArcConnection should delete addon < target-cluster >-arc-onboarding component in management cluster

**Environment (please complete the following information):**
Name Value
---- -----
catalog aks-hci-stable-catalogs-ext
controlplaneVmSize Standard_A4_v2
ipaddressprefix 192.168.0.0/16
identity bmFtZTogNDM0NTQ1YWQtMWI2OS00ZjM2LThiNTItMGMzNmM4NGNlOTMxCnRva2VuOiBleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWpGaVkyTmlPV0UxWldNMFl6UmpOelV5TW1Zd1pqUXlNVGd3TWpNek5EWXlaV000Wldaa09USmlPVE13TlRNMU1qYzJZamxsWldZNFl6WXdZVEptTWpNaUxDSjBlWEFpT2lKS1YxUWlmU...
kubeconfig V:\AKS-HCI\WorkingDir\1.0.9.10413\kubeconfig-mgmt
ring earlyaccesspreview
k8snodeippoolend 192.168.0.149
containerRegistryUser 1516df5a-f1cc-4a6a-856c-03d127b02d05
imageDir V:\AKS-HCI\Images
skipUpdates False
vlanid 0
proxyServerNoProxy
version 1.0.9.10413
kvaconfig V:\AKS-HCI\WorkingDir\1.0.9.10413\yaml\appliance.yaml
proxyServerCertFile
vnetvippoolstart 192.168.0.150
proxyServerHTTPS
installState 7
group clustergroup

macpoolname MocMacPool
cloudAgentAuthorizerPort 65000

stagingShare
workingDir V:\AKS-HCI\WorkingDir
vnetvippoolend 192.168.0.250
dnsservers 192.168.0.1
kvaK8sVersion v1.22.6
useStagingShare False
proxyServerUsername
cloudAgentPort 55000
addonTokenValidity 60
proxyServerHTTP
manifestCache V:\AKS-HCI\WorkingDir\aks-hci-stable-catalogs-ext.json
cloudLocation MocLocation
kvaSkipWaitForBootstrap False

kvaPodCidr 10.244.0.0/16
k8snodeippoolstart 192.168.0.3
azureResourceGroup AksHciAzureEval
azureLocation eastus
vnetName mgmtvnet
moduleVersion 1.0.22
proxyServerPassword
operatorTokenValidity 90
macPoolEnd
tokenExpiryDays 90
gateway 192.168.0.1
vswitchName InternalNAT
insecure False
installationPackageDir V:\AKS-HCI\WorkingDir\1.0.9.10413
macPoolStart

**Additional context**
Add any other context about the problem here.

**Collect log files**
- From a PowerShell Admin window run **Get-AksHciLogs**
- If you are running into issues with the deployment wizard in Windows Admin Center, run
**Get-SMEUILogs.ps1** from the machine hosting Windows Admin Center.”

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.