"Error while running post-install scripts" while upgrading vRealize Automation Appliances
search cancel

"Error while running post-install scripts" while upgrading vRealize Automation Appliances

book

Article ID: 312251

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • When upgrading vRealize Automation appliances you may experience failures related to duplicates in the database for the vRealize Orchestrator service.
  • The failure shown in the UI will be similar to the following:
Failed to install updates(Error while running post-install scripts)
VA-check: finished
Pre-install: failed
Post-install: failed
Update failed (code 0-2). Check logs in /opt/vmware/var/log/vami or retry update later.

The errors listed in /var/log/bootstrap/preupdate.log will include:

2018-09-27 18:53:23+00:00 /etc/bootstrap/preupdate.d/00-00-02-check-vro-duplicates starting...
<!--: spam
Content-Type: text/html

<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#6622aa">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>&lt;type 'exceptions.TypeError'&gt;</strong></big></big></font></td


Environment

VMware vRealize Automation 7.5.x
VMware vRealize Automation 7.6.x

Resolution

This issue is resolved in VMware vRealize Automation 7.6, available at VMware Downloads.

Workaround:
To work around this issue,

Important: Before proceeding ensure that you have backup of the environment.
  1. Download the attached zip file (vco-cfg-cli-7.5.0.24754-10044198) and extract the contents.
Copy the vco-cfg-cli-7.5.0.24754-10044198.rpm file to a directory on vRealize Automation primary appliance.
  1. Install the package using the command:
rpm -hiv vco-cfg-cli-7.5.0.24754-10044198.rpm
  1. Run the command:
/usr/lib/vco-cli/bin/vro-configure.sh db-validate

Note: The following queries can be used to check the same:

select * from (

select categoryid, name, count(*)-1, 'vmo_configelement' as type from vmo_configelement group by categoryid, name having count(*) > 1
 union
select parentcategoryid, name, count(*)-1, 'vmo_configelementcategory' as type from vmo_configelementcategory group by parentcategoryid, name having count(*) > 1
 union
select elementid, '' as name, count(*)-1, 'vmo_configelementcontent' as type from vmo_configelementcontent group by elementid having count(*) > 1
 union
select '' as id, name, count(*)-1, 'vmo_package' as type from vmo_package group by name having count(*) > 1
 union
select packageid, '' as name, count(*)-1, 'vmo_packagecontent' as type from vmo_packagecontent group by packageid having count(*) > 1
 union
select policyid, '' as name, count(*)-1, 'vmo_policycontent' as type from vmo_policycontent group by policyid having count(*) > 1
 union
select categoryid, name, count(*)-1, 'vmo_resourceelement' as type from vmo_resourceelement group by categoryid, name having count(*) > 1
 union
select elementid, '' as name, count(*)-1, 'vmo_resourceelementcontent' as type from vmo_resourceelementcontent group by elementid having count(*) > 1
 union
select scriptmodulecategoryid, name, count(*)-1, 'vmo_scriptmodule' as type from vmo_scriptmodule group by scriptmodulecategoryid, name having count(*) > 1
 union
select '' as id, name, count(*)-1, 'vmo_scriptmodulecategory' as type from vmo_scriptmodulecategory group by name having count(*) > 1
 union
select scriptmoduleid, '' as name, count(*)-1, 'vmo_scriptmodulecontent' as type from vmo_scriptmodulecontent group by scriptmoduleid having count(*) > 1
 union
select dunesobjectid, version, count(*)-1, 'vmo_versionhistorycontent' as type from vmo_versionhistorycontent group by dunesobjectid, version having count(*) > 1
 union
select workflowid, '' as name, count(*)-1, 'vmo_workflowcontent' as type from vmo_workflowcontent group by workflowid having count(*) > 1

) as u;
  1. Copy the list of duplicate entries (focused on id and name) for reference.
 
  1. Connect to the postgres database using the command:
su postgres /opt/vmware/vpostgres/current/bin/psql vcac
  1. Run the following command(s) by referencing the correct ID and NAME from step 4 to remove one of each of the duplicate entries (it doesn't matter which is removed):
delete from vmo_resourceelement where categoryid = '<UUID_1>' and name = ‘de_DE.properties;

​delete from vmo_configelement where categoryid = '<UUID_1>' and name = ‘de_DE.properties';

Exit the postgres command using: \q
  1. Re-run the command to ensure you have no further duplicates:
/usr/lib/vco-cli/bin/vro-configure.sh db-validate

The correct response should be:
The command does not need database configuration update.
Create additional backups/snapshots and retry your vRealize Automation upgrade.


Attachments

60453_1_vco-cfg-cli-7.5.0.24754-10044198 get_app