The postupgrade scripts cause an intermittent problem when vpostgres service returns incorrect status.


When the vpostgres service reports being in a bad state, upgrade fails at the /etc/bootstrap/postupdate.d/10-postgres postupgrade script. When your upgrade fails on /etc/bootstrap/preupdate.d/10-postgres script execution, run these three scripts, one at a time, in the following order, and restart upgrade.


rm -rf /storage/db/psql-upgrade


cat > /etc/bootstrap/preupdate.d/00-00-00-fix-psql-restart << "EOF"

   cat >> /usr/lib/vmware-bootstrap-vrva-base/ << "EOF"

   function psql_restart () {
      echo 'Restarting PostgreSQL server..'
      service ${psql_service} stop > /dev/null
      service ${psql_service} start
      echo 'restart_psql finished'


chmod 700 /etc/bootstrap/preupdate.d/00-00-00-fix-psql-restart