Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/392.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Attributes 故障设置节点[';主厨客户端';][';间隔';]_Attributes_Chef Infra - Fatal编程技术网

Attributes 故障设置节点[';主厨客户端';][';间隔';]

Attributes 故障设置节点[';主厨客户端';][';间隔';],attributes,chef-infra,Attributes,Chef Infra,我已经搜索了很多地方,但没有找到答案,我怀疑我遗漏了一些基本或基本的东西(可能两者都遗漏了) 我正在使用chef client::windows\u服务配方,试图设置时间间隔,但似乎无法解决问题 我在角色层面上尝试过: { "defaults": { "chef_client": { "interval":15 } }, "overrides":{ } } { "chef_client": { "interval":25 },

我已经搜索了很多地方,但没有找到答案,我怀疑我遗漏了一些基本或基本的东西(可能两者都遗漏了)

我正在使用
chef client::windows\u服务
配方,试图设置时间间隔,但似乎无法解决问题

我在角色层面上尝试过:

{
  "defaults": {
    "chef_client": {
      "interval":15
    }
  },
  "overrides":{
  }
} 
{
  "chef_client": {
    "interval":25
  },
  "tags":[]
} 
在节点级别,具有:

{
  "defaults": {
    "chef_client": {
      "interval":15
    }
  },
  "overrides":{
  }
} 
{
  "chef_client": {
    "interval":25
  },
  "tags":[]
} 

但是节点上的间隔仍然是1800(默认值)

该间隔在chef客户端配方中设置为默认级别。你需要覆盖它。使用

overrides['chef_client']['interval'] = 900


更改为900,因为您确实不想每15秒运行一次Chef客户端。我想你的意思是15分钟。

什么版本的windows?我认为这实际上是一个bug。在较新的Chef客户端版本中,不包括winsw配方。winsw配方是设置间隔和服务的地方。windows 7。sethvargo,谢谢你的提示,我试试看!