This is strictly a problem with 8.17 and the yaml. My vRA 8.16 still works with the same template, only stopped working after the upgrade in my dev env. I've got no error logs, since it's just the yaml syntax error in the template. I'll just have to figure out another way to do it if min isn't working as it was for me in 8.16(and earlier).
Original Message:
Sent: Jun 13, 2024 06:01 PM
From: tarek_nader
Subject: Service broker template yaml error with 'min' command syntax in 8.17
There is nothing mentioned in vRA 8.17 release note about changing in blueprint YAML; so this issue is my be YAML indentation or recent modifications happened on YAML syntax.
https://docs.vmware.com/en/VMware-Aria-Automation/services/rn/vmware-aria-automation-release-notes/index.html
Could you share further logs / event / screenshot for the issue? Also try to restore to last working version from 'version history'
------------------------------
Tarek Nader
www.linkedin.com/in/tnader-70853361
Original Message:
Sent: Jun 13, 2024 11:10 AM
From: aardis
Subject: Service broker template yaml error with 'min' command syntax in 8.17
Thanks for the suggestion, adding a minItems to that field did not change the syntax error. I'm not sure what changed going into 8.17 but if anyone has a link to documentation with changes maybe that would help failing a suggestion on fixing or changing my yaml syntax to work properly.
Original Message:
Sent: Jun 12, 2024 06:14 PM
From: tarek_nader
Subject: Service broker template yaml error with 'min' command syntax in 8.17
Edit Blueprint YAML file & add this, hope it fix your current issue:-
disks:
type: array
minItems: 0
maxItems: 10
Original Message:
Sent: Jun 12, 2024 11:37 AM
From: aardis
Subject: Service broker template yaml error with 'min' command syntax in 8.17
After upgrading to 8.17 I'm getting this error in my yaml template regarding the usage of "min" (This worked in 8.16 and prior)
capacityGb: ${(length(input.disks)>0) ? min([input.disks[count.index].size,input.maxDiskSize]):0}
Invalid argument type calling 'min': expected array of numbers or string but was array of null and a number.
Obviously reading the error message I understand some null value is getting in there, but I have a default for my maxDiskSize set
maxDiskSize:
type: integer
$dynamicDefault: /data/vro-actions/com.ge.storage.configuration/getMaxChunkSize?location={{location}}
default: 10240
And my disks definition:
disks:
type: array
title: additional disks
items:
title: disk
type: object
properties:
mountPoint:
type: string
title: Mount Point
size:
type: integer
title: Size in GB
fsType:
type: string
title: File System Type
maxItems: 16
I'm not quite sure where the 'null' value is coming in, but I tried setting a disk default size to 1 and that didn't help either. I'm not a yaml expert, and the min option I can't find a lot of documentation on it but if I remove it my disk add fails. I inherited this code so I'm just trying to update it at this point, any opinion would be greatly appreciated.