Difference between revisions of "CLI - System Failover"

Line 24: Line 24:
 
LYSH@MyHostName# configure
 
LYSH@MyHostName# configure
 
configure# failover show
 
configure# failover show
 +
vip=192.168.4.140/24
 +
iface=eth0
 +
secret=aaaa
 +
host=192.168.4.43
 +
initmode=active
 +
curmode=
 +
curmode_dt=
 +
peermode=
 +
peermode_dt=
 +
deadtime=2
 +
state=disabled
 +
last_error_msg=[2021-04-28 14:07:44] initialized
 
</pre>
 
</pre>
  
Line 30: Line 42:
 
LYSH@MyHostName# show failover
 
LYSH@MyHostName# show failover
 
System failover state....
 
System failover state....
Failover service(failover.service):inactive
+
Failover service(failover.service):active
Last updated            :2021-03-26 17:20:44
+
Last updated            :2021-04-28 14:08:37
Virtual address        : on
+
Virtual address        :192.168.4.140/24 on eth0
Shared secret          :<<>>
+
Shared secret          :<<aaaa>>
Init mode              :
+
Init mode              :active
 
Current mode            :
 
Current mode            :
 
Current mode updated    :-
 
Current mode updated    :-
Last error message      :
+
Last error message      :[2021-04-28 14:07:44] initialized
  
Peer host              :
+
Peer host              :192.168.4.43
 
Peer mode              :
 
Peer mode              :
 
Peer mode updated      :-
 
Peer mode updated      :-
  
 
Init-Deadtime          :30 seconds
 
Init-Deadtime          :30 seconds
Deadtime                :100 minutes
+
Deadtime                :2 minutes
State                  :enabled
+
State                  :disabled
 
 
 
</pre>
 
</pre>
  

Revision as of 14:09, 28 April 2021

You can configure the system failover in the configuration mode. Note that you need two imRAD devices to configure the system failover.

LYSH@MyHostName# configure
configure# failover -h
usage: failover [-h] {add,dbpool,delete,disable,enable,show} ...

 config ha

positional arguments:
    add                                 Add configure system failover   
    delete                              Delete system failover configuration
    disable                             Disable system failover
    enable                              Enable system failover
    show                                Show system failover configuration

optional arguments:
  -h, --help                            show this help message and exit

Verifying System Failover Configuration

To read the System Failover Configuration from a file, enter the failover show in the configuration mode.

LYSH@MyHostName# configure
configure# failover show
vip=192.168.4.140/24
iface=eth0
secret=aaaa
host=192.168.4.43
initmode=active
curmode=
curmode_dt=
peermode=
peermode_dt=
deadtime=2
state=disabled
last_error_msg=[2021-04-28 14:07:44] initialized

If you enable the System Failover after configuring, the failover service applies its failover mode in few seconds and you can verify the applied result by the show failover command in the user mode.

LYSH@MyHostName# show failover
System failover state....
Failover service(failover.service):active
Last updated            :2021-04-28 14:08:37
Virtual address         :192.168.4.140/24 on eth0
Shared secret           :<<aaaa>>
Init mode               :active
Current mode            :
Current mode updated    :-
Last error message      :[2021-04-28 14:07:44] initialized

Peer host               :192.168.4.43
Peer mode               :
Peer mode updated       :-

Init-Deadtime           :30 seconds
Deadtime                :2 minutes
State                   :disabled

Configuring System Failover

Note that if there the System Failover configuration already exists, it will overwrite.

LYSH@MyHostName# configure
configure# failover add 192.168.0.1/24 eth0 mykey 192.168.0.2 active 120
configure# failover show
vip=192.168.0.1/24
iface=eth0
secret=mykey
host=192.168.0.2
initmode=active
curmode=
curmode_dt=-
peermode=
peermode_dt=-
deadtime=120
state=disabled
last_error_msg=No error

Enabling System Failover

The System Failover does not work before enabling the System Failover.

LYSH@MyHostName# configure
configure# failover enable
configure# failover show
vip=192.168.0.1/24
iface=eth0
secret=mykey
host=192.168.0.2
initmode=active
curmode=
curmode_dt=-
peermode=
peermode_dt=-
deadtime=120
state=enabled
last_error_msg=No error

Disabling System Failover

To stop the System Failover, use the disable command. If you enable the System Failover after disabling it, the System Failover works again.

LYSH@MyHostName# configure
configure# failover disable
configure# failover show
vip=192.168.0.1/24
iface=eth0
secret=mykey
host=192.168.0.2
initmode=active
curmode=
curmode_dt=-
peermode=
peermode_dt=-
deadtime=120
state=disabled
last_error_msg=No error

Deleting System Failover configuration

Note that if you deleted it, the System Failover does not work before configuring it.

LYSH@MyHostName# configure
configure# failover delete