SUSE Multi-Linux Manager Server 重命名查错

如果您在本地更改了 SUSE Multi-Linux Manager Server 的主机名,SUSE Multi-Linux Manager 安装将无法正常进行。这是因为尚未在数据库中做出相应更改,因而这些更改无法从您的客户端和任何代理传播出来。

1. 重命名服务器

If you need to change the hostname of the SUSE Multi-Linux Manager Server, you can do so using the mgradm server rename command. This command updates the settings in the PostgreSQL database and the internal structures of SUSE Multi-Linux Manager.

If your system uses a certificate signed by an external or third-party certificate authority, the new certificate containing the new hostname must be obtained before beginning the renaming process. To replace active certificates with your external certificates, see Replace certificates.

1.1. 服务器配置

此命令无必需参数,但如果新主机名与容器主机的主机名不一致,您可在命令中指定新主机名。

如果需要生成与新主机名匹配的 SSL 证书,则需提供 SSL CA 口令。通过配置文件传递口令是更为安全的方式。

过程:准备 SSL CA 口令配置文件
  1. Write a config.yaml file with content like the following:

    ssl:
      password: "<CA PASSWORD>"

后续步骤中将会用到该文件。

过程:重命名 SUSE Multi-Linux Manager Server
  1. 在 DNS 服务器上,本地和远程更改系统级别的服务器的网络设置。 您还需要提供用于反向名称解析的配置设置。更改网络设置的方式与重命名任何其他系统的方式相同。

  2. 重引导 SUSE Multi-Linux Manager Server 以使用新网络配置并确保主机名更改。

  3. On the container host, from the command line, execute the following command. Add -c config.yaml if you created the file to store the SSL CA password:

    mgradm server rename

    如果新主机名无法解析,此命令将会失败。

重命名操作会在服务器容器重启过程中同步进行,您可通过执行以下命令查看相关日志:

mgrctl exec -ti -- journalctl -u uyuni-update-config

请注意,重启服务器容器时,此命令会触发所有 Salt 客户端的 pillar 数据刷新。操作耗时取决于已注册客户端的数量。

1.2. 重新配置直接管理的客户端

如果通过 SUSE Multi-Linux Manager 代理管理客户端,请跳过此过程。

通过下面的过程可重新配置直接管理的客户端,确保它们知道服务器的新主机名和 IP 地址。

过程:重新配置直接管理的客户端
  1. On the every client, in the Salt client configuration file, specify the name of the new Salt master (SUSE Multi-Linux Manager Server). The filename is /etc/venv-salt-minion/minion.d/susemanager.conf or, if you do not use the Salt bundle, /etc/salt-minion/minion.d/susemanager.conf:

    master: <新主机名>
  2. 在每个客户端上重启 Salt 服务。可以运行以下命令:

    systemctl restart venv-salt-minion

    或者,如果您未使用 Salt 捆绑包,则运行:

    systemctl restart salt-minion

1.3. ClientcConnection with applying high state

最后,要将该主机名完全传播到 Salt 客户端配置,请应用 Highstate。应用 Highstate 会更新储存库 URL 中的主机名。

2. 重新配置代理

每一个代理都必须重新配置。必须将新服务器证书和密钥复制到相应代理。有关详细信息,请参见 安装 SUSE Multi-Linux Manager 代理。

If you use PXE boot through a proxy, you must check the configuration settings of the proxy. If you use PXE boot through non-containerized SUSE Multi-Linux Manager Proxy 4.3, tftpsync needs to be reconfigured.

在容器主机上执行以下命令:

mgrctl exec -ti -- configure-tftpsync.sh