2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PowerVCのクライアント証明書を更新してみた

2
Posted at

はじめに

PowerVC(IBM Power Virtualization Center)環境で、Cinderサービスが起動直後から数分でダウン状態になるという事象が発生しました。調査を進めると、RabbitMQ(メッセージブローカー)との接続に使用しているクライアント証明書の有効期限切れが原因であることが判明しました。

本記事では、その調査・特定・証明書更新の手順を記録します。

環境

項目 内容
PowerVCサーバー RHEL 8.x
RabbitMQ バージョン 3.10.8
ストレージ IBM FlashSystem 5015

1. 事象の確認

openstack volume service list でCinderサービスの状態を確認すると、全サービスが down になっていました。

[root@powervc ~]# openstack volume service list
+------------------+--------------+------+---------+-------+----------------------------+
| Binary           | Host         | Zone | Status  | State | Updated At                 |
+------------------+--------------+------+---------+-------+----------------------------+
| cinder-scheduler | powervc      | nova | enabled | down  | 2026-08-17T06:50:08.000000 |
| cinder-conductor | powervc      | nova | enabled | down  | 2026-08-17T06:50:10.000000 |
| cinder-health    | powervc      | nova | enabled | down  | 2026-08-17T07:02:19.000000 |
| cinder-volume    | storage_host | nova | enabled | down  | 2026-08-17T06:50:10.000000 |
+------------------+--------------+------+---------+-------+----------------------------+

powervc-services status では全サービスが active (running) と表示されており、一見正常に見えます。しかし、openstack CLI からはサービスが死んでいる状態です。


2. ログ調査

2-1. Cinderボリュームサービスのログを確認

[root@powervc ~]# tail -100 /var/log/cinder/volume-<storage_host>.log

次のエラーが大量に出力されていました。

ERROR oslo.messaging._drivers.impl_rabbit [-] \
  Connection failed: [SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] sslv3 alert certificate expired \
  (_ssl.c:1129) (retrying in 32.0 seconds): \
  ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] sslv3 alert certificate expired (_ssl.c:1129)

CinderがRabbitMQへ接続しようとするたびに SSLV3_ALERT_CERTIFICATE_EXPIRED エラーが発生しています。

2-2. RabbitMQのログを確認

[root@powervc ~]# grep -i "certificate\|expired\|ssl\|tls" \
  /var/log/rabbitmq/rabbit@powervc.log | tail -20
[notice] TLS server: In state certify at ssl_handshake.erl:2081 \
  generated SERVER ALERT: Fatal - Certificate Expired

サーバー(RabbitMQ)側でも Certificate Expired というFatalアラートが記録されていました。クライアント証明書の期限切れであることが確定です。


3. 証明書の状態確認

3-1. RabbitMQのSSL設定を確認

[root@powervc ~]# grep -A20 ssl_options /etc/rabbitmq/rabbitmq.config
  {ssl_options, [
   {versions, ['tlsv1.2']},
   {cacertfile, "/etc/pki/messages/ca/cacert.pem"},
   {certfile, "/etc/pki/messages/server/cert.pem"},
   {keyfile, "/etc/pki/messages/server/private/key.pem"},
   {verify, verify_peer},   {fail_if_no_peer_cert, true},
   {ciphers,["ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384"]}]}
 ]}
].

fail_if_no_peer_cert, true となっており、クライアント証明書の提示が必須で、かつ検証が必要な設定(mutual TLS)です。

3-2. Cinderが使用するクライアント証明書のパスを特定

[root@powervc ~]# grep -n "ssl" /etc/cinder/cinder-<storage_host>.conf
...
ssl = True
ssl_ca_file = /etc/pki/messages/ca/cacert.pem
ssl_cert_file = /etc/pki/messages/pvcservices/cert.pem
ssl_key_file = /etc/pki/messages/pvcservices/private/key.pem

3-3. 証明書の有効期限を確認

[root@powervc ~]# openssl x509 \
  -in /etc/pki/messages/pvcservices/cert.pem \
  -noout -dates
notBefore=May  1 03:51:44 2024 GMT
notAfter=Aug  4 03:51:44 2026 GMT

有効期限:2026年8月4日 → 作業日(2026年8月17日)時点ではすでに期限切れでした。

3-4. 証明書のSubjectとIssuerを確認

[root@powervc ~]# openssl x509 \
  -in /etc/pki/messages/pvcservices/cert.pem \
  -noout -subject -issuer
subject=CN = PowerVC Messaging Client
issuer=CN = PowerVC messaging CA

この証明書は PowerVC Messaging CA が署名したクライアント証明書であることが確認できました。CA証明書とサーバー証明書はまだ期限内です。

[root@powervc ~]# openssl x509 -in /etc/pki/messages/server/cert.pem -noout -dates
notBefore=Apr 20 03:26:24 2026 GMT
notAfter=Jul 23 03:26:24 2028 GMT

4. 証明書の更新手順

PowerVCにはMessaging CAの設定ファイルが /etc/pki/messages/ca/openssl.conf に用意されています。これを利用して証明書を更新します。

4-1. 既存ファイルをバックアップ

[root@powervc ~]# mkdir -p /root/backup_messages_$(date +%Y%m%d)
[root@powervc ~]# cp -pr /etc/pki/messages/pvcservices \
       /root/backup_messages_$(date +%Y%m%d)

4-2. 新しい秘密鍵を生成

[root@powervc ~]# openssl genrsa \
  -out /etc/pki/messages/pvcservices/private/key.pem \
  2048
Generating RSA private key, 2048 bit long modulus (2 primes)
.......+++++
....+++++
e is 65537 (0x010001)

4-3. CSR(証明書署名要求)を作成

[root@powervc ~]# openssl req \
  -new \
  -key /etc/pki/messages/pvcservices/private/key.pem \
  -out /tmp/pvcservices.csr \
  -subj "/CN=PowerVC Messaging Client"

4-4. PowerVC Messaging CAで署名して新しい証明書を発行

[root@powervc ~]# openssl ca \
  -batch \
  -config /etc/pki/messages/ca/openssl.conf \
  -extensions client_ext \
  -in /tmp/pvcservices.csr \
  -out /etc/pki/messages/pvcservices/cert.pem
Using configuration from /etc/pki/messages/ca/openssl.conf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :ASN.1 12:'PowerVC Messaging Client'
Certificate is to be certified until Nov 19 10:21:20 2028 GMT (825 days)

Write out database with 1 new entries
Data Base Updated

4-5. 新しい証明書の有効期限を確認

[root@powervc ~]# openssl x509 \
  -in /etc/pki/messages/pvcservices/cert.pem \
  -noout -dates
notBefore=Aug 17 10:21:20 2026 GMT
notAfter=Nov 19 10:21:20 2028 GMT

有効期限:2028年11月19日 まで延長されました(825日間)。

4-6. 証明書と秘密鍵のペアが一致しているか確認

証明書と秘密鍵のモジュラスのmd5が一致していることを確認します。

[root@powervc ~]# openssl x509 -noout -modulus \
  -in /etc/pki/messages/pvcservices/cert.pem | md5sum
f682338d13656dbd3ae76ff836847c64  -

[root@powervc ~]# openssl rsa -noout -modulus \
  -in /etc/pki/messages/pvcservices/private/key.pem | md5sum
f682338d13656dbd3ae76ff836847c64  -

両方のmd5が一致しているので、証明書と秘密鍵は正しいペアです。


5. PowerVCサービスの再起動

[root@powervc ~]# powervc-services restart
Stopping clerk services...
Stopping validator services...
Stopping panko services...
Stopping gnocchi services...
Stopping swift services...
Stopping placement services...
Stopping ui-server services...
Stopping bumblebee services...
Stopping health services...
Stopping ceilometer services...
Stopping nova services...
Stopping neutron services...
Stopping ego services...
Stopping cinder services...
Stopping glance services...
Stopping rabbitmq services...
Stopping httpd services...
Stopping db services...
Starting db services...
Starting httpd services...
Starting rabbitmq services...
Starting glance services...
Starting cinder services...
...(中略)...
Starting clerk services...

全サービスが正常に再起動しました。


6. 復旧確認

再起動後、openstack volume list を実行してボリューム情報が取得できることを確認しました。

[root@powervc ~]# openstack volume list
+--------------------------------------+-----------------------------+-----------+------+
| ID                                   | Name                        | Status    | Size |
+--------------------------------------+-----------------------------+-----------+------+
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | <volume_name>               | in-use    |   20 |
| ...                                  | ...                         | ...       |  ... |
+--------------------------------------+-----------------------------+-----------+------+

証明書更新前に creating 状態のまま止まっていたボリュームが deleting や正常な状態に遷移し始めたことも確認できました。


まとめ

項目 内容
原因 RabbitMQ接続用クライアント証明書の有効期限切れ
対象ファイル /etc/pki/messages/pvcservices/cert.pem
旧期限 2024年5月1日 〜 2026年8月4日
新期限 2026年8月17日 〜 2028年11月19日
使用CA /etc/pki/messages/ca/openssl.conf(PowerVC Messaging CA)

ポイント

  • PowerVCのRabbitMQ通信はTLS(TLSv1.2)で暗号化され、クライアント証明書の認証(mutual TLS)が必須です
  • Cinderサービスはプロセスとして動いていても、RabbitMQ接続が失敗するとOpenStack的には down と見なされます
  • powervc-services status は各サービスのプロセス稼働状態を確認するものであり、OpenStackレベルの機能稼働状態は openstack volume service list など各コマンドで別途確認する必要があります
  • CA証明書・サーバー証明書・クライアント証明書はそれぞれ別々に有効期限管理が必要です
  • 証明書の有効期限は定期的に監視する仕組みを整えておくことを推奨します

関連ファイル構成

/etc/pki/messages/
├── ca/
│   ├── cacert.pem          # CA証明書
│   ├── openssl.conf        # CA設定ファイル(証明書発行に使用)
│   ├── private/cakey.pem   # CA秘密鍵
│   └── ...
├── server/
│   ├── cert.pem            # RabbitMQサーバー証明書
│   └── private/key.pem     # サーバー秘密鍵
└── pvcservices/
    ├── cert.pem            # ★クライアント証明書(今回更新対象)
    └── private/key.pem     # クライアント秘密鍵
2
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?