Skip to main content
dilic
New Member
February 20, 2015
Solved

Promote Slave to Master within 2 node failover HA cluster?

  • February 20, 2015
  • 4 replies
  • 184936 views

Hello.

Is there an easy way to promote or change HA roles from SLAVE to MASTER in Fortigate (800c) 2 nodes HA failover cluster, within Fortigate gui or cmd commands/configuration?  

    Best answer by dilic

    Robin Svanberg wrote:

    dilic wrote:

    Hello.

    Is there an easy way to promote or change HA roles from SLAVE to MASTER in Fortigate (800c) 2 nodes HA failover cluster, within Fortigate gui or cmd commands/configuration?  

    Per default (If you haven´t enabled device priority override") the HA Master election is based on the following:

     

    1. Monitored port

    2. System Uptime, the one that has been up for the longest time

    3. Unit Priority, the one with the highest priority is master

    4. Serialnumber, the highest serial number is master

     

    The easiest way is to reset the uptime on the master by running the command "diagnose sys ha reset-uptime". If you change the priority a failover will not occur.

     

    If you have enabled device priority override the system uptime isn´t part of the election and it will in that case use the Unit priority number.

     

    A reboot of the primary unit will also cause a failover :) But if you have enabled device priority override the unit with the highest priority will be the master when it´s back online.

     

    Hmm,

    I didn't enabled device priority override. So, if  I just execute "diagnose sys ha reset-uptime" in cmd shell, that will do the trick. Cause I'm on the MASTER node by default in HA failover cluster.  

     

    Or I'm must go first on Master node by executing commands:

     

    #config global

    # get system ha status

         Model: FortiGate-800C      Mode: a-p      Group: 0      Debug: 0      ses_pickup: enable, ses_pickup_delay=disable      Master:130 CWa01 FG800Cxxxxxxxxx7 1      Slave :140 CWb01 FG800Cxxxxxxxxx9 0      number of vcluster: 1      vcluster 1: work 169.254.0.2      Master:0 FG800Cxxxxxxxxx7      Slave :1 FG800Cxxxxxxxxx9

    # exec ha manage 1

    # diagnose sys ha reset-uptime

     

    Please confirm right procedure ...

    As you can see, node which I want to promote to MASTER, has alredy  higher priority (140) ...

     

     

     

     

    4 replies

    iJake
    New Member
    February 20, 2015

    I'm not sure if there's an easy way to do this, but you can set the priority higher on your secondary and enable device priority override?

     

    The document below has details about HA override

    http://docs-legacy.fortin...lp/HA_FGCP.081.30.html

    emnoc
    New Member
    February 20, 2015

    Yes adjust the  HA priority so the now slave is higher than the now-active

     

    I have "    set priority 255  " on my active and "    set priority 100 " on my  slave, so if I set the  priority to 99, the slave would be active if all of the monitor interface are in an up and ready

     

     

    Robin_Svanberg
    New Member
    February 20, 2015

    dilic wrote:

    Hello.

    Is there an easy way to promote or change HA roles from SLAVE to MASTER in Fortigate (800c) 2 nodes HA failover cluster, within Fortigate gui or cmd commands/configuration?  

    Per default (If you haven´t enabled device priority override") the HA Master election is based on the following:

     

    1. Monitored port

    2. System Uptime, the one that has been up for the longest time

    3. Unit Priority, the one with the highest priority is master

    4. Serialnumber, the highest serial number is master

     

    The easiest way is to reset the uptime on the master by running the command "diagnose sys ha reset-uptime". If you change the priority a failover will not occur.

     

    If you have enabled device priority override the system uptime isn´t part of the election and it will in that case use the Unit priority number.

     

    A reboot of the primary unit will also cause a failover :) But if you have enabled device priority override the unit with the highest priority will be the master when it´s back online.

     

    dilic
    dilicAuthorAnswer
    New Member
    February 20, 2015

    Robin Svanberg wrote:

    dilic wrote:

    Hello.

    Is there an easy way to promote or change HA roles from SLAVE to MASTER in Fortigate (800c) 2 nodes HA failover cluster, within Fortigate gui or cmd commands/configuration?  

    Per default (If you haven´t enabled device priority override") the HA Master election is based on the following:

     

    1. Monitored port

    2. System Uptime, the one that has been up for the longest time

    3. Unit Priority, the one with the highest priority is master

    4. Serialnumber, the highest serial number is master

     

    The easiest way is to reset the uptime on the master by running the command "diagnose sys ha reset-uptime". If you change the priority a failover will not occur.

     

    If you have enabled device priority override the system uptime isn´t part of the election and it will in that case use the Unit priority number.

     

    A reboot of the primary unit will also cause a failover :) But if you have enabled device priority override the unit with the highest priority will be the master when it´s back online.

     

    Hmm,

    I didn't enabled device priority override. So, if  I just execute "diagnose sys ha reset-uptime" in cmd shell, that will do the trick. Cause I'm on the MASTER node by default in HA failover cluster.  

     

    Or I'm must go first on Master node by executing commands:

     

    #config global

    # get system ha status

         Model: FortiGate-800C      Mode: a-p      Group: 0      Debug: 0      ses_pickup: enable, ses_pickup_delay=disable      Master:130 CWa01 FG800Cxxxxxxxxx7 1      Slave :140 CWb01 FG800Cxxxxxxxxx9 0      number of vcluster: 1      vcluster 1: work 169.254.0.2      Master:0 FG800Cxxxxxxxxx7      Slave :1 FG800Cxxxxxxxxx9

    # exec ha manage 1

    # diagnose sys ha reset-uptime

     

    Please confirm right procedure ...

    As you can see, node which I want to promote to MASTER, has alredy  higher priority (140) ...

     

     

     

     

    emnoc
    New Member
    February 20, 2015

    Do it on the current master, that's all that you have to do and the new master will be selected.

     

    ken

    dilic
    dilicAuthor
    New Member
    February 20, 2015

    Thank you ...

    Command "diagnose sys ha reset-uptime" did the trick ...

    howardsinc
    New Member
    February 24, 2016

    I know this is solved but here is a handy trick for the lab.

     

    while you are testing only, a useful command to force a unit to become the Master is:

     

    'diagnose sys ha set-as-master enable'

     

    (page 43) this command is only to be used in a lab environment. 

    http://docs.fortinet.com/...igate-ha-526.pdf