Chef安装资源失败,服务器在安装时拒绝访问

时间:2019-01-22 15:24:15

标签: chef mount

嗨,我正在写一个厨师食谱来挂载nfs服务器,但是我一直在获取

STDERR: mount.nfs: access denied by server while mounting
Expected process to exit with [0], but received '32'

这是我写的代码:

mount node['recipe']['var_mount'] do
  device node['recipe']['var_mount_location'].to_s
  fstype 'nfs'
  options 'vers=3,intr,soft,rw,noatime'
  action [:mount, :enable]
end

1 个答案:

答案 0 :(得分:0)

我可以想到几种情况:

  1. chef-client不是以root用户身份运行,因此没有足够的权限来修改系统
  2. 当厨师客户执行您的食谱时,nfs资源(驱动器)尚未准备就绪

我会建议您以调试日志级别运行Chef-client,例如:

$ chef-client --log_level debug