"ERROR: update or delete on table "pm_depot_components" violates foreign key constraint "pm_depot_addons_components_component_name_fkey" on table "pm_depot_addons_components"" when running the "remove-addon.sh" script to remove vendor add-ons.
search cancel

"ERROR: update or delete on table "pm_depot_components" violates foreign key constraint "pm_depot_addons_components_component_name_fkey" on table "pm_depot_addons_components"" when running the "remove-addon.sh" script to remove vendor add-ons.

book

Article ID: 402690

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • On running the "remove-addon.sh" script per kb- Import offline bundle or sync operations may fail in vSphere Lifecycle Manager in vCenter Server Appliance 7.x/8.x to remove vendor add-on fails with "ERROR:  update or delete on table "pm_depot_components" violates foreign key constraint "pm_depot_addons_components_component_name_fkey" on table "pm_depot_addons_components"".
  • As a result, the "Sync Updates" via Lifecycle Manager fails with error "A general system error occurred: Download patch definitions task failed while syncing depots. Error: 'integrity.fault.HostPatchInvalidVendorCode: Invalid vendor code CIS in patch metadata, another vendor code with different capitalization already exists in database. Check the Lifecycle Manager log files for more details."
  • The original error may specify a HPE, Dell or any other vendor add-on component depending on the add-on imported to the VUM Database.

Environment

VMware vCenter Server 7.x
VMware vCenter Server 8.x

Cause

This original cause is a mismatch in vendor codes in the online and offline content downloaded into the vSphere Lifecycle Manager. However, even after addressing this using the remove add-ons script, the same still complains of some additional components causing a mismatch in the vendor codes.

Resolution

Reset the VUM DB using the instructions in kb- https://knowledge.broadcom.com/external/article/316581/resetting-vmware-update-manager-database.html

 

Caution: Resetting the Update Manager database is a destructive task. Custom baselines (but not Cluster Images), custom download settings and manually imported patches/ISOs will be removed and will need to be reapplied following the reset. Before applying the steps below, take a backup or an offline-snapshot (in powered-off state) of the vCenter Server. If the vCenter Server is part of an ELM environment, take a snapshot or a backup of all vCenters within the ELM domain. Note all of the custom configurations within Update Manager - e.g. proxy settings, third party download URLs, customized baselines, etc. - before proceeding.

Additional Information

In case the issue is limited to HPE components, the script attached to the kb- After upgrading to vCenter Server 7.0.0b with vSphere Lifecycle Manager Images configuring the vSphere HA Agent fails can be used.