要将 Salt 主节点重新连接到 SaltStack Config Cloud,可以重新运行 sseapi-config join
命令并传递可选标志,以重新创建用于获取 VMware Cloud Services 控制台 (CSP) 访问令牌的 OAuth 应用程序。
要重新创建 OAuth 应用程序,请执行以下操作:
- 在 Salt 主节点的终端中,重新运行
sseapi-config join
命令,传递标志--override-oauth-app
,并将ssc-url
和csp-url
值替换为特定于区域的 URL。sseapi-config join --ssc-url <SSC URL> --csp-url <CSP URL> --override-oauth-app
区域名称 SSC URL CSP URL US https://ssc-gateway.mgmt.cloud.vmware.com https://console.cloud.vmware.com DE(德国) https://de.ssc-gateway.mgmt.cloud.vmware.com https://console.cloud.vmware.com IN(印度) https://in.ssc-gateway.mgmt.cloud.vmware.com https://console.cloud.vmware.com --override-oauth-app
标志会删除 OAuth 应用程序(如果存在)并重新创建。以下代码示例展示了 US 区域的成功响应示例。
2022-08-17 18:50:20 [INFO] SSEAPE joining SSC Cloud... v8.9.1.1 2022-08-16T15:28:12 2022-08-17 18:50:20 [INFO] Retrieving CSP auth token. 2022-08-17 18:50:21 [INFO] Deleting oauth app [Salt Master App for master id:my-salt-master] with id [i7vUcQwQ5D63eh1hxv0pJp612wBG20zDifA] and recreating it. 2022-08-17 18:50:21 [INFO] Finished with oauth app [Salt Master App for master id:my-salt-master] in org [6bh70973-b1g2-716c-6i21-i9974a6gdc85]. 2022-08-17 18:50:39 [INFO] Added service role [saltstack:master] for oauth app [Salt Master App for master id:my-salt-master]. 2022-08-17 18:50:39 [INFO] Created pillar [CSP_AUTH_TOKEN]. 2022-08-17 18:50:39 [INFO] Updated master config. Please restart master for config changes to take effect. 2022-08-17 18:50:39 [INFO] Updated master cloud.conf. 2022-08-17 18:50:39 [INFO] Validating connectivity to SaltStack Cloud instance [https://ssc-gateway.mgmt.cloud.vmware.com] 2022-08-17 18:50:39 [INFO] Successfully validated connectivity to SaltStack Cloud instance [https://ssc-gateway.mgmt.cloud.vmware.com]. Response: {'version': 'v8.9.0.5', 'vipVersion': '8.9.0'} 2022-08-17 18:50:39 [INFO] Finished SSEAPE joining SSC Cloud... v8.9.1.1 2022-08-16T15:28:12
- 重新启动 Salt 主节点服务。
systemctl restart salt-master
- 针对每个 Salt 主节点重复此过程。