Description
This article describes the usage of the HA Failover Flag mechanism.
The are a few ways to remove the failover flag.
For the entire duration of the failover flag setting, redundancy is preserved - example:
Consider the following scenario: 2 FortiGates, FortiGate A and FortiGate B.
Currently, A is the Active (Primary) unit.
When performing the command 'execute ha failover set 1' on unit A, unit B will become the Active (Primary).
In case, B fails for whatever reason (such as in a hardware failure or reboot), A will take over the Active role.
However, the moment B comes back online in the cluster, it will re-take the Active (Primary) role.
Warning:
This is only used for testing, troubleshooting, and demonstrations. Do not use it in a production environment.
It is commonly set but forgotten to be unset which will cause confusion and can impact production as mentioned above.
To failover in production environment safely, use the following command instead:
di sys ha reset-uptime <-- If this command didn't work, use 'exec ha failover unset' and try again.
get system ha status <-- Confirm HA status.
Caution: when using this command, do not add a factory reset unit to the cluster.
It will wipe the configuration of the existing unit which has this flag set.
For other suitable options to use, see Technical Tip: Different options to trigger an HA failover (FGCP).
Scope
FortiGate.
Solution
To set the failover flag:
Run this command on the Active unit to force a failover:
execute ha failover set 1
Caution: This command will trigger an HA failover.
It is intended for testing purposes.
Do you want to continue? (y/n)y
To check the failover flag status:
execute ha failover status
failover status: set
Note:
Setting the failover flag on a second device in the cluster with 2 members will automatically unset the status on another device if it were already set.
To view the system status of a unit in forced HA failover:
get system ha status
HA Health Status: OK Model: FortiGate-300D
Mode: HA A-P
Group: 240
Debug: 0
Cluster Uptime: 0 days 2:11:46
Cluster state change time: 2020-03-12 17:38:04
Master selected using:
FGT3HD3914-----3 is selected as the master because it has EXE_FAIL_ OVER flag set.
FGT3HD3914-----9 is selected as the master because it has the largest value of override priority.
ses_pickup: disable
override: enable
Configuration Status:
FGT3HD3914-----9(updated 4 seconds ago): in-sync
FGT3HD3914-----3(updated 3 seconds ago): in-sync
System Usage stats:
FGT3HD3914-----9(updated 4 seconds ago):
sessions=5, average-cpu-user/nice/system/idle=0%/0%/0%/100%, memory=30%
FGT3HD3914-----3(updated 3 seconds ago):
sessions=41, average-cpu-user/nice/system/idle=0%/0%/0%/99%, memory=30%
To unset the failover flag:
execute ha failover unset 1
Caution: This command may trigger an HA failover.
It is intended for testing purposes. Do you want to continue? (y/n)y
Whether un-setting the failover status will cause a cluster failover depends on the HA configuration (priority, override enabled etc.).
Refer to the Primary unit selection process HERE.
To view the system status of a device after forced HA failover is disabled:
get system ha status
HA Health Status: OK
Model: FortiGate-300D
Mode: HA A-P
Group: 240
Debug: 0
Cluster Uptime: 0 days 2:14:55
Cluster state change time: 2020-03-12 17:42:17
Master selected using:
FGT3HD3914-----9 is selected as the master because it has the largest value of override priority.
FGT3HD3914-----3 is selected as the master because it has EXE_FAIL_ OVER flag set.
FGT3HD3914-----9 is selected as the master because it has the largest value of override priority.
ses_pickup: disable
override: enable
Configuration Status:
FGT3HD3914-----9(updated 3 seconds ago): in-sync
FGT3HD3914-----3(updated 2 seconds ago): in-sync
System Usage stats:
FGT3HD3914-----9(updated 3 seconds ago):
sessions=0, average-cpu-user/nice/system/idle=0%/0%/0%/100%, memory=30%
FGT3HD3914-----3(updated 2 seconds ago):
sessions=38, average-cpu-user/nice/system/idle=0%/0%/0%/100%, memory=30%
A useful command to review past failovers (or even changes in the hb interfaces status):
diag sys ha history read
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.