Hi all,

I have a self hosted engine setup, with 3 servers. 
I have successfully upgraded several other installations, from 4.1 to 4.2.
On one of them I am encountering and issue with the engine-setup.

I get the following warning:

  Found the following problems in PostgreSQL configuration for the Engine database:
           It is required to be at least '8192'
          Please note the following required changes in postgresql.conf on 'localhost':
            'work_mem' is currently '1024'. It is required to be at least '8192'.
          postgresql.conf is usually in /var/lib/pgsql/data, /var/opt/rh/rh-postgresql95/lib/pgsql/data, or somewhere under /etc/postgresql* . You have to restart PostgreSQL after making these changes.
          The database requires these configurations values to be changed. Setup can fix them for you or abort. Fix automatically? (Yes, No) [Yes]:

Then, if I select Yes to proceed, I get:

[WARNING] This release requires PostgreSQL server 9.5.14 but the engine database is currently hosted on PostgreSQL server 9.2.24.

Then finally:
[ ERROR ] It seems that you are running your engine inside of the hosted-engine VM and are not in "Global Maintenance" mode.
         In that case you should put the system into the "Global Maintenance" mode before running engine-setup, or the hosted-engine HA agent might kill the machine, which might corrupt your data.
[ ERROR ] Failed to execute stage 'Setup validation': Hosted Engine setup detected, but Global Maintenance is not set.
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20190725124653-hvekp2.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20190725125154-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

I have put the cluster on global maintenance, though the engine thinks it is not.

Are any steps that I may follow to avoid above?
I am attaching also the last full setup log.
Thank you!