Documentation survey

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.

1.1. 服务器配置

The command takes no mandatory parameter, but can take the new hostname if it is not the one from the container host.

In case any SSL certificate needs to be generated to match the new hostname, the SSL CA password needs to be provided. This is safely achieved using a configuration file

Procedure: Prepare the configuration file for the SSL CA password
  1. Write a config.yaml file with content like the following:

    ssl:
      password: "<THE 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

    If the new hostname is not resolvable, the command fails.

The renaming procedure also takes place during the restart of the server container. The logs can be found by running this command:

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

Be aware that this command triggers a refresh of the pillar data for all Salt clients when restarting the server container: the time it takes to run depends on the number of registered clients.

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

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

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

过程:重新配置直接管理的客户端
  1. 在每个客户端的 Salt 客户端配置文件中,指定新 Salt 主控端(SUSE Multi-Linux Manager 服务器)的名称。相应配置文件名为 /etc/venv-salt-minion/minion.d/susemanager.conf,如果您未使用 Salt 捆绑包,则文件名为 /etc/salt-minion/minion.d/susemanager.conf

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

    systemctl restart venv-salt-minion

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

    systemctl restart salt-minion

1.3. 通过应用 Highstate 传播到客户端

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

2. 重新配置代理

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

如果通过某个代理使用 PXE 引导,则必须检查该代理的配置设置。如果通过非容器化 SUSE Multi-Linux Manager Proxy 4.3 使用 PXE 引导,则需要重新配置 tftpsync

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

mgrctl exec -ti -- configure-tftpsync.sh