在SLES 11上安装puppet-agent时出错

时间:2015-11-09 13:13:11

标签: puppet suse puppet-enterprise sles

我正在评估Puppet Enterprise 2015.2,在我尝试在SLES 11盒子上安装代理之前没有任何问题。

我已按照上述程序:

1 - 在PE控制台上向PE主组添加了类pe_repo :: platform :: sles_11_x86_64

2 - 从客户处执行卷曲:

curl -k https://myserver:8140/packages/current/install.bash | sudo bash

命令日志:

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14657  100 14657    0     0   117k      0 --:--:-- --:--:-- --:--:-- 4771k
Removing repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' has been removed.
Adding repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' successfully added
Enabled: Yes
Autorefresh: No
URI: https://myserver:8140/packages/2015.2.1/sles-11-x86_64?ssl_verify=no

Retrieving repository 'puppet-enterprise' metadata [done]
Building repository 'puppet-enterprise' cache [done]
Specified repositories have been refreshed.
**Unknown option '--from'**
Loading repository data...
Reading installed packages...
**'puppet-agent' not found.**
/tmp/tmp.SVlCxPXa7e: line 91: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
[main]
/tmp/tmp.SVlCxPXa7e: line 100: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 113: /opt/puppetlabs/puppet/bin/facter: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 113: /opt/puppetlabs/puppet/bin/ruby: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 113: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 122: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 123: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 127: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
Error running install script /tmp/tmp.SVlCxPXa7e

关于脚本行217的第一个注释:

zypper --non-interactive dist-upgrade --from puppet-enterprise

--from并未被视为有效参数。也许正确的是' -r'?

第二个注意事项:脚本没有安装puppet-agent所以我试图安装它,将文件puppet-agent-1.2.5-1.sles11.x86_64.rpm推送到客户端,之后在puppet-agent中运行zypper

通过这种解决方法,我能够安装代理,然后我再次运行脚本并遇到了libfacter的问题:

curl -k https://myserver:8140/packages/current/install.bash | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14657  100 14657    0     0   153k      0 --:--:-- --:--:-- --:--:-- 13.9M
Removing repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' has been removed.
Adding repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' successfully added
Enabled: Yes
Autorefresh: No
URI: https://myserver:8140/packages/2015.2.1/sles-11-x86_64?ssl_verify=no

Retrieving repository 'puppet-enterprise' metadata [done]
Building repository 'puppet-enterprise' cache [done]
Specified repositories have been refreshed.
**Unknown option '--from'**
Loading repository data...
Reading installed packages...
**'puppet-agent' is already installed.**
Resolving package dependencies...
Nothing to do.
**libfacter was not found. Please make sure it was installed to the expected location.
libfacter was not found. Please make sure it was installed to the expected location.
libfacter was not found. Please make sure it was installed to the expected location.
libfacter was not found. Please make sure it was installed to the expected location.**
Error running install script /tmp/tmp.GDlmNNh07V

编辑1 :它似乎只发生在SLES 11 SP1上。我已经在SLES 11 SP3上测试了它的工作情况。

1 个答案:

答案 0 :(得分:1)

不幸的是,libfacter was not found. Please make sure it was installed to the expected location.错误消息是假的。对我来说,真正的问题是我将我的LC_NAME环境变量设置为一个在木偶机器上不可用的语言环境。运行unset LC_NAME后,木偶开始工作。 (我知道这很奇怪,但我可以可靠地重现它。)

首先尝试unset LC_NAME,如果这不能帮助我运行strace -e file -f puppet,那么是帮助我解决问题的原因。