PowerFlex:如何通过 RESTAPI 在网关上添加和批准 MDM 证书

Summary: 替换或添加 MDM 节点时,使用以下 RestAPI 过程将证书添加到网关密钥库

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

以下是下面提供的命令中使用的首字母缩略词,用于添加 MDM 证书。请根据您的环境更换它们。

<mdm-password> — 用于登录到 Scaleio
的 MDM 密码Gateway-ip> — 用于通过 restapi 令牌连接的网关 IP — 您在步骤 1 中收到的令牌 hostname — 替换为主机名(确保每个 MDM 有不同的主机名)hostname_mentioned /etc/hosts 中 - /etc/hosts 中提到的 MDM 主机名<<>

<>
<>

以下步骤包含示例供您参考,其中 192.168.2.126 是网关,Node1 是需要向网关添加 MDM 证书的 MDM 节点之一。
您可以从已安装 curl 并连接到网关的任何主机运行此命令。
不需要
重新启动网关守护程序。您可以通过下面的步骤 5 中提供的命令检查网关密钥库中的可用 MDM 证书。

步骤 1) 获取令牌

# curl -k --basic -u admin:<mdm-password> https://<Gateway-ip>/api/gatewayLogin 

eg:# curl -k --basic -u admin:hagsjfs https://xx.yy.uu.ii/api/gatewayLogin 
"YWRtaW46MTYxMjM4NTI5NDgyODo2YmRiOGFhNGQxNzk2NWY1OWJmZmE1NDU1MWU2MjlkMw"
 

步骤 2) 确保在网关 (IM) 服务器上的 /etc/hosts 中添加 MDM IP 地址和主机名。

步骤3)从上述步骤中,需要使用您收到的令牌。获取需要添加的 MDM 的证书:

# curl -k -u foo:<token> https://<Gateway-ip>/api/getHostCertificate/Mdm?host=<hostname_mentioned_in_/etc/hosts> > /tmp/mdmcert_<hostname>

eg:curl -k -u foo:YWRtaW46MTYxMjM4NTI5NDgyODo2YmRiOGFhNGQxNzk2NWY1OWJmZmE1NDU1MWU2MjlkMw https://xx.yy.uu.ii/api/getHostCertificate/Mdm?host=Node1 > /tmp/Node1.crt
 


步骤 4) 将证书安装到网关密钥库中

# curl -k -u foo:<token> --form "file=@/tmp/mdmcert_<hostname>" https://<Gateway-ip>/api/trustHostCertificate/Mdm


eg:# curl -k -u foo:YWRtaW46MTYxMjM4NTI5NDgyODo2YmRiOGFhNGQxNzk2NWY1OWJmZmE1NDU1MWU2MjlkMw --form "file=@/tmp/Node1.crt" https://xx.yy.uu.ii/api/trustHostCertificate/Mdm
 


步骤5)确保看到证书。在您看到的别名中,应引用 CN 名称,该名称对于每个节点都应该是唯一的。需要从网关运行以下命令。

# /usr/bin/keytool -list -keystore /opt/emc/scaleio/gateway/webapps/ROOT/WEB-INF/classes/certificates/truststore.jks  -storepass changeit| grep mdm -A1 

eg: 
# /usr/bin/keytool -list -keystore /opt/emc/scaleio/gateway/webapps/ROOT/WEB-INF/classes/certificates/truststore.jks  -storepass changeit| grep mdm -A1
ou=asd, o=emc, c=us, st=massachusetts, l=hopkinton, cn=node1, givenname=mdm, Feb 3, 2021, trustedCertEntry,
Certificate fingerprint (SHA1): C6:99:F2:8C:82:4A:25:44:36:AF:90:51:43:B9:27:98:7C:9D:F1:6C
 


步骤 6) 重复相同的过程,以将 MDM 证书添加到网关密钥库,以防丢失。

步骤 7) 从所有 MDM 节点添加 MDM 证书后,重新启动网关守护程序

# service scaleio-gateway restart
 

Additional Information

当网关密钥库上的证书更改或缺失时,我们会在网关网页浏览器上看到以下错误 -

“主 MDM 的证书未经批准。单击此处查看证书详情”


当 MDM 证书未添加到网关密钥库时,Openstack 命令也可能会失败。

网关(通过网页浏览器)将始终与主 MDM 连接以进行身份验证。如果网关(网页浏览器)记录证书错误,这意味着主 MDM 上的证书已更改,需要添加到网关密钥库。
网关不会检查辅助 MDM 证书,除非我们切换到它的 MDM 群集。

将 MDM 证书添加到网关密钥库的其他方法 —

1) 将 MDM 群集切换到已替换证书或网关密钥库上缺少证书的 MDM 节点。
登录到网关网页浏览器,单击“Maintain”选项卡,然后选择“Retrieve System Topology”。您将看到以下屏幕,您可以在其中选择“单击此处”,并在确保 CN 名称不同后批准 MDM 证书。
此过程要求切换 MDM 群集。




2) 将 MDM 证书传输到网关节点,然后使用 Keytool 命令将这些证书合并到网关密钥库中。添加来自所有 MDM 节点的证书后,您需要重新启动网关守护程序。

Affected Products

PowerFlex Software, VxFlex Product Family

Products

PowerFlex rack, VxFlex Ready Nodes, PowerFlex Appliance, VxFlex Product Family
Article Properties
Article Number: 000182990
Article Type: How To
Last Modified: 11 Nov 2025
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.