クラスタプロパティファイル¶
Failover Managerクラスターの各ノードには、それが存在する個々のノードのプロパティを含むプロパティファイル(デフォルトではefm.propertiesというefm.properties )があります。プロパティが指定されたファイルのためのフェールオーバーマネージャーのインストーラは、ファイルテンプレートを作成しefm.properties.inに/etc/edb/efm-3.6ディレクトリ。
フェールオーバーマネージャーのインストールが完了したら、ファイルの内容を変更する前に、テンプレートの作業用コピーを作成する必要があります。
# cp /etc/edb/efm-3.6/efm.properties.in /etc/edb/efm-3.6/efm.properties
テンプレートファイルをコピーした後、ファイルの所有者をefmに変更します。
# chown efm:efm efm.properties
注:既定では、フェールオーバーマネージャーはクラスタープロパティファイルの名前がefm.propertiesあるとefm.propertiesます。プロパティファイルにefm.properties以外のefm.propertiesを付ける場合、サービススクリプトまたはユニットファイルを変更して、フェールオーバーマネージャーに別の名前を使用するように指示する必要があります。
クラスタープロパティファイルを作成したら、必要に応じて構成パラメーター値を追加(または変更)します。各プロパティの詳細については、 クラスタープロパティの指定を参照してください。
プロパティファイルの所有者はrootです。 Failover Managerサービススクリプトは、 /etc/edb/efm-3.6 directoryファイルを見つけることを期待しています。プロパティファイルを別の場所に移動する場合は、新しい場所を指定するシンボリックリンクを作成する必要があります。
プロパティファイルで参照されるすべてのユーザースクリプトは、Failover Managerユーザーとして呼び出されることに注意してください。
クラスターのプロパティの指定¶
クラスタープロパティファイルにリストされているプロパティを使用して、Failover Managerクラスターの接続プロパティと動作を指定できます。プロパティ設定の変更は、フェールオーバーマネージャーの起動時に適用されます。プロパティ値を変更した場合は、フェールオーバーマネージャーを再起動して変更を適用する必要があります。
プロパティ値では大文字と小文字が区別されます。 Postgresはパラメーター値に引用符付き文字列を使用しますが、Failover Managerではプロパティ値に引用符付き文字列を使用できないことに注意してください。たとえば、Postgres構成パラメーターでIPアドレスを次のように指定できます。
listen_addresses='192.168.2.47'
フェールオーバーマネージャーでは、値を引用符で囲まないことが必要です。
bind.address=192.168.2.54:7800
efm.propertiesファイルのプロパティを使用して、Failover Managerの接続、管理、および操作の詳細を指定します。
次のプロパティを使用して、フェールオーバーマネージャークラスターの接続の詳細を指定します。
# The value for the password property should be the output from
# 'efm encrypt' -- do not include a cleartext password here. To
# prevent accidental sharing of passwords among clusters, the
# cluster name is incorporated into the encrypted password. If
# you change the cluster name (the name of this file), you must
#新しい名前でパスワードを再度暗号化します。 #db.portプロパティは、すべてのノードで同じでなければなりません。 db.user = db.password.encrypted = db.port = db.database = 指定したdb.userは、フェールオーバーマネージャーに代わって選択したPostgreSQLコマンドを呼び出すための十分な権限が必要です。詳細については、 前提条件を参照してください。
データベースユーザーのパスワードの暗号化については、「 データベースパスワードの暗号化」を参照してください。
db.service.ownerプロパティを使用して、フェールオーバーマネージャーによって管理されているクラスターを所有するオペレーティングシステムユーザーの名前を指定します。このプロパティは、専用の監視ノードでは必要ありません。
# This property tells EFM which OS user owns the $PGDATA dir for
# the 'db.database'. By default, the owner is either 'postgres'
# for PostgreSQL or 'enterprisedb' for EDB Postgres Advanced
# Server. However, if you have configured your db to run as a
# different user, you will need to copy the /etc/sudoers.d/efm-XX
# conf file to grant the necessary permissions to your db owner.
#
# This username must have write permission to the
# 'db.recovery.conf.dir' specified below.
db.service.owner=
サービスを開始または停止するときにserviceまたはsystemctlコマンドを使用する場合は、 db.service.nameプロパティでデータベースサービスの名前を指定します。
# Specify the proper service name in order to use service commands rather
# than pg_ctl to start/stop/restart a database. For example, if this property
# is set, then 'service <name> restart' or 'systemctl restart <name>'
# (depending on OS version) will be used to restart the database rather than pg_ctl.
# This property is required if running the database as a service.
db.service.name=
データベースサービスを開始または停止するたびに、同じサービス制御メカニズム(pg_ctl、service、またはsystemctl)を使用する必要があります。 pg_ctlプログラムを使用してサービスを制御する場合、 db.binプロパティでpg_ctlプログラムの場所を指定します。
# Specify the directory containing the pg_controldata/pg_ctl commands, for example:
# /usr/edb/as11/bin. Unless the db.service.name property is used, the pg_ctl
# command is used to start/stop/restart databases as needed after a
# failover or switchover. This property is required.
db.bin=
db.recovery.conf.dirプロパティを使用して、
リカバリファイルはクラスターのマスターノードに書き込まれ、トリガーファイルはスタンバイに書き込まれます。このプロパティは、マスターノードとスタンバイノードで必要です。専用の監視ノードでは必要ありません。
# Specify the location of the db recovery.conf file on the node.
# On a standby node, the trigger file location is read from the
# file in this directory. After a failover, the recovery.conf
# files on remaining standbys are changed to point to the new
# master db (a copy of the original is made first). On a master
# node, a recovery.conf file will be written during failover and
# promotion to ensure that the master node can not be restarted
# as the master database.
db.recovery.conf.dir=
データベース構成ファイルがrecovery.confファイルと同じディレクトリに保存されていない場合、 db.config.dirプロパティを使用してデータベース構成ファイルの場所を指定します。この値は、データベースを停止、起動、または再起動するときにPostgres dataディレクトリの場所として使用されます。
# Specify the location of database configuration files if they are
# not contained in the same location as the recovery.conf file. This is most likely
# the case for Debian installations. The location specified will be used
# as the -D value (the location of the data directory for the cluster)
# when calling pg_ctl to start or stop the database.
# If this property is blank, the db.recovery.conf.dir location specified by the
# db.recovery.conf.dir property will be used.
db.config.dir=
jdbc.sslmodeプロパティーを使用して、フェイルオーバーマネージャーにSSL接続を使用するよう指示します。デフォルトでは、SSLは無効になっています。
# Use the jdbc.sslmode property to enable ssl for EFM
# connections. Setting this property to anything but 'disable'
# will force the agents to use 'ssl=true' for all JDBC database
# connections (to both local and remote databases).
# Valid values are:
#
# disable - Do not use ssl for connections.
# verify-ca - EFM will perform CA verification before allowing
# the certificate.
# require - Verification will not be performed on the server
# certificate.
jdbc.sslmode=disable
SSLの構成と使用の詳細については、以下を参照してください。
https://www.postgresql.org/docs/10/static/ssl-tcp.html
そして
https://jdbc.postgresql.org/documentation/94/ssl.html
user.emailプロパティを使用して、Failover Managerから送信された通知を受信する電子メールアドレス(または複数の電子メールアドレス)を指定します。
# Email address(es) for notifications. The value of this
# property must be the same across all agents. Multiple email
# addresses must be separated by space. If using a notification
# script instead, this property can be left blank.
user.email=
from.emailプロパティは、Failover Managerからの電子メール通知で送信者のアドレスとして使用される値を指定します。あなたはできる:
-
from.email空白のままにして、デフォルト値(efm@localhost)を使用します。 - メールアドレスのカスタム値を指定します。
- ノードホストの名前を表す
%hプレースホルダーを使用して、カスタムメールアドレスを指定します(例: @ %h )。プレースホルダーは、Linuxホスト名ユーティリティによって返されるホストの名前に置き換えられます。
通知の詳細については、 通知を 。
# Use the from.email property to specify the from email address that
# will be used for email notifications. Use the %h placeholder to
# represent the name of the node host (e.g. example@%h). The
# placeholder will be replaced with the name of the host as returned
# by the hostname command.
# Leave blank to use the default, efm@localhost.
from.email=
notification.levelプロパティーを使用して、Failover Managerがユーザー通知を送信する最小の重大度レベル、または通知スクリプトが呼び出されるタイミングを指定します。通知の完全なリストについては、を参照してください通知を 。
# Minimum severity level of notifications that will be sent by
# the agent. The minimum level also applies to the notification
# script (below). Valid values are INFO, WARNING, and SEVERE.
# A list of notifications is grouped by severity in the user's
# guide.
notification.level=INFO
script.notificationプロパティを使用して、通知サービスとして機能するユーザー指定のスクリプトへのパスを指定します。スクリプトには、メッセージの件名とメッセージ本文が渡されます。このスクリプトは、フェールオーバーマネージャーがユーザー通知を生成するたびに呼び出されます。
# Absolute path to script run for user notifications.
#
# This is an optional user-supplied script that can be used for
# notifications instead of email. This is required if not using
# email notifications. Either/both can be used. The script will
# be passed two parameters: the message subject and the message
# body.
script.notification = bind.addressプロパティーは、Failover Managerクラスターの現在のノード上のエージェントのIPアドレスとポート番号を指定します。
# This property specifies the ip address and port that jgroups
# will bind to on this node. The value is of the form
# <ip>:<port>.
# Note that the port specified here is used for communicating
# with other nodes, and is not the same as the admin.port below,
# used only to communicate with the local agent to send control
# signals.
# For example, <provide_your_ip_address_here>:7800
bind.address=
admin.portプロパティを使用して、フェールオーバーマネージャーが管理コマンドをリッスンするポートを指定します。
# This property controls the port binding of the administration
# server which is used for some commands (ie cluster-status). The
# default is 7809; you can modify this value if the port is
# already in use.
admin.port=7809
is.witnessプロパティをtrueに設定して、現在のノードがis.witnessノードであることを示します。 is.witnessがtrueの場合、ローカルエージェントはローカルデータベースが実行されているかどうかを確認しません。
# Specifies whether or not this is a witness node. Witness nodes
# do not have local databases running.
is.witness=
Postgres pg_is_in_recovery()関数は、データベースの回復状態を報告するブール関数です。この関数は、データベースが回復中の場合はtrueを返し、データベースが回復中でない場合はfalseを返します。エージェントが起動すると、ローカルデータベースに接続し、pg_is_in_recovery()関数を呼び出します。サーバーがtrueと応答すると、エージェントはスタンバイの役割を引き受けます。サーバーがfalseと応答した場合、エージェントはマスターの役割を引き継ぎます。ローカルデータベースがない場合、エージェントはアイドル状態になります。
is.witnessがtrueの場合、フェールオーバーマネージャーは回復状態を確認しません。
-
local.periodプロパティは、データベースサーバーへの接続を試行する間隔を秒単位で指定します。 -
local.timeout propertyは、エージェントがローカルデータベースサーバーからの肯定的な応答を待つ時間を指定します。 -
local.timeout.finalプロパティは、現在のノード上のデータベースサーバーへの最後の接続試行後にエージェントが待機する時間を指定します。内のデータベースから応答が受信されない場合 local.timeout.finalプロパティで指定された秒数。データベースが失敗したと見なされます。
たとえば、これらのプロパティのデフォルト値を指定すると、ローカルデータベースのチェックは10秒ごとに1回行われます。ローカルデータベースへの接続の試行が60秒以内に正に戻らない場合、Failover Managerはデータベースへの接続の最終試行を行います。応答が10秒以内に受信されない場合、Failover Managerはデータベース障害を宣言し、user.emailプロパティにリストされている管理者に通知します。これらのプロパティは、専用の監視ノードでは必要ありません。
# These properties apply to the connection(s) EFM uses to monitor
# the local database. Every 'local.period' seconds, a database
# check is made in a background thread. If the main monitoring
# thread does not see that any checks were successful in
# 'local.timeout' seconds, then the main thread makes a final
# check with a timeout value specified by the
# 'local.timeout.final' value. All values are in seconds.
# Whether EFM uses single or multiple connections for database
# checks is controlled by the 'db.reuse.connection.count'
# property.
local.period=10
local.timeout=60
local.timeout.final=10
必要に応じて、ビジネスモデルに合わせてこれらの値を変更する必要があります。
remote.timeout propertyを使用して、エージェントがリモートデータベースサーバーからの応答を待機する秒数(つまり、フェールオーバーを実行する前にマスターデータベースが実際にダウンしていることを確認するためにスタンバイエージェントが待機する時間)を指定します。
# Timeout for a call to check if a remote database is responsive.
# For example, this is how long a standby would wait for a
# DB ping request from itself and the witness to the master DB
# before performing failover.
remote.timeout=10
node.timeoutプロパティを使用して、ノードが失敗したかどうかを判断するときにエージェントがノードからの応答を待機する秒数を指定します。 node.timeoutプロパティ値は、エージェント間の通信のタイムアウト値を指定します。クラスタプロパティファイルの他のタイムアウトプロパティは、エージェントからデータベースへの通信の値を指定します。
# The total amount of time in seconds to wait before determining
# that a node has failed or been disconnected from this node.
#
# The value of this property must be the same across all agents.
node.timeout=50
stop.isolated.masterプロパティを使用して、マスターエージェントが分離されていることを検出した場合、データベースをシャットダウンするようにフェールオーバーマネージャーに指示します。 true(デフォルト)の場合、Failover Managerは、スクリプトで指定されたスクリプトを呼び出す前にデータベースを停止します。 master.isolatedプロパティ。
# Shut down the database after a master agent detects that it has
# been isolated from the majority of the efm cluster. If set to
# true, efm will stop the database before running the
# 'script.master.isolated' script, if a script is specified.
stop.isolated.master=true
stop.failed.masterプロパティを使用して、マスターデータベースがデータベースに到達できない場合に、マスターデータベースのシャットダウンを試みるようフェールオーバーマネージャーに指示します。 trueの場合、フェールオーバーマネージャーは、データベースをシャットダウンしようとした後、script.db.failureプロパティで指定されたスクリプトを実行します。
# Attempt to shut down a failed master database after EFM can no
# longer connect to it. This can be used for added safety in the
# case a failover is caused by a failure of the network on the
# master node.
# If specified, a 'script.db.failure' script is run after this attempt.
stop.failed.master=true
master.shutdown.as.failureパラメーターを使用して、マスターノード上のFailover Managerエージェントのシャットダウンを障害として扱う必要があることを示します。このパラメーターがtrueに設定され、マスターエージェントが(何らかの理由で)停止した場合、クラスターはマスターノード上のデータベースが実行されているかどうかを確認しようとします。
- データベースに到達すると、通知が送信されて通知されます
- エージェントのステータス。
- データベースに到達しない場合、フェイルオーバーが発生します。
# Treat a master agent shutdown as a failure. This can be set to
# true to treat a master agent shutdown as a failure situation,
# e.g. during the shutdown of a node, accidental or otherwise.
# Caution should be used when using this feature, as it could
# cause an unwanted promotion in the case of performing master
# database maintenance.
# Please see the user's guide for more information.
master.shutdown.as.failure=false
master.shutdown.as.failureプロパティは、マスターノードの偶発的なシャットダウンなど、障害ではなくユーザーエラーをキャッチすることを目的としています。ユーザーがマスターFailover Managerエージェントを停止したように、ノードの適切なシャットダウンがクラスターの残りの部分に表示されることがあります(たとえば、 masterデータベースでメンテナンスを実行します)。 master.shutdown.as.failureプロパティをtrueに設定した場合、メンテナンスを実行する際には注意が必要です。
master.shutdown.as.failureがtrueのときにmasterデータベースのメンテナンスを実行するには、マスターエージェントを停止し、マスターエージェントが失敗したがデータベースがまだ実行されているという通知を受信するまで待つ必要があります。その後、masterデータベースを停止しても安全です。または、efm stop-clusterコマンドを使用して、障害チェックを実行せずにすべてのエージェントを停止できます。
pingServerプロパティを使用して、フェールオーバーマネージャーがネットワーク接続に問題がないことを確認するために使用できるサーバーのIPアドレスを指定します。
# This is the address of a well-known server that EFM can ping
# in an effort to determine network reachability issues. It
# might be the IP address of a nameserver within your corporate
# firewall or another server that \*should\* always be reachable
# via a 'ping' command from each of the EFM nodes.
#
# There are many reasons why this node might not be considered
# reachable: firewalls might be blocking the request, ICMP might
# be filtered out, etc.
#
# Do not use the IP address of any node in the EFM cluster
# (master, standby, or witness because this ping server is meant
# to provide an additional layer of information should the EFM
# nodes lose sight of each other.
#
# The installation default is Google's DNS server.
pingServerIp=8.8.8.8
pingServerCommandプロパティを使用して、ネットワーク接続のテストに使用するコマンドを指定します。
# This command will be used to test the reachability of certain
# nodes.
#
# Do not include an IP address or hostname on the end of
# this command - it will be added dynamically at runtime with the
# values contained in 'virtualIp' and 'pingServer'.
#
# Make sure this command returns reasonably quickly - test it
# from a shell command line first to make sure it works properly.
pingServerCommand=/bin/ping -q -c3 -w5
auto.allow.hostsプロパティを使用して、許可されたホストリストを更新するために開始された最初のノードの.nodesファイルで指定されたアドレスを使用するようにサーバーに指示します。このプロパティを有効にする(auto.allow.hostsをtrueに設定する)と、クラスターの起動を簡素化できます。
# Have the first node started automatically add the addresses
# from its .nodes file to the allowed host list. This will make
#ホストの初期セットがすでにわかっている場合、クラスターを起動する方が高速です。 auto.allow.hosts = false stable.nodes.fileプロパティを使用して、ノードがクラスターに参加または離脱するときにノードファイルを書き換えないようにサーバーに指示します。このプロパティは、不変のIPアドレスを持つクラスターで最も役立ちます。
# When set to true, EFM will not rewrite the .nodes file whenever
# new nodes join or leave the cluster. This can help starting a
# cluster in the cases where it is expected for member addresses
# to be mostly static, and combined with 'auto.allow.hosts' makes
# startup easier when learning failover manager.
stable.nodes.file=false
db.reuse.connection.countプロパティを使用すると、管理者は、フェールオーバーマネージャーが同じデータベース接続を再利用してデータベースの状態を確認する回数を指定できます。デフォルト値は0です。これは、Failover Managerが毎回新しい接続を作成することを示します。このプロパティは、専用の監視ノードでは必要ありません。
# This property controls how many times a database connection is
# reused before creating a new one. If set to zero, a new
# connection will be created every time an agent pings its local
# database.
db.reuse.connection.count=0
auto.failoverプロパティは、自動フェイルオーバーを有効にします。デフォルトでは、auto.failoverはtrueに設定されています。
# Whether or not failover will happen automatically when the master
# fails. Set to false if you want to receive the failover notifications
# but not have EFM actually perform the failover steps.
# The value of this property must be the same across all agents.
auto.failover=true
auto.reconfigureプロパティを使用して、プライマリスタンバイがマスターに昇格した後、残りのスタンバイサーバーの自動再構成を有効または無効にするようフェールオーバーマネージャーに指示します。プロパティをtrueに設定して自動再構成を有効にする(デフォルト)か、falseに設定して自動再構成を無効にします。このプロパティは、専用の監視ノードでは必要ありません。
# After a standby is promoted, failover manager will attempt to
# update the remaining standbys to use the new master. Failover
# manager will back up recovery.conf, change the host parameter
# of the primary_conninfo entry, and restart the database. The
# restart command is contained in either the efm_db_functions or
# efm_root_functions file; default when not running db as an os
# service is:
# "pg_ctl restart -m fast -w -t <timeout> -D <directory>"
#ここで、タイムアウトはlocal.timeoutプロパティ値であり、#ディレクトリはdb.recovery.conf.dirによって指定されます。 #自動再構成をオフにするには、このプロパティをfalseに設定します。 auto.reconfigure = true 注意:primary_conninfoは、スペースで区切られたkeyword = valueペアのリストです。
注:レプリケーションスロットを使用してWALセグメントを管理している場合、自動再構成はサポートされていません。 auto.reconfigureをfalse設定する必要がありfalse 。フェールオーバーが発生した場合、スタンバイサーバーを手動で再構成する必要があります。
promotableプロパティを使用して、ノードを昇格しないことを示します。設定を上書きするには、実行時にefm set-priorityコマンドを使用します。 efm set-priorityコマンドの詳細については、efmユーティリティの使用を参照してください。
# A standby with this set to false will not be added to the
# failover priority list, and so will not be available for
# promotion. The property will be used whenever an agent starts
# as a standby or resumes as a standby after being idle. After
# startup/resume, the node can still be added or removed from the
# priority list with the 'efm set-priority' command. This
# property is required for all non-witness nodes.
promotable=true
application.nameプロパティを使用して、古いマスターノードをスタンバイとして再起動する前に、recovery.confファイルのprimary_conninfoパラメーターの既存のapplication.name = valueペアで指定された値を置き換えるアプリケーションの名前を指定します。
# During a switchover, a recovery.conf file is copied from a
# standby to the original master. If the application.name
# property is set, Failover Manager will replace the
# application_name portion of the primary_conninfo entry in the
# recovery.conf file with this property value before starting the
# original master database as a standby.
application.name=
minimum.standbysプロパティを使用して、クラスターに保持されるスタンバイノードの最小数を指定します。スタンバイカウントが指定された最小値まで低下した場合、マスターノードに障害が発生してもレプリカノードは昇格されません。
# Instead of setting specific standbys as being unavailable for
# promotion, this property can be used to set a minimum number
# of standbys that will not be promoted. Set to one, for
# example, promotion will not happen if it will drop the number
# of standbys below this value. This property must be the same on
# each node.
minimum.standbys=0
recovery.check.periodプロパティを使用して、データベースが復旧していないかどうかを確認する前にFailover Managerが待機する秒数を指定します。
# Time in seconds between checks to see if a promoting database
# is out of recovery.
recovery.check.period=2
restart.connection.timeoutプロパティを使用して、ノード上のデータベースが接続を受け入れる準備をしている間に、フェールオーバーマネージャーが新しく再構成されたマスターノードまたはスタンバイノードへの接続を試行する秒数を指定します。
# Time in seconds to keep trying to connect to a database after a
# start or restart command returns successfully but the database
# is not ready to accept connections yet (a rare occurance). This
# applies to standby databases that are restarted when being
# reconfigured for a new master, and to master databases that
# are stopped and started as standbys during a switchover.
# This retry mechanism is unrelated to the auto.resume.period parameter.
restart.connection.timeout=60
auto.resume.periodプロパティを使用して、エージェントがそのデータベースの監視を再開しようとする秒数(監視対象データベースが失敗し、エージェントがアイドル状態になった後、またはIDLEモードで起動したとき)を指定します。
# Period in seconds for IDLE agents to try to resume monitoring
# after a database failure or when starting in IDLE mode. Set to
# 0 for agents to not try to resume (in which case the
# 'efm resume <cluster>' command is used after bringing a
# database back up).
auto.resume.period=0
フェールオーバーマネージャーは、仮想IPを使用するクラスターのサポートを提供します。クラスターが仮想IPを使用している場合、 virtualIpプロパティでホスト名またはIPアドレスを指定します。 virtualIp.prefixプロパティで対応するプレフィックスを指定します。 virtualIpを空白のままにすると、仮想IPサポートが無効になります。
virtualIp.interfaceプロパティを使用して、VIPが使用するネットワークインターフェイスを提供します。
指定された仮想IPアドレスは、クラスターのマスターノードにのみ割り当てられます。 virtualIp.single = trueを指定すると、フェイルオーバーの発生時に新しいマスターで同じVIPアドレスが使用されます。 falseの値を指定して、クラスターの各ノードに一意のIPアドレスを提供します。
仮想IPアドレスの使用については、「仮想IPアドレスでのフェールオーバーマネージャーの使用 」 を参照してください。
# These properties specify the IP and prefix length that will be
# remapped during failover. If you do not use a VIP as part of
#フェイルオーバーソリューション、virtualIpプロパティを空白のままにして、VIP処理(割り当て、リリース、到達可能性のテストなど)に対するFailover Managerサポートを無効にします。 ##VIPを指定する場合、インターフェイスとプレフィックスが必要です。 ##ホスト名を指定すると、VIPの取得または解放時にIPアドレスに解決されます。ホスト名が複数のIPアドレスに解決される場合、Failover Managerが使用するアドレスを予測する方法はありません。 ##デフォルトでは、virtualIpおよびvirtualIp.prefixの値は、すべてのエージェントで同じ#でなければなりません。 virtualIp.singleを#falseに設定した場合、virtualIpと#virtualIp.prefixに一意の値を各ノードで指定できます。 ##IPv4アドレスを使用している場合、virtualIp.interface値にセカンダリ仮想IP IDを含めないでください(#「:1」などを含めないでください)。 virtualIp = virtualIp.interface = virtualIp.prefix = virtualIp.single = true 注:マスターエージェントが起動され、ノードに現在VIPがない場合、EFMエージェントはそれを取得します。マスターエージェントを停止しても、ノードからVIPは削除されません。
check.vip.before.promotionプロパティをfalseに設定して、Failover Managerが、障害が発生した場合に新しいマスターに割り当てる前にVIPが使用中であるかどうかを確認しないことを示します。これにより、複数のノードが同じVIPアドレスでブロードキャストする可能性があることに注意してください。マスターノードが分離されているか、別のプロセスでシャットダウンできない場合を除き、このプロパティをtrueに設定する必要があります。
# Whether to check if the VIP (when used) is still in use before
# promoting after a master failure. Turning this off may allow
# the new master to have the VIP even though another node is also
# broadcasting it. This should only be used in environments where
# it is known that the failed master node will be isolated or
# shut down through other means.
check.vip.before.promotion=true
次のプロパティを使用して、スイッチオーバーまたはマスター障害のシナリオでロードバランサーを再構成するスクリプトへのパスを提供します。スクリプトは、スタンバイに失敗した場合にも呼び出されます。これらのプロパティを使用している場合、クラスターのすべてのノード(マスター、スタンバイ、およびミラーリング監視)でそれらを提供して、データベースノードに障害が発生した場合に、別のノードが障害の発生したノードのアドレスでデタッチスクリプトを呼び出すようにします。
script.load.balancer.attachプロパティの後にスクリプト名を指定して、
ノードをロードバランサーに接続する必要があるときに呼び出されるスクリプトを識別します。 script.load.balancer.detachプロパティーを使用して、ノードをロードバランサーから切り離す必要があるときに呼び出されるスクリプトの名前を指定します。 %hプレースホルダーを含めて、クラスターに接続または削除されるノードのIPアドレスを表します。文字列にm(マスターノードの場合)またはs(スタンバイノードの場合)を含めるようにフェールオーバーマネージャーに指示するには、 %tプレースホルダーを含めます。
# Absolute path to load balancer scripts
# The attach script is called when a node should be attached to
# the load balancer, for example after a promotion. The detach
# script is called when a node should be removed, for example
# when a database has failed or is about to be stopped. Use %h to
# represent the IP/hostname of the node that is being
# attached/detached. Use %t to represent the type of node being
# attached or detached: the letter m will be passed in for master nodes
#and the letter s for standby nodes.
#
# Example:
# script.load.balancer.attach=/somepath/attachscript %h %t
script.load.balancer.attach=
script.load.balancer.detach=
script.fenceは、スタンバイノードからマスターノードへの昇格中に呼び出されるオプションのユーザー指定スクリプトへのパスを指定します。
# absolute path to fencing script run during promotion
#
# This is an optional user-supplied script that will be run
# during failover on the standby database node. If left blank,
# no action will be taken. If specified, EFM will execute this
# script before promoting the standby.
#
# Parameters can be passed into this script for the failed master
# and new primary node addresses. Use %p for new primary and %f
# for failed master. On a node that has just been promoted, %p
# should be the same as the node's efm binding address.
#
# Example:
# script.fence=/somepath/myscript %p %f
#
# NOTE: FAILOVER WILL NOT OCCUR IF THIS SCRIPT RETURNS A NON-ZERO EXIT CODE.
script.fence=
script.post.promotionプロパティを使用して、スタンバイノードがマスターに昇格した後に呼び出されるオプションのユーザー指定スクリプトへのパスを指定します。
# Absolute path to fencing script run after promotion
#
# This is an optional user-supplied script that will be run after
#昇格した後のスタンバイノードでのフェイルオーバー#リカバリではなくなりました。このスクリプトからの終了コードは、フェールオーバーマネージャーに影響しませんが、スクリプトの実行後に送信される通知に含まれます。 ##障害が発生したマスターおよび新しいプライマリノードアドレスのパラメーターをこのスクリプトに渡すことができます。新しいプライマリには%pを、失敗したマスターには%f#を使用します。昇格したばかりのノードでは、%p#はノードのefmバインディングアドレスと同じである必要があります。 ##例:#script.post.promotion = / somepath / myscript%f%p script.post.promotion = script.resumed propertyを使用して、エージェントがデータベースの監視を再開するときに呼び出されるユーザー指定のスクリプトへのオプションのパスを指定します。
# Absolute path to resume script
#
# This script is run before an IDLE agent resumes
# monitoring its local database.
script.resumed=
script.db.failureプロパティを使用して、監視するデータベースが失敗したことをエージェントが検出した場合にフェールオーバーマネージャーが呼び出すオプションのユーザー指定スクリプトへの完全なパスを指定します。
# Absolute path to script run after database failure
# This is an optional user-supplied script that will be run after
# an agent detects that its local database has failed.
script.db.failure=
script.master.isolatedプロパティを使用して、マスターデータベースを監視するエージェントがマスターが大多数のフェールオーバーマネージャークラスターから隔離されていることを検出した場合にフェールオーバーマネージャーが呼び出すオプションのユーザー指定スクリプトへの完全なパスを指定します。このスクリプトは、VIPがリリースされた直後に呼び出されます(VIPが使用中の場合)。
# Absolute path to script run on isolated master
# This is an optional user-supplied script that will be run after
# a master agent detects that it has been isolated from the
# majority of the efm cluster.
script.master.isolated=
script.remote.pre.promotionプロパティーを使用して、ノードがそのデータベースをマスターにプロモートしようとしているときに、プロモーションに関係しないエージェントノードで呼び出されるスクリプトのパスと名前を指定します。
%pプレースホルダーを含めて、新しいプライマリノードのアドレスを識別します。
# Absolute path to script invoked on non-promoting agent nodes
# before a promotion.
#
# This optional user-supplied script will be invoked on other
# agents when a node is about to promote its database. The exit
# code from this script has no effect on Failover Manager, but
# will be included in a notification sent after the script
# executes.
#
# Pass a parameter (%p) with the script to identify the new
# primary node address.
#
# Example:
# script.remote.pre.promotion=/path_name/script_name %p
script.remote.pre.promotion=
script.remote.post.promotionプロパティを使用して、昇格の発生後に非マスターノードで呼び出されるスクリプトのパスと名前を指定します。
%pプレースホルダーを含めて、新しいプライマリノードのアドレスを識別します。
# Absolute path to script invoked on non-master agent nodes
# after a promotion.
#
# This optional user-supplied script will be invoked on nodes
# (except the new master) after a promotion occurs. The exit code
# from this script has no effect on Failover Manager, but will be
# included in a notification sent after the script executes.
#
# Pass a parameter (%p) with the script to identify the new
# primary node address.
#
# Example:
# script.remote.post.promotion=/path_name/script_name %p
script.remote.post.promotion=
script.custom.monitorプロパティを使用して、定期的な間隔( custom.monitor.intervalプロパティで秒単位で指定)で呼び出されるオプションのスクリプトの名前と場所を指定します。
custom.monitor.timeoutを使用して、スクリプトの実行を許可する最大時間を指定します。指定した時間内にスクリプトの実行が完了しない場合、フェールオーバーマネージャーは通知を送信します。
custom.monitor.safe.modeをtrueに設定して、スクリプトからゼロ以外の終了コードを報告するようにフェールオーバーマネージャーに指示しますが、終了コードの結果としてスタンバイをプロモートしません。
# Absolute path to a custom monitoring script.
#
# Use script.custom.monitor to specify the location and name of
# an optional user-supplied script that will be invoked
#定期的にカスタム監視タスクを実行します。ゼロ以外の終了値は、チェックが失敗したことを意味します。これは、データベース障害として扱われます。マスターノードでは、スクリプトの失敗によりプロモーションが発生します。スタンバイノードのスクリプトで障害が発生すると、通知が生成され、エージェントはIDLEになります。 ##カスタム監視スクリプトが指定されている場合、custom.monitor。\ *プロパティが必要です。##custom.monitor.intervalは、スクリプトの実行間の秒単位の時間です。 ##custom.monitor.timeoutは、スクリプトの実行を許可する期間の秒単位のタイムアウト値です。スクリプトの実行が指定された時間を超えると、タスクは停止され、通知が送信されます。後続の実行は続行されます。 ##custom.monitor.safe.modeがtrueに設定されている場合、スクリプトからゼロ以外の終了コードが報告されますが、#プロモーションは発生せず、データベース障害として扱われません。これにより、EFMに影響を与えることなく#スクリプトをテストできます。 #script.custom.monitor = custom.monitor.interval = custom.monitor.timeout = custom.monitor.safe.mode = sudo.commandプロパティを使用して、拡張アクセス許可を必要とするタスクを実行するときに、フェールオーバーマネージャーによって呼び出されるコマンドを指定します。このオプションを使用して、システム認証に固有のコマンドオプションを含めます。
sudo.user.commandプロパティを使用して、データベース所有者が実行するコマンドを実行するときにフェールオーバーマネージャーによって呼び出されるコマンドを指定します。
# Command to use in place of 'sudo' if desired when efm runs
# the efm_db_functions or efm_root_functions, or efm_address
# scripts.
# Sudo is used in the following ways by efm:
#
# sudo /usr/edb/efm-<version>/bin/efm_address <arguments>
# sudo /usr/edb/efm-<version>/bin/efm_root_functions <arguments>
# sudo -u <db service owner> /usr/edb/efm-<version>/bin/efm_db_functions <arguments>
#
# 'sudo' in the first two examples will be replaced by the value
# of the sudo.command property. 'sudo -u <db service owner>' will
# be replaced by the value of the sudo.user.command property.
# The '%u' field will be replaced with the db owner.
sudo.command=sudo
sudo.user.command=sudo -u %u
lock.dirプロパティを使用して、フェールオーバーマネージャーロックファイルの代替の場所を指定します。このファイルにより、フェールオーバーマネージャーはノード上の単一クラスターに対して複数の(孤立している可能性のある)エージェントを起動できなくなります。
# Specify the directory of lock file on the node. Failover
# Manager creates a file named <cluster>.lock at this location to
# avoid starting multiple agents for same cluster. If the path
# does not exist, Failover Manager will attempt to create it. If
# not specified defaults to '/var/lock/efm-<version>'
lock.dir=
log.dirプロパティを使用して、エージェントログファイルが書き込まれる場所を指定します。ディレクトリが存在しない場合、Failover Managerはディレクトリを作成しようとします。
# Specify the directory of agent logs on the node. If the path
# does not exist, Failover Manager will attempt to create it. If
# not specified defaults to '/var/log/efm-<version>'. (To store
# Failover Manager startup logs in a custom location, modify the
# path in the service script to point to an existing, writable
# directory.)
# If using a custom log directory, you must configure
# logrotate separately. Use 'man logrotate' for more information.
log.dir=
Failover ManagerホストでUDPまたはTCPプロトコルを有効にした後、syslogへのロギングを有効にできます。 syslog.protocolパラメーターを使用してプロトコルタイプ(UDPまたはTCP)を指定し、 syslog.portパラメーターを使用してsyslogホストのリスナーポートを指定します。 syslog.facility値は、エントリを作成したプロセスの識別子として使用できます。値はLOCAL0とLOCAL7の間でなければなりません。
# Syslog information. The syslog service must be listening on
# the port for the given protocol, which can be UDP or TCP.
# The facilities supported are LOCAL0 through LOCAL7.
syslog.host=localhost
syslog.port=514
syslog.protocol=UDP
syslog.facility=LOCAL1
file.log.enabledおよびsyslog.enabledプロパティを使用して、実装するログの種類を指定します。 file.log.enabledをtrueに設定して、ファイルへのロギングを有効にします。 UDPプロトコルまたはTCPプロトコルを有効にし、syslog.enabledをtrueに設定して、syslogへのロギングを有効にします。ファイルとsyslogの両方へのロギングを有効にできます。
# Which logging is enabled.
file.log.enabled=true
syslog.enabled=false
syslogログの構成の詳細については、 syslogログファイルエントリの有効化を参照してください。
jgroups.loglevelおよびefm.loglevelパラメーターを使用して、Failover Managerによって記録される詳細レベルを指定します。デフォルト値はINFOです。ロギングの詳細については、ロギングの制御を参照してください。
# Logging levels for JGroups and EFM.
# Valid values are: TRACE, DEBUG, INFO, WARN, ERROR
# Default value: INFO
# It is not necessary to increase these values unless debugging a
# specific issue. If nodes are not discovering each other at
# startup, increasing the jgroups level to DEBUG will show
# information about the TCP connection attempts that may help
# diagnose the connection failures.
jgroups.loglevel=INFO
efm.loglevel=INFO
jvm.optionsプロパティを使用して、JVM関連の構成情報を渡します。デフォルト設定では、Failover Managerエージェントが使用できるメモリ量を指定します。
# Extra information that will be passed to the JVM when starting
# the agent.
jvm.options=-Xmx128m