VMware Identity Manager upgrade fails to complete “Failure: Error while running package installation”

Have you had the misfortune of receiving the error message “Failure: Error while running package installation” “Update failed, revert to snapshot and try again” whilst running an upgrade of your vIDM appliances? You aren’t alone, I’ve come across this multiple times in different environments.

This error potentially indicates that the appliance has exhausted all the inodes available, and consumed all disk space

If you check the log Updatecli.log might see the message of no space error in location /var/ .

You can check inode disk space using command

df -i

From here you will have to delete some files in the /var mount to clean up inode disk space.

Here are steps to clean inode disk space

1.Execute below command to check ,which folder under /var/ is having high number of files.

for i in /var/*; do echo $i; find $i |wc -l; done

2. if /var/spool/clientmqueue occupies large space. Please execute below command to delete files in /var/spool/clientmqueue

cd /var/spool/clientmqueue
echo * | xargs -n 100 rm

3. To delete /var/log files .Execute below command .This deletes anything ending with extension bz2 in location /var/log that is older than 60 days

cd /var/log
find ./*.bz2 -mtime +60 -exec rm {} \;

4. Run “df -i” again so see if /var shows sufficient space

5. Enable update debug mode by creating a file called rpm.debug in the flags folder in order to see verbose logs for the update.

cd /usr/local/horizon/conf/flags
touch rpm.debug

6. Perform upgrade again


Tomcat.pid

If during the upgrade you get the following message

"/opt/vmware/horizon/workspace/logs/tomcat.pid" was not found

This is due to the tomcat service not running. Please start the service using the command

service horizon-workspace start

Some additional ways to get more inode information:

Using “du”:

du --inodes -S | sort -rh | sed -n \'1,50{/^.\{71\}/s/^\(.\{30\}\).*\(.\{37\}\)$/\1...\2/;p}'

Using “ls” *

ls ~/test -AiR1U | 
sed -rn '/^[./]/{h;n;};G;
    s|^ *([0-9][0-9]*)[^0-9][^/]*([~./].*):|\1:\2|p' | 
sort -t : -uk1.1,1n |
cut -d: -f2 | sort -V |
uniq -c |sort -rn | head -n10

* If you’re curious, the heart-and-soul of that tedious bit of regex there is replacing the filename in each of ls's recursive search results with the directory name in which it was found. From there it’s just a matter of squeezing repeated inode numbers then counting repeated directory names and sorting accordingly.

The -U option is especially helpful with the sorting in that it specifically does not sort, and instead presents the directory list in original order – or, in other words, by inode number.

And of course -1 is incredibly helpful in that it ensures a single result per line, regardless of possibly included newlines in filenames or other spectacularly unfortunate problems that might occur when you attempt to parse a list.

And of course -A for all and -i for inode and -R for recursive and that’s the long and short of it.