Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.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
Unit testing Wagrant ssh连接超时的chef测试厨房配置_Unit Testing_Chef Infra_Vagrantfile_Test Kitchen - Fatal编程技术网

Unit testing Wagrant ssh连接超时的chef测试厨房配置

Unit testing Wagrant ssh连接超时的chef测试厨房配置,unit-testing,chef-infra,vagrantfile,test-kitchen,Unit Testing,Chef Infra,Vagrantfile,Test Kitchen,我的谷歌fu让我失望了。为了增加config.vm.boot_超时或文件中的尝试次数,我需要在我的.kitchen.yml中放入什么。我的厨房几乎总是会碰到: STDERR: Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.

我的谷歌fu让我失望了。为了增加config.vm.boot_超时或文件中的尝试次数,我需要在我的.kitchen.yml中放入什么。我的厨房几乎总是会碰到:

  STDERR: Timed out while waiting for the machine to boot. This means that
  Vagrant was unable to communicate with the guest machine within
  the configured ("config.vm.boot_timeout" value) time period.
大约再过一分钟左右,我就可以毫无问题地连接了

我已经尝试了许多我认为可能的方法,但似乎没有一种方法可以将其设置为以下所有方法:

driver:
  name: vagrant
  vm.boot_timeout: 20
  vm:
    boot_timeout: 20

driver_config:
  require_chef_omnibus: true
  vm.boot_timeout: 20
  vm:
    boot_timeout: 20

我需要做些什么才能增加该值?

这不直接支持,但您可以复制并设置

或者可能:(我忘了需要什么)


这不直接受支持,但您可以复制和设置

或者可能:(我忘了需要什么)

我补充说:

driver: name: vagrant boot_timeout: 1200 司机: 姓名:流浪汉 启动超时:1200 它似乎可以工作,Vagantfile.erb中已经存在
启动时间,可能是因为更新了版本。

我添加了:

driver: name: vagrant boot_timeout: 1200 司机: 姓名:流浪汉 启动超时:1200
它似乎可以工作,Vagantfile.erb中已经存在
启动超时
,可能是因为有一个更新的版本。

我在最近几分钟发现了这个问题:我正在那里测试它是否可以工作。启动超时不是一个选项,正如您在默认的Vagrantfile模板中所看到的,这似乎也无法修复它。在我的chefdk安装中找到/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-vagrant-0.15.0/templates/Vagrantfile.erb。我尝试将其直接修补到此文件中,但它似乎没有更新。你是说vagrantfile\u erb选项不起作用吗?如果是,请在config:subkey下尝试。我忘了是哪种情况要求这样做了。我在最后几分钟发现了这个问题:我现在正在测试它是否有效。启动超时不是一个选项,正如您在默认的Vagrantfile模板中所看到的,这似乎也无法修复它。在我的chefdk安装中找到/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/kitchen-vagrant-0.15.0/templates/Vagrantfile.erb。我尝试将其直接修补到此文件中,但它似乎没有更新。你是说vagrantfile\u erb选项不起作用吗?如果是,请在config:subkey下尝试。我忘了是哪种情况要求这样。 driver: name: vagrant boot_timeout: 1200