読者です 読者をやめる 読者になる 読者になる

NTNX>日記

個人的な趣味による Nutanix Community Edition 日記。Japanese のみですみません。

Nutanix CE で OpenStack。Part4: OVM-services (Remote OpenStack Controller)

Nutanix CE + OpenStack Service VM(OVM)を、Remote OpenStack Controller を使用する「OVM-services」で構成してみます。

今回の構成

Ravello を使用しています。
OVM#1 / #2 は、Nutanix CE とは独立した VM にしています。

f:id:gowatana:20160418025345p:plain

OpenStack Controller もとりあえず Acropolis OVM を使用してみました。

Acropolis OVM#1

  • ホスト名: ovm01
  • IP アドレス: 10.1.1.15/24

OpenStack Controller ※Acropolis OVM#2

  • ホスト名: ovm02
  • IP アドレス: 10.1.1.16/24

Nutanix CE クラスタ

  • クラスタ名: ntnx-ce
  • IP アドレス: 10.1.1.12 ※クラスタ VIP
  • バージョン: 2016.03.13

Ravello の VM は、以前の投稿と同様の構成にしています。
ただし、Nutanix CE は IP アドレスが /24 のものを用意しました。

参考資料

主に、下記を参考にしました。

Management of Nutanix Clusters with OpenStack

http://download.nutanix.com/documentation/eco/OpenStack_Integration_Solution_Guide_v1_0.pdf

 

Nutanix Bible 日本語版

OpenStack の部分も完全に日本語訳されました。

http://nutanixbible.jp/#anchor-openstack-39

 

1. Nutanix CE Cluster のセットアップ

今回は、Nutanix CE のシングルノードクラスタを構成済みです。
Prism にログインして、Nutanix クラスタの設定をしておきます。

クラスタ名と VIP を設定します。

f:id:gowatana:20160418024901p:plain

「default」という名前のストレージ コンテナを作成します。

「Storage」→「+ Container」で、

f:id:gowatana:20160418025020p:plain

「default」コンテナを作成しておきます。

f:id:gowatana:20160418025330p:plain

2. Acropolis OVM の初期設定

今回も Ravello を使用しているので、まずコンソール経由で初期設定をします。
OVM#1 と OVM#2 両方で、 SSH で接続できるようにネットワーク設定をします。

OVM#1

[root@none ~]# ip addr add 10.1.1.15/24 dev eth0
[root@none ~]# ip route add default via 10.1.1.1

OVM#2

[root@none ~]# ip addr add 10.1.1.16/24 dev eth0
[root@none ~]# ip route add default via 10.1.1.1

ついでに root パスワードも変更しておきます。

[root@none ~]# passwd
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

3. OpenStack Controller(Acropolis OVM#2) のセットアップ

OVM#2 を、OpenStack Controller としてセットアップします。

Acropolis Driver を追加(ovmctl --add ovm)します。

[root@none ~]# ovmctl --add ovm --name ovm02 --ip 10.1.1.16 --netmask 255.255.255.0 --gateway 10.1.1.1 --nameserver 10.1.1.1 --domain ntnx.local

1/2: Remove default JSON:
Successful

2/2: Add service JSON:
Restarting network (via systemctl):                        [  OK  ]
Successful

[root@none ~]#

そして、OpenStack Controller としてセットアップします。
※「--add ovm」でホスト名も設定されるので、ログインしなおすとプロンプトがホスト名になります。

[root@ovm02 ~]# ovmctl --add controller --name ovm02 --ip 10.1.1.16

1/4: Stop services:
Redirecting to /bin/systemctl stop  openstack-nova-api.service
Redirecting to /bin/systemctl stop  openstack-nova-consoleauth.service
Redirecting to /bin/systemctl stop  openstack-nova-scheduler.service
Redirecting to /bin/systemctl stop  openstack-nova-conductor.service
Redirecting to /bin/systemctl stop  openstack-nova-compute.service
Redirecting to /bin/systemctl stop  openstack-nova-cert.service
Redirecting to /bin/systemctl stop  openstack-nova-novncproxy.service
Redirecting to /bin/systemctl stop  openstack-cinder-api.service
Redirecting to /bin/systemctl stop  openstack-cinder-scheduler.service
Redirecting to /bin/systemctl stop  openstack-cinder-volume.service
Redirecting to /bin/systemctl stop  openstack-cinder-backup.service
Redirecting to /bin/systemctl stop  openstack-glance-registry.service
Redirecting to /bin/systemctl stop  openstack-glance-api.service
Redirecting to /bin/systemctl stop  neutron-dhcp-agent.service
Redirecting to /bin/systemctl stop  neutron-l3-agent.service
Redirecting to /bin/systemctl stop  neutron-metadata-agent.service
Redirecting to /bin/systemctl stop  neutron-openvswitch-agent.service
Redirecting to /bin/systemctl stop  neutron-server.service
Redirecting to /bin/systemctl start  iptables.service
Note: Forwarding request to 'systemctl enable iptables.service'.
Redirecting to /bin/systemctl restart  httpd.service
Successful

2/4: Disconnect controller:
Apply allinone disconnect manifest
Notice: Compiled catalog for ovm02.ntnx.local in environment production in 0.61 seconds
Notice: Finished catalog run in 5.25 seconds
Apply services disconnect manifest
Notice: Compiled catalog for ovm02.ntnx.local in environment production in 0.54 seconds
Notice: Finished catalog run in 16.96 seconds
Apply glance plugin disconnect manifest
Notice: Compiled catalog for ovm02.ntnx.local in environment production in 0.14 seconds
Notice: Finished catalog run in 5.99 seconds
Successful

3/4: Connect controller:
Apply allinone connect manifest
Notice: Compiled catalog for ovm02.ntnx.local in environment production in 0.28 seconds
Notice: /Stage[main]/Main/Augeas[ovm_allinone_glance_controller_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_allinone_glance_controller_registry_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_allinone_nova_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/File_line[add_allinone_httpd_config]/ensure: created
Notice: /Stage[main]/Main/Augeas[ovm_allinone_cinder_controller_config]/returns: executed successfully
Notice: Finished catalog run in 5.08 seconds
Apply services connect manifest
Notice: Compiled catalog for ovm02.ntnx.local in environment production in 0.30 seconds
Notice: /Stage[main]/Main/Augeas[ovm_nova_cluster_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_nova_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_cluster_entry_points_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_ml2_config]/returns: executed successfully
Notice: /Stage[main]/Main/File_line[add-acropolis-driver]/ensure: created
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_metadata_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_ovs_neutron_plugin_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_cluster_config]/returns: executed successfully
Notice: Finished catalog run in 9.93 seconds
Apply glance plugin connect manifest
Notice: Compiled catalog for ovm02.ntnx.local in environment production in 0.12 seconds
Notice: /Stage[main]/Main/Augeas[ovm_nova_service_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_controller_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_cluster_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_controller_registry_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_cluster_entry_points_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_service_config]/returns: executed successfully
Notice: Finished catalog run in 8.53 seconds
Successful

4/4: Restart Services:
Redirecting to /bin/systemctl restart  openstack-nova-api.service
Redirecting to /bin/systemctl restart  openstack-nova-consoleauth.service
Redirecting to /bin/systemctl restart  openstack-nova-scheduler.service
Redirecting to /bin/systemctl restart  openstack-nova-conductor.service
Redirecting to /bin/systemctl restart  openstack-nova-compute.service
Redirecting to /bin/systemctl restart  openstack-nova-cert.service
Redirecting to /bin/systemctl restart  openstack-nova-novncproxy.service
Redirecting to /bin/systemctl restart  openstack-cinder-api.service
Redirecting to /bin/systemctl restart  openstack-cinder-scheduler.service
Redirecting to /bin/systemctl restart  openstack-cinder-volume.service
Redirecting to /bin/systemctl restart  openstack-cinder-backup.service
Redirecting to /bin/systemctl restart  openstack-glance-registry.service
Redirecting to /bin/systemctl restart  openstack-glance-api.service
Redirecting to /bin/systemctl restart  neutron-server.service
Redirecting to /bin/systemctl restart  neutron-dhcp-agent.service
Redirecting to /bin/systemctl restart  neutron-l3-agent.service
Redirecting to /bin/systemctl restart  neutron-metadata-agent.service
Redirecting to /bin/systemctl restart  neutron-openvswitch-agent.service
Note: Forwarding request to 'systemctl enable prism-vnc-proxy.service'.
Redirecting to /bin/systemctl stop  iptables.service
Note: Forwarding request to 'systemctl disable iptables.service'.
Removed symlink /etc/systemd/system/basic.target.wants/iptables.service.
Redirecting to /bin/systemctl restart  httpd.service
Successful

[root@ovm02 ~]#

こうなりました。

[root@ovm02 ~]# ovmctl --show

Role:
-----
Allinone - Openstack controller, Acropolis drivers

OVM configuration:
------------------
1     OVM name                     : ovm02
      IP                           : 10.1.1.16
      Netmask                      : 255.255.255.0
      Gateway                      : 10.1.1.1
      Nameserver                   : 10.1.1.1
      Domain                       : ntnx.local

Openstack Controllers configuration:
------------------------------------
1     Controller name              : ovm02
      IP                           : 10.1.1.16
      Auth
        Auth strategy              : keystone
        Auth region                : RegionOne
        Auth tenant                : services
        Auth Nova password         : ********
        Auth Glance password       : ********
        Auth Cinder password       : ********
        Auth Neutron password      : ********
      DB
        DB Nova                    : mysql
        DB Cinder                  : mysql
        DB Glance                  : mysql
        DB Neutron                 : mysql
        DB Nova password           : ********
        DB Glance password         : ********
        DB Cinder password         : ********
        DB Neutron password        : ********
      RPC
        RPC backend                : rabbit
        RPC username               : guest
        RPC password               : ********
      Image cache                  : disable

Nutanix Clusters configuration:
-------------------------------
None

Version:
--------
Version     : 2015.1.0
Release     : 1
Summary     : Acropolis drivers for Openstack Kilo.

[root@ovm02 ~]#

4. Acropolis Driver(OVM#1)のセットアップ

OVM#1 を、OpenStack Drivers-Only モードとしてセットアップします。
OVM#2 と同様、Acropolis Driver を追加します。

[root@none ~]# ovmctl --add ovm --name ovm01 --ip 10.1.1.15 --netmask 255.255.255.0 --gateway 10.1.1.1 --nameserver 10.1.1.1 --domain ntnx.local

1/2: Remove default JSON:
Successful

2/2: Add service JSON:
Restarting network (via systemctl):                        [  OK  ]
Successful

[root@none ~]#

OVM#1で、Remote OpenStack Controller として OVM#2 を追加します。

admin のパスワードは、デフォルトのままです。

[root@ovm01 ~]# ovmctl --add controller --name ovm02 --ip 10.1.1.16 --username admin --password admin

1/4: Stop services:
Redirecting to /bin/systemctl stop  openstack-nova-compute.service
Redirecting to /bin/systemctl stop  openstack-cinder-volume.service
Redirecting to /bin/systemctl stop  openstack-glance-registry.service
Redirecting to /bin/systemctl stop  openstack-glance-api.service
Redirecting to /bin/systemctl stop  neutron-dhcp-agent.service
Redirecting to /bin/systemctl stop  neutron-l3-agent.service
Redirecting to /bin/systemctl stop  neutron-metadata-agent.service
Redirecting to /bin/systemctl stop  neutron-openvswitch-agent.service
Redirecting to /bin/systemctl stop  neutron-server.service
Redirecting to /bin/systemctl start  iptables.service
Note: Forwarding request to 'systemctl enable iptables.service'.
Redirecting to /bin/systemctl restart  httpd.service
Successful

2/4: Disconnect controller:
Apply services disconnect manifest
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 2.15 seconds
Notice: Finished catalog run in 60.58 seconds
Apply glance plugin disconnect manifest
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.67 seconds
Notice: Finished catalog run in 26.96 seconds
Successful

3/4: Connect controller:
Apply services connect manifest
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 1.52 seconds
Notice: /Stage[main]/Main/Augeas[ovm_nova_cluster_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_nova_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_cluster_entry_points_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_ml2_config]/returns: executed successfully
Notice: /Stage[main]/Main/File_line[add-acropolis-driver]/ensure: created
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_metadata_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_ovs_neutron_plugin_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_cluster_config]/returns: executed successfully
Notice: Finished catalog run in 29.46 seconds
Apply glance plugin connect manifest
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.12 seconds
Notice: /Stage[main]/Main/Augeas[ovm_nova_service_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_controller_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_cluster_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_controller_registry_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_cluster_entry_points_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_service_config]/returns: executed successfully
Notice: Finished catalog run in 6.02 seconds
Successful

4/4: Restart Services:
Redirecting to /bin/systemctl restart  openstack-nova-compute.service
Redirecting to /bin/systemctl restart  openstack-cinder-volume.service
Redirecting to /bin/systemctl restart  openstack-glance-registry.service
Redirecting to /bin/systemctl restart  openstack-glance-api.service
Redirecting to /bin/systemctl restart  neutron-server.service
Redirecting to /bin/systemctl restart  neutron-dhcp-agent.service
Redirecting to /bin/systemctl restart  neutron-l3-agent.service
Redirecting to /bin/systemctl restart  neutron-metadata-agent.service
Redirecting to /bin/systemctl restart  neutron-openvswitch-agent.service
Note: Forwarding request to 'systemctl enable prism-vnc-proxy.service'.
Redirecting to /bin/systemctl stop  iptables.service
Note: Forwarding request to 'systemctl disable iptables.service'.
Removed symlink /etc/systemd/system/basic.target.wants/iptables.service.
Redirecting to /bin/systemctl restart  httpd.service
Successful

[root@ovm01 ~]#

Nutanix CE Cluster を追加します。
一応、クラスタ VIP に疎通確認しておきます。

[root@ovm01 ~]# ping 10.1.1.12 -c 1
PING 10.1.1.12 (10.1.1.12) 56(84) bytes of data.
64 bytes from 10.1.1.12: icmp_seq=1 ttl=64 time=2.16 ms

--- 10.1.1.12 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.162/2.162/2.162/0.000 ms

クラスタを追加します。ユーザ / パスワードは、Prosm のものを指定します。

[root@ovm01 ~]# ovmctl --add cluster --name ntnx-ce --ip 10.1.1.12 --username admin --password <パスワード>

1/3: Start VNC proxy:
Started vnc proxy service
Successful

2/3: Enable services:
Service compute enabled
Service volume enabled
Service network enabled
Successful

3/3: Restart services:
Redirecting to /bin/systemctl restart  openstack-nova-compute.service
Redirecting to /bin/systemctl restart  openstack-cinder-volume.service
Redirecting to /bin/systemctl restart  openstack-glance-registry.service
Redirecting to /bin/systemctl restart  openstack-glance-api.service
Redirecting to /bin/systemctl restart  neutron-server.service
Redirecting to /bin/systemctl restart  neutron-dhcp-agent.service
Redirecting to /bin/systemctl restart  neutron-l3-agent.service
Redirecting to /bin/systemctl restart  neutron-metadata-agent.service
Redirecting to /bin/systemctl restart  neutron-openvswitch-agent.service
Note: Forwarding request to 'systemctl enable prism-vnc-proxy.service'.
Redirecting to /bin/systemctl stop  iptables.service
Note: Forwarding request to 'systemctl disable iptables.service'.
Redirecting to /bin/systemctl restart  httpd.service
Successful

[root@ovm01 ~]#

OVM#1 は、Role が Acropolis drivers だけになっています。

[root@ovm01 ~]# ovmctl --show

Role:
-----
Services - Acropolis drivers

OVM configuration:
------------------
1     OVM name                     : ovm01
      IP                           : 10.1.1.15
      Netmask                      : 255.255.255.0
      Gateway                      : 10.1.1.1
      Nameserver                   : 10.1.1.1
      Domain                       : ntnx.local

Openstack Controllers configuration:
------------------------------------
1     Controller name              : ovm02
      IP                           : 10.1.1.16
      Auth
        Auth strategy              : keystone
        Auth region                : RegionOne
        Auth tenant                : services
        Auth Nova password         : ********
        Auth Glance password       : ********
        Auth Cinder password       : ********
        Auth Neutron password      : ********
      DB
        DB Nova                    : mysql
        DB Cinder                  : mysql
        DB Glance                  : mysql
        DB Neutron                 : mysql
        DB Nova password           : ********
        DB Glance password         : ********
        DB Cinder password         : ********
        DB Neutron password        : ********
      RPC
        RPC backend                : rabbit
        RPC username               : guest
        RPC password               : ********
      Image cache                  : disable

Nutanix Clusters configuration:
-------------------------------
1     Cluster name                 : ntnx-ce
      IP                           : 10.1.1.12
      Username                     : admin
      Password                     : ********
      Vnc                          : 57721
      Vcpus per core               : 4
      Container name               : default
      Services enabled             : compute, volume, network

Version:
--------
Version     : 2015.1.0
Release     : 1
Summary     : Acropolis drivers for Openstack Kilo.

[root@ovm01 ~]#

5. OpenStack Controller(OVM#2)でのサービス設定修正

OVM#2 でエンドポイントやサービス起動設定の修正をします。
/root/keystonerc_admin ファイルに、環境変数が記載されています。

[root@ovm02 ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

これを source コマンドで読み込んでから OpenStack 関連のコマンドを実行します。

[root@ovm02 ~]# source keystonerc_admin
[root@ovm02 ~(keystone_admin)]#

Glance Endpoint 切り替え

Glance のエンドポイントを OVM#1 のアドレスに変更します。

現状のエンドポイントです。

[root@ovm02 ~(keystone_admin)]# openstack endpoint show glance
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://10.1.1.16:9292            |
| enabled      | True                             |
| id           | 124ff05099484f5991302cedf30ba897 |
| internalurl  | http://10.1.1.16:9292            |
| publicurl    | http://10.1.1.16:9292            |
| region       | RegionOne                        |
| service_id   | 7064377731d7458b8abd4357ced971a5 |
| service_name | glance                           |
| service_type | image                            |
+--------------+----------------------------------+

エンドポイントを削除して、OVM#1 のアドレスで作成しなおします。

[root@ovm02 ~(keystone_admin)]# openstack endpoint delete 124ff05099484f5991302cedf30ba897
[root@ovm02 ~(keystone_admin)]# openstack endpoint create \
> --publicurl http://10.1.1.15:9292 \
> --adminurl http://10.1.1.15:9292 \
> --internalurl http://10.1.1.15:9292 \
> --region RegionOne \
> 7064377731d7458b8abd4357ced971a5
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://10.1.1.15:9292            |
| id           | 51310c21283b4b149fbb75cf4479b73f |
| internalurl  | http://10.1.1.15:9292            |
| publicurl    | http://10.1.1.15:9292            |
| region       | RegionOne                        |
| service_id   | 7064377731d7458b8abd4357ced971a5 |
| service_name | glance                           |
| service_type | image                            |
+--------------+----------------------------------+

Neutron Endpoint 切り替え

Neutron のエンドポイントを OVM#1 のアドレスに変更します。

現状のエンドポイントです。

[root@ovm02 ~(keystone_admin)]# openstack endpoint show neutron
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://10.1.1.16:9696            |
| enabled      | True                             |
| id           | d4fc610a6d2545649b9290e50d6c4980 |
| internalurl  | http://10.1.1.16:9696            |
| publicurl    | http://10.1.1.16:9696            |
| region       | RegionOne                        |
| service_id   | e9abbc67c14a4acdab46166b59799212 |
| service_name | neutron                          |
| service_type | network                          |
+--------------+----------------------------------+

エンドポイントを削除して、OVM#1 のアドレスで作成しなおします。

[root@ovm02 ~(keystone_admin)]# openstack endpoint delete d4fc610a6d2545649b9290e50d6c4980
[root@ovm02 ~(keystone_admin)]# openstack endpoint create \
> --publicurl http://10.1.1.15:9696 \
> --adminurl http://10.1.1.15:9696 \
> --internalurl http://10.1.1.15:9696 \
> --region RegionOne \
> e9abbc67c14a4acdab46166b59799212
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://10.1.1.15:9696            |
| id           | d2cee20010964addb536934ec5a73479 |
| internalurl  | http://10.1.1.15:9696            |
| publicurl    | http://10.1.1.15:9696            |
| region       | RegionOne                        |
| service_id   | e9abbc67c14a4acdab46166b59799212 |
| service_name | neutron                          |
| service_type | network                          |
+--------------+----------------------------------+

Nova 設定修正

/etc/nova/nova.conf ファイルを編集して、Glance ホストのアドレスを OVM#1 に設定します。

[root@ovm02 ~]# openstack-config --set /etc/nova/nova.conf glance host 10.1.1.15
[root@ovm02 ~]# openstack-config --set /etc/nova/nova.conf glance port 9292
[root@ovm02 ~]# openstack-config --set /etc/nova/nova.conf glance api_servers '$host:$port'

openstack-nova-compute サービスは Controller では不要なので停止します。

[root@ovm02 ~]# systemctl disable openstack-nova-compute.service
[root@ovm02 ~]# systemctl stop openstack-nova-compute.service

Cinder 設定修正

/etc/cinder/cinder.conf ファイルを編集して、Glance ホストのアドレスを OVM#1 に設定します。

[root@ovm02 ~]# openstack-config --set /etc/cinder/cinder.conf DEFAULT glance_host 10.1.1.15
[root@ovm02 ~]# openstack-config --set /etc/cinder/cinder.conf DEFAULT glance_port 9292
[root@ovm02 ~]# openstack-config --set /etc/cinder/cinder.conf DEFAULT glance_api_servers '$glance_host:$glance_port'

LVM バックエンドの設定を削除します。

[root@ovm02 ~]# openstack-config --del /etc/cinder/cinder.conf lvm

openstack-cinder-volume サービスを停止します。

[root@ovm02 ~]# systemctl disable openstack-cinder-volume.service
[root@ovm02 ~]# systemctl stop openstack-cinder-volume.service

Glance サービスの停止

openstack-glance-api サービスを停止します。

[root@ovm02 ~]# systemctl disable openstack-glance-api.service
Removed symlink /etc/systemd/system/multi-user.target.wants/openstack-glance-api.service.
[root@ovm02 ~]# systemctl stop openstack-glance-api.service

openstack-glance-registry サービスを停止します

[root@ovm02 ~]# systemctl disable openstack-glance-registry.service
Removed symlink /etc/systemd/system/multi-user.target.wants/openstack-glance-registry.service.
[root@ovm02 ~]# systemctl stop openstack-glance-registry.service

6. サービスの再起動

nova-compute 以外の Nova サービスを再起動します。

[root@ovm02 ~]# systemctl restart openstack-nova-api.service
[root@ovm02 ~]# systemctl restart openstack-nova-consoleauth.service
[root@ovm02 ~]# systemctl restart openstack-nova-scheduler.service
[root@ovm02 ~]# systemctl restart openstack-nova-conductor.service
[root@ovm02 ~]# systemctl restart openstack-nova-cert.service
[root@ovm02 ~]# systemctl restart openstack-nova-novncproxy.service

cinder-volume、openstack-losetup 以外の Cinder サービスを再起動します。

[root@ovm02 ~]# systemctl restart openstack-cinder-api.service
[root@ovm02 ~]# systemctl restart openstack-cinder-scheduler.service
[root@ovm02 ~]# systemctl restart openstack-cinder-backup.service

7. iptables 無効化

iptables を無効にしてしまいます。

[root@ovm02 ~]# iptables -F
[root@ovm02 ~]# systemctl disable iptables.service
[root@ovm02 ~]# systemctl stop iptables.service

8. Horizon の不具合対応

Horizon Dashboard の不具合があるようなので、対処しておきます。

再ログイン時にエラーになる問題の対策。

[root@ovm02 ~]# sed -i -e "171i AUTH_USER_MODEL = 'openstack_auth.User'" /usr/share/openstack-dashboard/openstack_dashboard/settings.py

オブジェクト削除でエラーになる問題の対策。

[root@ovm02 ~]# sed -i -e '800,820 s/LOG.info(/LOG.warning(u/g' /usr/lib/python2.7/site-packages/horizon/tables/actions.py

httpd を再起動しておきます。

[root@ovm02 ~]# systemctl restart httpd.service

9. NetworkManager 停止

今回の環境特有の問題かもしれませんが、VM を再起動するとうまくネットワーク設定ができなくないようなので、OVM#1 / OVM#2 両方で、NetworkManager を停止してしまいます。

[root@ovm02 ~]# systemctl disable NetworkManager.service
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
[root@ovm02 ~]# systemctl stop NetworkManager.service

10. OpenStack サービスの設定変更(追加で)

マニュアルにない分も、いくつかサービス設定を変更してみました。 

OVM#1 でのサービス無効化

Nova

[root@ovm01 ~]# systemctl disable openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-consoleauth openstack-nova-novncproxy openstack-nova-scheduler
[root@ovm01 ~]# systemctl stop openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-consoleauth openstack-nova-novncproxy openstack-nova-scheduler

Cinder

[root@ovm01 ~]# systemctl disable openstack-cinder-api openstack-cinder-scheduler openstack-cinder-backup
[root@ovm01 ~]# systemctl stop openstack-cinder-api openstack-cinder-scheduler openstack-cinder-backup

Neutron

[root@ovm01 ~]# systemctl disable neutron-openvswitch-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent
[root@ovm01 ~]# systemctl stop neutron-openvswitch-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent

OVM#1 でのサービス有効化

Nova

[root@ovm01 ~]# systemctl enable openstack-nova-compute    

OVM#2 でのサービス無効化

Neutron

[root@ovm02 ~]# systemctl disable neutron-dhcp-agent neutron-l3-agent neutron-metadata-agent neutron-openvswitch-agent
[root@ovm02 ~]# systemctl stop neutron-dhcp-agent neutron-l3-agent neutron-metadata-agent neutron-openvswitch-agent

OpenStack サービスの状態

サービスは、微妙なものもありますが下記のような状態にしました。
mysqld が起動していて「disabled on boot」なのは、mariadb に変更されたことが原因のようです。

OVM#1

[root@ovm01 ~]# openstack-status
== Nova services ==
openstack-nova-api:                     inactive  (disabled on boot)
openstack-nova-cert:                    inactive  (disabled on boot)
openstack-nova-compute:                 active
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               inactive  (disabled on boot)
openstack-nova-conductor:               inactive  (disabled on boot)
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     active
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     inactive  (disabled on boot)
neutron-l3-agent:                       failed    (disabled on boot)
neutron-metadata-agent:                 inactive  (disabled on boot)
neutron-openvswitch-agent:              failed    (disabled on boot)
== Swift services ==
openstack-swift-proxy:                  active
openstack-swift-account:                active
openstack-swift-container:              active
openstack-swift-object:                 active
== Cinder services ==
openstack-cinder-api:                   failed    (disabled on boot)
openstack-cinder-scheduler:             failed    (disabled on boot)
openstack-cinder-volume:                active
openstack-cinder-backup:                failed    (disabled on boot)
== Ceilometer services ==
openstack-ceilometer-api:               failed
openstack-ceilometer-central:           active
openstack-ceilometer-compute:           inactive  (disabled on boot)
openstack-ceilometer-collector:         active
openstack-ceilometer-alarm-notifier:    active
openstack-ceilometer-alarm-evaluator:   active
openstack-ceilometer-notification:      active
== Heat services ==
openstack-heat-api:                     active
openstack-heat-api-cfn:                 inactive  (disabled on boot)
openstack-heat-api-cloudwatch:          inactive  (disabled on boot)
openstack-heat-engine:                  active
== Sahara services ==
openstack-sahara-api:                   inactive  (disabled on boot)
== Trove services ==
openstack-trove-api:                    active
openstack-trove-taskmanager:            active
openstack-trove-conductor:              active
== Support services ==
mysqld:                                 active    (disabled on boot)
openvswitch:                            inactive  (disabled on boot)
dbus:                                   active
target:                                 active
rabbitmq-server:                        active
memcached:                              active
== Keystone users ==
Warning keystonerc not sourced
[root@ovm01 ~]#

OVM#2

[root@ovm02 ~]# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-cert:                    active
openstack-nova-compute:                 inactive  (disabled on boot)
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-conductor:               active
== Glance services ==
openstack-glance-api:                   inactive  (disabled on boot)
openstack-glance-registry:              inactive  (disabled on boot)
== Keystone service ==
openstack-keystone:                     active
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     inactive  (disabled on boot)
neutron-l3-agent:                       failed    (disabled on boot)
neutron-metadata-agent:                 inactive  (disabled on boot)
neutron-openvswitch-agent:              failed    (disabled on boot)
== Swift services ==
openstack-swift-proxy:                  active
openstack-swift-account:                active
openstack-swift-container:              active
openstack-swift-object:                 active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                inactive  (disabled on boot)
openstack-cinder-backup:                active
== Ceilometer services ==
openstack-ceilometer-api:               failed
openstack-ceilometer-central:           active
openstack-ceilometer-compute:           inactive  (disabled on boot)
openstack-ceilometer-collector:         active
openstack-ceilometer-alarm-notifier:    active
openstack-ceilometer-alarm-evaluator:   active
openstack-ceilometer-notification:      active
== Heat services ==
openstack-heat-api:                     active
openstack-heat-api-cfn:                 inactive  (disabled on boot)
openstack-heat-api-cloudwatch:          inactive  (disabled on boot)
openstack-heat-engine:                  active
== Sahara services ==
openstack-sahara-api:                   inactive  (disabled on boot)
== Trove services ==
openstack-trove-api:                    active
openstack-trove-taskmanager:            active
openstack-trove-conductor:              active
== Support services ==
mysqld:                                 active    (disabled on boot)
openvswitch:                            inactive  (disabled on boot)
dbus:                                   active
rabbitmq-server:                        active
memcached:                              active
== Keystone users ==
Warning keystonerc not sourced
[root@ovm02 ~]#

Horizon Dashboard から見た様子

Horizon Dashboard は、OVM#2 の TCP 443番ポートで提供されます。

f:id:gowatana:20160418025646p:plain

サービスタブの状態です。さりげなく右下に「REDHATVERSION」とあります。

f:id:gowatana:20160418030243p:plain

Nova のサービスです。
稼働中にしているのは赤枠部分のみです。システム情報には、デフォルトだと不要なエントリが登録されたままになっているので、今回のホスト名でフィルタしてあります。

f:id:gowatana:20160418025933p:plain

Cinder のサービスです。

f:id:gowatana:20160418030043p:plain

Neutron のエージェントはとりあえず無効にしてみました。

f:id:gowatana:20160418030116p:plain

以上。