Difference between revisions of "CLI - System Failover"

 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
시스템 이중화 설정은 configure 명령어에서 설정할 수 있습니다.
+
__FORCETOC__
 +
You can configure the system failover in the configuration mode. Note that you need two imRAD devices to configure the system failover.
  
 +
=== Verifying System Failover Configuration ===
 +
To read the System Failover Configuration from a file, enter the <code>failover show</code> in the configuration mode.
 
<pre>
 
<pre>
 
LYSH@MyHostName# configure
 
LYSH@MyHostName# configure
configure# failover -h
+
LYSH@MyHostName(config)# failover show
usage: failover [-h] {add,dbpool,delete,disable,enable,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=[2021-04-28 14:07:44] initialized
 +
</pre>
  
config ha
+
If you enable the System Failover after configuring, the [[ImRAD services(daemons) | failover]] service applies its failover mode in few seconds and you can verify the applied result by the <code>show failover</code> command in the user mode.
 +
<pre>
 +
LYSH@MyHostName# show failover
 +
System failover state....
 +
Failover service(failover.service):active
 +
Last updated            :2021-04-28 14:08:37
 +
Virtual address        :192.168.0.1/24 on eth0
 +
Shared secret          :<<mykey>>
 +
Init mode              :active
 +
Current mode            :active
 +
Current mode updated    :2021-04-28 14:07:44
 +
Last error message      :No error
  
positional arguments:
+
Peer host              :192.168.0.2
    add                                Add configure system failover 
+
Peer mode              :no-response
    delete                              Delete system failover configuration
+
Peer mode updated      :2021-04-28 14:23:10
    disable                            Disable system failover
 
    enable                              Enable system failover
 
    show                                Show system failover configuration
 
  
optional arguments:
+
Init-Deadtime          :30 seconds
  -h, --help                            show this help message and exit
+
Deadtime                :120 seconds
 +
State                  :enabled
 
</pre>
 
</pre>
  
=== Basic Commands ===
+
If you use "-w" option with the <code>show failover</code> command, it shows you the activity of the failover server in real-time.
* <code>configure# failover add</code> 시스템 이중화 설정을 추가합니다.
 
* <code>configure# failover delete</code> 시스템 이중화 설정을 삭제합니다.
 
* <code>configure# failover disable</code> 시스템 이중화를 비활성합니다.
 
* <code>configure# failover enable</code> 시스템 이중화 활성합니다.
 
* <code>configure# failover show</code> 시스템 이중화 설정파일을 확인합니다.
 
  
== 시스템 이중화 설정 추가 ==
+
=== Configuring System Failover ===
시스템 이중화를 설정하려면 가장 먼저 <code>failover add</code> 명령어로 이중화 설정을 추가합니다. 사용법을 확인하여 입력형태에 맞게 각각 항목을 입력합니다. <code>vip</code>는 이중화를 구성하여 사용할 Virtual IP주소입니다. 이 주소는 "192.168.0.1/24"와 같이 IP 주소/서브넷 형식으로 입력합니다. <code>interface</code>는 전용 IP 주소가 설정되어있는 네트워크 인터페이스 입니다.<code>secret</code>은 이중화를 구성할 장비유키로 사용할 값 입니다. 이중화를 구성할 장비간에 공유키는 반드시 동일해야 합니다.<code>host</code>는 이중화를 구성할 상대방 IP주소입니다.. <code>initmode</code>는 장비의 동작유형을 의미합니다. <code>deadtime</code>은 passive로 동작하고 있는 장비에서 active 장비와 연결이 불가능할 때 active로 전환하기 전까지 active 장비에 장애를 판단하는 시간을 의미합니다.  
+
Note that if there the System Failover configuration already exists, it will overwrite.
 
<pre>
 
<pre>
 
LYSH@MyHostName# configure
 
LYSH@MyHostName# configure
configure# failover add -h
+
LYSH@MyHostName(config)# failover add 192.168.0.1/24 eth0 mykey 192.168.0.2 active 120 all
usage: failover add [-h] vip interface secret host initmode deadtime
+
LYSH@MyHostName(config)# 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
 +
</pre>
  
positional arguments:
+
== Enabling System Failover ==
  vip        virtual IPv4 address(a.b.c.d)
+
The System Failover does not work before enabling the System Failover.
  interface  Ethernet interface name
 
  secret      Shared secret key
 
  host        Peer host IPv4 address(a.b.c.d)
 
  initmode    Initical Mode(active, passive)
 
  deadtime    Deadtime in minutes(minimun 2)
 
 
 
optional arguments:
 
  -h, --help  show this help message and exit
 
</pre>
 
configure# failover add 192.168.0.1/24 eth0 key 192.168.0.2 active 120
 
== 시스템 이중화 설정 확인 ==
 
시스템 이중화 설정파일은<code>failover show</code>로 확인합니다. 현재 시스템 이중화 설정값 및 상태를 확인할 수 있습니다.
 
 
<pre>
 
<pre>
 
LYSH@MyHostName# configure
 
LYSH@MyHostName# configure
configure# failover show
+
LYSH@MyHostName(config)# failover enable
 
+
LYSH@MyHostName(config)# failover show
 
vip=192.168.0.1/24
 
vip=192.168.0.1/24
 
iface=eth0
 
iface=eth0
secret=key
+
secret=mykey
 
host=192.168.0.2
 
host=192.168.0.2
 
initmode=active
 
initmode=active
Line 61: Line 81:
 
peermode_dt=-
 
peermode_dt=-
 
deadtime=120
 
deadtime=120
state=disabled
+
state=enabled
 
last_error_msg=No error
 
last_error_msg=No error
 +
LYSH@MyHostName(config)# exit
 
</pre>
 
</pre>
== 시스템 이중화 활성 ==
+
 
시스템 이중화 설정을 <code>failover add</code> 명령어로 추가한 후 시스템 이중화 구성을 활성화 하려면 <code>failover enable</code> 명령어를 실행합니다. 해당 명령어를 실행하기 전까지는 시스템 이중화 동작을 하지 않습니다.
 
 
<pre>
 
<pre>
LYSH@MyHostName# configure
+
LYSH@MyHostName# show failover
configure# failover enable
+
System failover state....
 +
Failover service(failover.service):active
 +
Last updated            :2021-04-28 14:10:57
 +
Virtual address        :192.168.0.1/24 on eth0
 +
Shared secret          :<<aaaa>>
 +
Init mode              :active
 +
Current mode            :zero
 +
Current mode updated    :2021-04-28 14:10:56
 +
Last error message      :-
 +
 
 +
Peer host              :192.168.0.2
 +
Peer mode              :no-response
 +
Peer mode updated      :2021-04-28 14:10:56
 +
 
 +
Init-Deadtime          :30 seconds
 +
Deadtime                :120 seconds
 +
State                  :enabled
 
</pre>
 
</pre>
== 시스템 이중화 비활성 ==
+
 
시스템 이중화 구성을 비활성화 하려면 <code>failover disable</code> 명령어를 실행합니다. 해당 명령어를 실행하면 추가된 시스템 이중화 설정파일이 있어도 시스템 이중화 동작을 하지 않습니다.
+
== Disabling System Failover ==
 +
To stop the System Failover, use the <code>disable</code> command.
 +
If you enable the System Failover after disabling it, the System Failover works again.
 
<pre>
 
<pre>
 
LYSH@MyHostName# configure
 
LYSH@MyHostName# configure
configure# failover disable
+
LYSH@MyHostName(config)# failover disable
 +
LYSH@MyHostName(config)# 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
 
</pre>
 
</pre>
== 시스템 이중화 설정 삭제 ==
+
 
시스템 이중화 설정은 <code>failover delete</code> 명령어로 삭제할 수 있습니다.
+
== Deleting System Failover configuration ==
 +
Note that if you deleted it, the System Failover does not work before configuring it.
 
<pre>
 
<pre>
 
LYSH@MyHostName# configure
 
LYSH@MyHostName# configure
configure# failover delete
+
LYSH@MyHostName(config)# failover delete
 
</pre>
 
</pre>

Latest revision as of 17:06, 19 September 2023

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

Verifying System Failover Configuration

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

LYSH@MyHostName# configure
LYSH@MyHostName(config)# 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=[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.0.1/24 on eth0
Shared secret           :<<mykey>>
Init mode               :active
Current mode            :active
Current mode updated    :2021-04-28 14:07:44
Last error message      :No error

Peer host               :192.168.0.2
Peer mode               :no-response
Peer mode updated       :2021-04-28 14:23:10

Init-Deadtime           :30 seconds
Deadtime                :120 seconds
State                   :enabled

If you use "-w" option with the show failover command, it shows you the activity of the failover server in real-time.

Configuring System Failover

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

LYSH@MyHostName# configure
LYSH@MyHostName(config)# failover add 192.168.0.1/24 eth0 mykey 192.168.0.2 active 120 all
LYSH@MyHostName(config)# 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
LYSH@MyHostName(config)# failover enable
LYSH@MyHostName(config)# 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
LYSH@MyHostName(config)# exit
LYSH@MyHostName# show failover
System failover state....
Failover service(failover.service):active
Last updated            :2021-04-28 14:10:57
Virtual address         :192.168.0.1/24 on eth0
Shared secret           :<<aaaa>>
Init mode               :active
Current mode            :zero
Current mode updated    :2021-04-28 14:10:56
Last error message      :-

Peer host               :192.168.0.2
Peer mode               :no-response
Peer mode updated       :2021-04-28 14:10:56

Init-Deadtime           :30 seconds
Deadtime                :120 seconds
State                   :enabled

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
LYSH@MyHostName(config)# failover disable
LYSH@MyHostName(config)# 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
LYSH@MyHostName(config)# failover delete