Why engine-setup is failing while checking "Global Maintenance" even when the HE environment is in Maintenance mode
Environment
- Red Hat Virtualization 4.x
Issue
- Below error is logged while running
# engine-setupon RHV-Manager:
[ 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
hosted-engine --vm-statusshows the HE environment in global maintenance mode.
Resolution
-
The HE VM was showing as down in hosted engine environment. The environment was restored using engine-backup from an old HE environment. So the HE VM which exist in the current environment was the old HE VM with old UUID. Removing this often HE VM from the environment allows to import the new one and engine-setup runs good after this.
-
This may require changing the rhv-manager db manually after verifying the
Global Maintenance Modeis enabled on thehosted engine nodewith# hosted-engine --vm-statuscommand , so reach out to Red Hat Technical support for assistance with the same.
Root Cause
- engine-setup check the status of HE environment from the database using the below query.
SELECT vm_guid, run_on_vds FROM vms WHERE vm_name ='HostedEngine';
SELECT vds_id, ha_global_maintenance FROM vds_statistics WHERE vds_id = 'vds-uuid';
- Since HE VM is down here, the run_on_vds will be empty and hence it was showing
Global Maintenanceerror.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.