2

试图降级chef-client。附上一个片段:

$ chef-client --version
Chef: 11.10.4

$ curl -sL https://www.opscode.com/chef/install.sh | sudo bash -s -- -v 11.8.2
Downloading Chef 11.8.2 for ubuntu...
downloading https://www.opscode.com/chef/metadata?v=11.8.2&prerelease=false&nightlies=false&p=ubuntu&pv=12.04&m=x86_64
  to file /tmp/install.sh.1934/metadata.txt
trying wget...
url https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.8.2-1.ubuntu.12.04_amd64.deb
md5 3d3b3662830a44eeec71aadc098a4018
sha256  a5b00a24e68e29a01c7ab9de5cdaf0cc9fd1c889599ad9af70293e5b4de8615c
downloaded metadata file looks valid...
downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.8.2-1.ubuntu.12.04_amd64.deb
  to file /tmp/install.sh.1934/chef_11.8.2-1.ubuntu.12.04_amd64.deb
trying wget...
Comparing checksum with sha256sum...
Installing Chef 11.8.2
installing with dpkg...
(Reading database ... 107385 files and directories currently installed.)
Preparing to replace chef 11.8.2-1.ubuntu.12.04 (using .../chef_11.8.2-1.ubuntu.12.04_amd64.deb) ...
Unpacking replacement chef ...
Setting up chef (11.8.2-1.ubuntu.12.04) ...
Thank you for installing Chef!

$ chef-client --version
Chef: 11.10.4

也尝试重新启动机器,虽然结果是一样的。

可以做吗,可以chef-client降级吗?

4

2 回答 2

0

如果您11.10.4从综合安装程序安装了 Chef(install.sh 与旧版本使用的基本相同),那么您基本上得到了一个独立的 Chef inside 安装/opt/chef

删除该目录将删除旧安装的几乎所有痕迹。剩下/usr/bin的就是删除. chef-client_ _ _ _chef-solochef-shellknifeohai/usr/bin/opt/chef

之后,使用上述技术重新安装,您应该安装了正确的版本。

于 2014-04-27T13:00:35.510 回答
0

只需从https://downloads.chef.io/chef安装特定版本(取决于您的操作系统)。我通过简单的安装成功地降级了我的厨师客户端版本,覆盖了较新的版本。

于 2019-12-23T15:49:54.683 回答