AKS-Edge icon indicating copy to clipboard operation
AKS-Edge copied to clipboard

[Enhancement] Upgrade PowerShell cmdlets should perform a controller-based check for connected devices

Open erwinkersten opened this issue 2 years ago • 0 comments

The upgrade PowerShell cmdlets Start-AksEdgeControlPlaneUpdate and Start-AksEdgeWorkerNodeUpdate mount an ISO based on the function 'Add-IsoFileToVmmsVm'. In this function, a free LUN is detected, and a specific check is performed on connected DVD drives only.

[int[]]$luns = (Get-VMDvdDrive -VMName $vmName -ControllerNumber $controllerNumber).ControllerLocation

However, this check does not take into account other devices connected to the controller. I am aware that this is not a currently not an official supported scenario, but it would be better to perform this check on the scsi controller (instead of only DVD drives) to avoid conflicts. Background in our scenario we attach additional data disks to the VM, see also [Feature] Support for additional data disks for Single Machine Cluster these disk where added to the first available LUN and then this results in a conflict wile attaching the update iso.

Proposed fix:

[int[]]$luns = (Get-VMScsiController -VMName $vmName -ControllerNumber $controllerNumber).Drives.ControllerLocation

This small adjustment ensures a more comprehensive check on the controller, addressing potential conflicts caused by other connected devices.

Note: I registered this a as an Enhancement, as i couldn't find the PowerShell cmdlets in any public available repo to create a PR.

erwinkersten avatar Nov 13 '23 11:11 erwinkersten