equinix / terraform-equinix-metal-anthos-on-vsphere

[Deprecated] Automated Anthos Installation via Terraform for Equinix Metal with vSphere
https://registry.terraform.io/modules/equinix/anthos-on-vsphere/metal/latest
Apache License 2.0
62 stars 41 forks source link

no eligible ssds in vsan_claim.py #107

Closed displague closed 2 weeks ago

displague commented 3 years ago

I captured the following log output while attempting to provision this module with the following non-default, Packet device, settings:

esxi_size       = "c3.medium.x86"
router_size     = "c2.medium.x86"
esxi_host_count = "1"
facility        = "dfw2"
Traceback (most recent call last):
  File "vsan_claim.py", line 97, in <module>
    smallerSize = min([disk.capacity.block * disk.capacity.blockSize for disk in ssds])
ValueError: min() arg is an empty sequence

By adding a print statement in vsan_claim.py, we can see that none of the ssd=True disks were status='eligible') (only one disk is shown here, for brevity. Each of the three included the error message that the disk contained existing partitions):

88 diskmap = {host: {'cache':[],'capacity':[]} for host in hosts}
89 cacheDisks = []
90 capacityDisks = []
91
92 for host in hosts:
93     print(repr(hostProps[host]['configManager.vsanSystem'].QueryDisksForVsan())) # added for debugging
94     ssds = [result.disk for result in hostProps[host]['configManager.vsanSystem'].QueryDisksForVsan() if
95         result.state == 'eligible' and result.disk.ssd]
97     smallerSize = min([disk.capacity.block * disk.capacity.blockSize for disk in ssds])
  (vim.vsan.host.DiskResult) {
      dynamicType = <unset>,
      dynamicProperty = (vmodl.DynamicProperty) [],
      disk = (vim.host.ScsiDisk) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         deviceName = '/vmfs/devices/disks/naa.500a075127d5116d',
         deviceType = 'disk',
         key = 'key-vim.host.ScsiDisk-0200000000500a075127d5116d4d5446444441',
         uuid = '0200000000500a075127d5116d4d5446444441',
         descriptor = (vim.host.ScsiLun.Descriptor) [
            (vim.host.ScsiLun.Descriptor) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               quality = 'highQuality',
               id = 'naa.500a075127d5116d'
            },
            (vim.host.ScsiLun.Descriptor) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               quality = 'mediumQuality',
               id = 'vml.0200000000500a075127d5116d4d5446444441'
            },
            (vim.host.ScsiLun.Descriptor) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               quality = 'mediumQuality',
               id = '0200000000500a075127d5116d4d5446444441'
            }
         ],
         canonicalName = 'naa.500a075127d5116d',
         displayName = 'Local ATA Disk (naa.500a075127d5116d)',
         lunType = 'disk',
         vendor = 'ATA     ',
         model = 'MTFDDAK480TDC   ',
         revision = 'F003',
         scsiLevel = 6,
         serialNumber = 'unavailable',
         durableName = <unset>,
         alternateName = (vim.host.ScsiLun.DurableName) [],
         standardInquiry = (byte) [],
         queueDepth = 32,
         operationalState = (str) [
            'ok'
         ],
         capabilities = (vim.host.ScsiLun.Capabilities) {
            dynamicType = <unset>,
            dynamicProperty = (vmodl.DynamicProperty) [],
            updateDisplayNameSupported = true
         },
         vStorageSupport = 'vStorageUnknown',
         protocolEndpoint = false,
         perenniallyReserved = <unset>,
         clusteredVmdkSupported = <unset>,
         capacity = (vim.host.DiskDimensions.Lba) {
            dynamicType = <unset>,
            dynamicProperty = (vmodl.DynamicProperty) [],
            blockSize = 512,
            block = 937703088
         },
         devicePath = '/vmfs/devices/disks/naa.500a075127d5116d',
         ssd = true,
         localDisk = true,
         physicalLocation = (str) [],
         emulatedDIXDIFEnabled = false,
         vsanDiskInfo = <unset>,
         scsiDiskType = <unset>
      },
      state = 'ineligible',
      vsanUuid = '',
      error = (vim.fault.DiskHasPartitions) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         msg = "Existing partitions found on disk 'naa.500a075127d5116d'.",
         faultCause = <unset>,
         faultMessage = (vmodl.LocalizableMessage) [],
         device = 'naa.500a075127d5116d'
      },
      degraded = <unset>
   }
displague commented 3 years ago

I ran into a similar error on equinix/terraform-metal-vsphere#19 caused by having 1 ESXI compute noted.