vmware / pyvmomi

VMware vSphere API Python Bindings
Apache License 2.0
2.19k stars 766 forks source link

Calling CheckCompatibility_Task() method from vSphere MOB which results in a 503 error causing vCenter services to crash #1035

Closed barateau closed 1 year ago

barateau commented 1 year ago

Describe the bug

Tested on multiple vCenter running the same version. 7U3D.

In order to upgrade ESXi hosts we have some automation that makes use of the MOB interface. The issue is when there is an API call made towards that MOB API. The automation uses pyvmomi sdk When we run the following check "checkCompatibility" the vCenter throws a 503 error and the vCenter services crash. https://developer.vmware.com/apis/vi-json/8.0.1.0/sdk/vim25/release/VirtualMachineCompatibilityChecker/moId/CheckCompatibility_Task/post/

Now when vCenter services crashed the only “fix” is to reboot. Just restarting services masks other issues.

Reproduction steps

  1. Issue is when there is an API call made towards that MOB API specifically to check compatibility.
  2. [/mob/?moid=CompatChecker&method=checkCompatibility]

Expected behavior

Not to crash vCenter.

Additional context

SR with VMware SDK support and they basically repeated the problem statement and then explained they dont support github deliverables.

"Calling the CheckCompatibility_Task() method from vSphere MOB which results in a 503 error causing vCenter services to crash"

vSphere API from MOB is not recommended and supported, it can only be used for testing purposes.

DanielDraganov commented 1 year ago

Hello,

This is an issue of the MOB, not pyVmomi. pyVmomi is just a mediator and with great certainty can be excluded from the suspect list. Unfortunately I couldn't find your SR, but you could add my comment to the SR if you wish to pursue pushing for a fix.

However, based on this statement "vSphere API from MOB is not recommended and supported, it can only be used for testing purposes.", I'm not sure if the reported issue is eligible for fixing at the moment.