This document helps you troubleshoot an issue where some upgrades from Mandiant Security Validation (MSV) version 4.14.4.1 might fail due to missing PostgreSQL 13 packages.
Issue
When you use the Director interface to upgrade from a fresh installation of 4.14.4.1 to a later version, the upgrade process fails.
Verification
To verify the specific error:
- Connect to the Director using SSH.
- Access the Verodin log location by running this command:
- Open the system log by running this command:
sudo vi verodin_system_log
- See whether the following error appears:
ERROR ... MetadataError: #<DirectorUpgradeExceptions::MetadataError: Missing required system packages for Director postgresql13, postgresql13-libs, postgresql13-server
If this error appears, the upgrade issue occurred because the metadata in
/opt/apps/verodin/planner/.metadata.jsonincorrectly lists PostgreSQL 13 packages as required for the upgrade.
cd /opt/apps/verodin/planner/log
Resolution
Once you've confirmed that the preceding error message appears in verodin_system_log, resolve the issue by removing the lines containing "postgresql" from the .metadata.json file on the Director, then attempt the upgrade again.
To resolve the error:
- Connect to the Director using SSH.
- Switch to the root user by running this command:
sudo bash
- Using the built-in
vitext editor, create a script file:sudo vi fix_metadata.sh
- Add the following content to
fix_metadata.sh:#!/bin/bash if [[ $EUID -ne 0 ]]; then echo "Error: This script must be run as root." echo "Please try: sudo $0" exit 1 fi # Delete any line containing "postgresql" sed -i '/postgresql/d' "/opt/apps/verodin/planner/.metadata.json" if [[ $? -eq 0 ]]; then echo "Lines containing 'postgresql' removed." else echo "Lines containing 'postgresql' NOT removed." fi - Save your changes by running the following command:
:wq
- Run the following command to make the script executable:
sudo chmod +x fix_metadata.sh
-
Run the script:
sudo ./fix_metadata.sh
The script removes any line containing the string "postgresql" from the metadata file and creates a backup of the original file named
.metadata.json.bakin the same directory. - After the script completes successfully, re-attempt the upgrade to the MSV version by using the Director web interface.