開発次郎さん こんにちは、山内です。 pacemakerなどのバージョンが不明ですが、該当nginxリソースのmetaパラメータか、リソースのdefaultパラメータのmigration-thresholdを1に設定してみてください。 - https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/high_availability_add-on_reference/s1-failure_migration-haar 実際には他の構成リソースの故障を1回以上許容する場合などには、個別に設定することをお勧めします。 ---以下は、postfixでsystemdリソースを起動、故障からFOした結果です。--- ①起動後 [root @ rh76-01 ~]# crm_mon -rfA1 Stack: corosync Current DC: rh76-02 (version 1.1.22-1a80025) - partition with quorum Last updated: Sat Jul 25 08:26:34 2020 Last change: Sat Jul 25 08:26:21 2020 by root via cibadmin on rh76-01 2 nodes configured 1 resource instance configured Online: [ rh76-01 rh76-02 ] Full list of resources: prmPostfix (systemd:postfix): Started rh76-01 Node Attributes: * Node rh76-01: * Node rh76-02: Migration Summary: * Node rh76-01: * Node rh76-02: ②systemctl stop postfix.service実行後 [root @ rh76-01 ~]# crm_mon -rfA1 Stack: corosync Current DC: rh76-02 (version 1.1.22-1a80025) - partition with quorum Last updated: Sat Jul 25 08:26:35 2020 Last change: Sat Jul 25 08:26:21 2020 by root via cibadmin on rh76-01 2 nodes configured 1 resource instance configured Online: [ rh76-01 rh76-02 ] Full list of resources: prmPostfix (systemd:postfix): FAILED rh76-01 Node Attributes: * Node rh76-01: * Node rh76-02: Migration Summary: * Node rh76-01: prmPostfix: migration-threshold=1 fail-count=1 last-failure='Sat Jul 25 08:26:34 2020' * Node rh76-02: Failed Resource Actions: * prmPostfix_monitor_10000 on rh76-01 'not running' (7): call=7, status=complete, exitreason='', last-rc-change='Sat Jul 25 08:26:34 2020', queued=0ms, exec=0ms ③FO後 [root @ rh76-01 ~]# crm_mon -rfA1 Stack: corosync Current DC: rh76-02 (version 1.1.22-1a80025) - partition with quorum Last updated: Sat Jul 25 08:26:39 2020 Last change: Sat Jul 25 08:26:21 2020 by root via cibadmin on rh76-01 2 nodes configured 1 resource instance configured Online: [ rh76-01 rh76-02 ] Full list of resources: prmPostfix (systemd:postfix): Started rh76-02 Node Attributes: * Node rh76-01: * Node rh76-02: Migration Summary: * Node rh76-01: prmPostfix: migration-threshold=1 fail-count=1 last-failure='Sat Jul 25 08:26:34 2020' * Node rh76-02: Failed Resource Actions: * prmPostfix_monitor_10000 on rh76-01 'not running' (7): call=7, status=complete, exitreason='', last-rc-change='Sat Jul 25 08:26:34 2020', queued=0ms, exec=0ms 以上、よろしくお願いいたします。 ----- Original Message ----- >From: 開発次郎 <jiro.****@gmail*****> >To: linux****@lists***** >Date: 2020/7/24, Fri 23:45 >Subject: [Linux-ha-jp] nginxをsystemctl stop するとFOさせたい > > >はじめまして。 >早速で恐縮ですが、有識者の皆さんにアドバイスいただきたいことが有ります。 > > >NGINXサーバ2台でHAクラスタを作り、ユーザには仮想IPでウェブサイトを公開したく(仮想IPの設定など省略させていただきます)、 > > >pcs resource create webserver systemd:nginx op monitor interval="10s" timeout="20s" > > > >と設定したのですが、systemctl stop nginxしてもFOせず、nginxが再起動してしまいます(restartのような動き)。on-fail="standby"とかon-fail="restart"を指定しても状況は変わりません。 > > >systemctl stop nginxした時にFOさせることは可能でしょうか?もし可能ならば、どうすればよいのでしょうか? > > >以上、よろしくお願いいたします。 >_______________________________________________ >Linux-ha-japan mailing list >Linux****@lists***** >https://lists.osdn.me/mailman/listinfo/linux-ha-japan > > >