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

ArcGIS_xDisk.psm1 has DataDisk hardcoded as DiskNumber =2, but this is not present on VMs that do not have a temporary disk. #510

Closed
mundayn opened this issue Dec 16, 2023 · 5 comments
Labels
Fixed Label for when an issue is fixed.

Comments

@mundayn
Copy link

mundayn commented Dec 16, 2023

Module Version

ModuleVersion = '4.2.0'

Affected Resource(s)

ArcGIS Enterprise Cloud Builder 11.2 for Microsoft Azure

Configuration Files

n/a for now

Expected Behavior

I deployed a VM using Standard_D8as_v5, but this SKU does not have a temporary disk.

I redeployed using Standard_D8ds_v5, which has a temp disk, and it works. (well it got further, but that's another issue)

I looked at the PowerShell files and found this hard coded - “ArcGIS_xDisk.psm1”
image

When I run 'Get-Disk' on the other SKU, it only had disk 0 and 1, no disk 2.
When changing SKU, this is resolved, as disk 2 is now the data disk.

There needs to be logic added to check for this scenario.

Actual Behavior

Error message: "DSC Configuration 'BaseDeploymentSingleTierConfiguration' completed with error(s). Following are the first few: No MSFT_Disk objects found with property 'Number' equal to '2'.

Steps to Reproduce

Build a VM with a SKU with no temp disk.

AndrewQuartic added a commit to AndrewQuartic/arcgis-powershell-dsc that referenced this issue Mar 25, 2024
… then reference disk number from disk object.
AndrewQuartic added a commit to AndrewQuartic/arcgis-powershell-dsc that referenced this issue Mar 25, 2024
… then reference disk number from disk object.
@AndrewQuartic
Copy link

I noticed the following template contains additional logic for formatting and partitioning: https://github.com/Esri/arcgis-powershell-dsc/blob/main/Modules/ArcGIS/Configurations-Azure/DiskConfiguration.ps1

However, it contains the same hardcoded integer value assuming that a temp disk is always present. Do we assume that partition happens before the basedeployment DSC configuration is run?

AndrewQuartic added a commit to AndrewQuartic/arcgis-powershell-dsc that referenced this issue Mar 25, 2024
… then reference disk number from disk object.
@cameronkroeker
Copy link
Contributor

@AndrewQuartic Thanks! This has been addressed in ArcGIS Enterprise Cloud Builder 11.3 for Microsoft Azure.

@cameronkroeker cameronkroeker added the Fixed Label for when an issue is fixed. label May 23, 2024
@AndrewQuartic
Copy link

@cameronkroeker This issue is not yet addressed, we just forked and attempted again using a VM SKU without temp disk and the result was the same.

@AndrewQuartic
Copy link

AndrewQuartic commented Jun 6, 2024

We are proposing the following code fix:

$UnallocatedDataDisks = Get-Disk | Where-Object partitionstyle -eq 'raw' | Sort-Object number
# Initialize an array of disks starting with F
$Letters = 70. .89 | ForEach - Object {
    [char] $_
}
$Count = 0

# iterate though unallocated disks and partition each in sequence ordered by disk number
foreach($Disk in $UnallocatedDataDisks) {
    $DataDiskDriveLetter = $Letters[$Count].ToString()
    ArcGIS_xDisk DataDisk$ {
        DataDiskDriveLetter
    } {
        DiskNumber = $Disk.number
        DriveLetter = $DataDiskDriveLetter
    }
    if (Get - Partition - DriveLetter $DataDiskDriveLetter - ErrorAction Ignore) {
        ArcGIS_Disk DataDiskSize {
            DriveLetter = $DataDiskDriveLetter
            SizeInGB = 4095
            DependsOn = $Depends
        }
    }
    $Depends += "[ArcGIS_xDisk]DataDisk${DataDiskDriveLetter}"
    $Count++
}

@cameronkroeker
Copy link
Contributor

@cameronkroeker This issue is not yet addressed, we just forked and attempted again using a VM SKU without temp disk and the result was the same.

It didn't work using ArcGIS Enterprise Cloud Builder 11.3 for Microsoft Azure or didn't work using the DSC ArcGIS Module directly? Just want to verify because it is not designed to work outside of CloudBuilder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Label for when an issue is fixed.
Projects
None yet
Development

No branches or pull requests

3 participants