高可用性 Shared File Systems API

高可用性 Shared File Systems API

Shared File Systems (manila) API サービスのアクティブ/パッシブモードでの高可用性は、以下が関係します。

Shared File Systems API リソースの Pacemaker への追加

  1. まず、お使いのシステムにリソースエージェントをダウンロードします。

    # cd /usr/lib/ocf/resource.d/openstack
    # wget https://git.openstack.org/cgit/openstack/openstack-resource-agents/plain/ocf/manila-api
    # chmod a+rx *
    
  2. Shared File Systems API リソース用の Pacemaker 設定を追加します。以下のコマンドを使用して Pacemaker クラスターに接続します。

    # crm configure
    

    注釈

    crm configure はバッチ入力をサポートします。そのため、現在の pacemaker 設定の中に上の行をコピー・ペーストし、適宜変更を反映できます。

    例えば、お好みの仮想 IP アドレスに一致させるために、crm configure メニューから edit  p_ip_manila-api と入力し、リソースを編集できます。

  3. 以下のクラスターリソースを追加します。

    primitive p_manila-api ocf:openstack:manila-api \
      params config="/etc/manila/manila.conf" \
      os_password="secretsecret" \
      os_username="admin" \
      os_tenant_name="admin" \
      keystone_get_token_url="http://10.0.0.11:5000/v2.0/tokens" \
      op monitor interval="30s" timeout="30s"
    

    この設定は Shared File Systems API サービスを管理するためのリソース p_manila-api を作成します。

  4. crm configure メニューから以下のコマンドを実行して、設定の変更を反映します。

    # commit
    

Pacemaker は Shared File Systems API サービスおよび依存するリソースを同じノードに起動します。

Shared File Systems API サービスの設定

/etc/manila/manila.conf ファイルを編集します。

1
2
3
4
5
6
7
8
9
# We have to use MySQL connection to store data:
sql_connection = mysql+pymysql://manila:password@10.0.0.11/manila?charset=utf8

# We bind Shared File Systems API to the VIP:
osapi_volume_listen = 10.0.0.11

# We send notifications to High Available RabbitMQ:
notifier_strategy = rabbit
rabbit_host = 10.0.0.11

高可用性 Shared File Systems API を使用するための OpenStack サービスの設定

OpenStack サービスは、通常の非高可用性環境のように、Shared File Systems API サーバーの物理 IP アドレスを指定する代わりに、Shared File Systems API の設定が高可用性と仮想クラスター IP アドレスを指し示す必要があります。

この IP を用いて Shared File Systems API エンドポイントを作成する必要があります。

プライベート IP アドレスとパブリック IP アドレスの両方を使用する場合、2 つの仮想 IP アドレスを作成し、次のようにエンドポイントを定義すべきです。

$ openstack endpoint create --region RegionOne \
  sharev2 public 'http://PUBLIC_VIP:8786/v2/%(tenant_id)s'

$ openstack endpoint create --region RegionOne \
  sharev2 internal 'http://10.0.0.11:8786/v2/%(tenant_id)s'

$ openstack endpoint create --region RegionOne \
  sharev2 admin 'http://10.0.0.11:8786/v2/%(tenant_id)s'
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.