VMware Cloud Community
Bembel
Enthusiast
Enthusiast

vCSA VAMI API through PowerCLI returns different value for updates available

Hi everyone,

following Willian Lam's series of articles about vCSA VAMI API (https://www.virtuallyghetto.com/2017/01/exploring-new-vcsa-vami-api-wpowercli-part-2.html​) I tried to include the check for vCSA's software update availability into my standard health checks.

But I have a problem using /appliance/system/health/softwarepackages – while I get an answer, the answer actually is incorrect.

Everyday I am running a script to check the health status of our ESXi servers and ever since we moved to vCSA I also needed to include the appliance in these health checks.

Just recently I found out that even though the VAMI UI displays an update available – in this case build 6.5.0.12000 – the API call returns “green”:

C:\> $healthSoftwareUpdates = (Get-CisService -Name ‘com.vmware.appliance.health.softwarepackages’).get()

C:\> echo $healthSoftwareUpdates

green

C:\>

VAMI_API.png

As I could not find an API call to check online for updates prior to get the health status (this was the way I check for updates with the Windows vCenter server) I have scheduled automatic update check in the VAMI UI but this would not to the trick.

Can anyone confirm this behaviour? Is this a possible bug?

5 Replies
LucD
Leadership
Leadership

Confirmed. I get the same result, there is a VCSA update shown in the VAMI, none via the REST API.

But, did you switch on the "Check for updates automatically" in the VAMI?

updates.jpg


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Bembel
Enthusiast
Enthusiast

Hi LucD,

thanks for your quick reply!

Yes, it is enabled:

pastedImage_0.png

0 Kudos
LucD
Leadership
Leadership

Then it looks like a "feature", I get "green" as well all the time, although there is an update listed in the VAMI.

Since the REST API doesn't seem to be marked as experimental, I guess you could open a SR.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
kmruddyVMW
Enthusiast
Enthusiast

Unfortunately the call's description is incorrect.

The value's description provides the proper information regarding that call. That can be viewed in the SDK docs: vsphere-automation-sdk-rest/client.zip at master · vmware/vsphere-automation-sdk-rest · GitHub

Defines health levels Value is one of:

orange: The service health is degraded. The service might have serious problems

gray: No health data is available for this service.

green: Service is healthy.

red: The service is unavaiable and is not functioning properly or will stop functioning soon.

yellow: The service is healthy state, but experiencing some levels of problems.software updates available.

I've filed a request to get that information corrected and updated.

Thanks!

Bembel
Enthusiast
Enthusiast

Things changed a bit with the new vCSA version (6.5.0.14000 Build Number 7515524) - now the automatic update setting does not work automatically anymore, meaning when I sign in to the VAMI portal page the available update status has not been checked anymore. Manually checking (against the repository) works though.

Additionally I started to get "gray" when I run the script above even after I have manually checked update availability against the repository, which tells me "Latest updates already installed on vCSA, nothing to stage/install" on the VAMI portal page.

0 Kudos