vGPU allocations in Rancher > Cluster Manager of a...
# rancher-setup
n
vGPU allocations in Rancher > Cluster Manager of a Harvester Cluster is broken in 2.11.3. Was working in 2.8.5 Getting a JSON Parse error: Unexpected EOF Found the issue here in the UI.
Copy code
validatorVGpus(errors) {
      const notAllocatable = this.vGpus
        .map((type) => {
          const allocated = this.machinePools.reduce((acc, machinePool) => {
            const vGPURequests = JSON.parse(machinePool?.config?.vgpuInfo || '')?.vGPURequests;

            const vGpuTypes = vGPURequests?.map((r) => r?.deviceName).filter((f) => f) || [];

            if (vGpuTypes.includes(type)) {
              return acc + machinePool.pool.quantity;
            }

            return acc;
          }, 0);

          return {
            vGpu: Object.values(this.vGpuDevices).filter((f) => f.type === type)?.[0],
            allocated
          };
        })
        .filter(({ vGpu, allocated }) => vGpu && vGpu.allocatable > 0 && vGpu.allocatable < allocated);

      notAllocatable.forEach(({ vGpu, allocated }) => {
        const message = this.$store.getters['i18n/t']('cluster.credential.harvester.vGpus.errors.notAllocatable', {
          vGpu:        vGpu?.type,
          allocated,
          allocatable: vGpu?.allocatable
        });

        errors.push(message);
      });
    },
I can't tell what it is trying to save because it doesn't do a network event. This is what it should be using.
Copy code
vgpuInfo: >-
        {"vGPURequests":[{"name":"harvesterdev7-00000b004","deviceName":"nvidia.com/NVIDIA_RTX5000-Ada-16Q"}]}