SDDC manager skipped, when setting the target version for plan patching using the API 'v1/releases/domains'
search cancel

SDDC manager skipped, when setting the target version for plan patching using the API 'v1/releases/domains'

book

Article ID: 427624

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

  • When the v1/releases/domains endpoint is invoked via custom automation using the following payload, the target version is applied directly to the vCenter, bypassing the SDDC Manager update process.

{
  "targetVersion": "5.2.1.0",
  "patches": [
    {
      "productType": "SDDC_MANAGER",
      "version": " 5.2.2.0-24936865"
    },
    {
      "productType": "VCENTER",
      "version": "' 8.0.3.00600-24853646"
    }
  ]
}

  • When the API is invoked again with the same payload, the the SDDC manager will be set for the upgrade. 

  • Logs on SDDC Manager located at /var/log/vmware/vcf/lcm/lcm-debug.log, the following will be seen.
     
    • First attempt of the API invocation 

YYYY:MM:DDTHH:MM:SS DEBUG [vcf_lcm,6973054e661e3acdf1b8f9412b740641,7dcc] [c.v.v.l.r.a.c.v.u.DomainReleaseViewController,http-nio-127.0.0.1-7400-exec-8] Save target vcf version {"targetVersion":"5.2.1.0","patches":[{"productType":"VCENTER","version":"8.0.3.00600-24853646"}]} for domain 7XXXXXXX-5XXX-4XXX-aXXX-0XXXXXXXXXXXX

    • Second Attempt of the API will have the following payloads captured. 

YYYY:MM:DDTHH:MM:SS DEBUG [vcf_lcm,697305a37597c98948747f7142f22aef,9f62] [c.v.v.l.r.a.c.v.u.DomainReleaseViewController,http-nio-127.0.0.1-7400-exec-2] Save target vcf version {"targetVersion":"5.2.1.0","patches":[{"productType":"SDDC_MANAGER","version":"5.2.2.0-24936865"},{"productType":"VCENTER","version":"8.0.3.00600-24853646"}]} for domain 7XXXXXXX-5XXX-4XXX-aXXX-0XXXXXXXXXXXX

  • Directly Invoking the API from the Developer Center -> API of SDDC manager will set for both the SDDC manager and the vCenter in the first go.  

Environment

  • VCF 5.X 

Cause

The issue was identified to be logic miss on the custom Automation which passes only {"productType": "VCENTER","version": "' 8.0.3.00600-24853646"} in its first attempt, and then pasess the whole payload the second time. 

Resolution

To resolve the issue, invoke the API from the SDDC manager UI. 

  1. Log into the SDDC manager with a user with the admin privileges
  2. Navigate to Developer Center -> API explorer 
  3. Search for v1/releases/domains/ {id} 
  4. Under the id blank enter the domain id of the management domain.
  5. Under the payload box, enter the following payload 

{
  "targetVersion": "5.2.1.0",
  "patches": [
    {
      "productType": "SDDC_MANAGER",
      "version": " 5.2.2.0-24936865"
    },
    {
      "productType": "VCENTER",
      "version": "' 8.0.3.00600-24853646"
    }
  ]
}

6. Click invoke. 
7. Result 200 will be reported indicating a successful API invocation. 
8. Navigate to Workloads- > Management domain -> Updates 
9. The sddc manager update will now be available to be initiated.