将木偶客户迁移到新的木偶主人(旧木偶主服务器不见了,只使用备份)

我的木偶主服务器有硬件故障,我已经恢复到另一个盒子。 但是这个盒子有不同的硬件和主机名。

如果我将现有的/ etc / puppet目录恢复到新服务器,puppetmaster将不会以下列错误启动;

# puppetmasterd --debug --verbose Could not prepare for execution: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key

那么,我需要采取什么步骤让新的木偶大师开始,并使用旧的木偶生成一个新的木偶大师证书。

傀儡客户也会使用旧的CA生成的服务器证书实际报告不同的傀儡服务器?

puppetmaster将所有证书,密钥和ca信息存储在文件夹/var/lib/puppet/ssl 。 从我的testing中,你应该能够:

  1. 停止puppetmasterd
  2. 删除文件/var/lib/puppet/ssl/certs/hostname.pem
  3. 开始puppetmasterd

这应该使用旧的私钥和CA生成新的服务器端SSL证书,并保留已经签名的现有客户端证书。