Bug #58770

Vagrantfile not compatible to current vagrant version

Added by Sebastian Fischer over 5 years ago. Updated over 2 years ago.

Must have
Target version:
Start date:
Due date:
% Done:



After running vagrant up the first time the installation starts and gives some warnings

==> t3o-web: [Tue, 13 May 2014 14:43:49 +0200] WARN: Setting attributes without specifying a precedence is deprecated and will be
==> t3o-web: removed in Chef 11.0. To set attributes at normal precedence, change code like:
==> t3o-web: `node["key"] = "value"` # Not this
==> t3o-web: to:
==> t3o-web: `node.set["key"] = "value"` # This
==> t3o-web: 
==> t3o-web: Called from:
==> t3o-web:   /usr/lib/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/node/attribute.rb:449:in `method_missing'
==> t3o-web:   /usr/lib/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/node.rb:346:in `send'
==> t3o-web:   /usr/lib/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/node.rb:346:in `method_missing'

Then after the installation finished i called t3org.dev and got an 403 forbidden as result.
To check what is missing i used the ssh

sebastian@sftpt520-linux:~/workdir/boxes/Typo3Org [master] $ vagrant ssh
Due to changes in vagrant the Vagrantfile is not compatible to all aspects of vagrant anymore.

There were warnings and/or errors while loading your Vagrantfile
for the machine 't3o-web'.

Your Vagrantfile was written for an earlier version of Vagrant,
and while Vagrant does the best it can to remain backwards
compatible, there are some cases where things have changed
significantly enough to warrant a message. These messages are
shown below.

* `config.vm.customize` calls are VirtualBox-specific. If you're
using any other provider, you'll have to use config.vm.provider in a
v2 configuration block.

The connection opened and i had a look into the www path

vagrant@t3o-web:~$ ls -la /var/www/vhosts/t3org.dev/www/
total 8
drwxrwxrwx 1 vagrant vagrant 4096 May 13 12:30 .
drwxrwxrwx 1 vagrant vagrant 4096 May 13 12:30 ..


#1 Updated by Sebastian Fischer over 5 years ago

Oh i forgot some informations:
Vagrant 1.6.2
Virtualbox 4.3.10_Ubuntu

To get the installation running i modified the Vagrantfile a little

# -*- mode: ruby -*-
# vi: set ft=ruby :

features = {
    # enable if provisioning fails
    :chef_verbose => false,
    # boot VirtualBox with GUI - usually just an annoying window, but helpful if you can't connect via SSH
    :gui => false,
    # run a SOLR server
    :solr => false,
    # enable Rabbit MQ
    :rabbit_mq => false,
    # if enabled, set the "t3org.dev" hostname to in your local /etc/hosts
    :varnish => false,
    # is configured for PHPSTORM on port 9000 by default - check below to change the settings
    :xdebug => false,

# if you don't want to develop on the TER FE or Solr search itself, feel free to comment out the t3o-solr part
vms = {
  "t3o-web" => {
    :hostname  => "t3org.dev",
    :ipaddress => "",
    :run_list => "role[typo3],role[t3org]",
    :cpus => "2",
    :memory => "1024" 

if features[:rabbit_mq]
  vms["t3o-web"][:run_list] += ',role[t3org-rabbitmq]'

if features[:solr]
  vms["t3o-solr"] = {
    :hostname  => "t3o-solr.dev",
    :ipaddress => "",
    :run_list => "role[solr]",
    :cpus => "1",
    :memory => "1024" 

if features[:varnish]
    vms["t3o-proxy"] = {
        :hostname  => "t3-proxy.dev",
        :ipaddress => "",
        :run_list => "role[t3org-proxy]",
        :cpus => "1",
        :memory => "512" 

if defined?(::VagrantPlugins::LibrarianChef)
    # it will just use its own cookbooks and not the one we added in this repo
    raise 'The vagrant plugin "vagrant-librarian-chef" is known to cause issues during provision. Please uninstall it by running "vagrant plugin uninstall vagrant-librarian-chef".'

Vagrant.configure("1") do |global_config|
  vms.each_pair do |name, options|
    global_config.vm.define name do |config|
      ipaddress = options[:ipaddress]

      config.ssh.max_tries = 100

      config.vm.box = "squeeze" 
      config.vm.box_url = "http://st-g.de/fileadmin/downloads/2012-10/squeeze.box" 
      config.vm.boot_mode = features[:gui] ? :gui : :headless
      config.vm.network :hostonly, ipaddress
      config.vm.host_name = name

      if Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new('1.2')
        share_folder_options = {:create => true, :nfs => false, :mount_options => ['dmode=777','fmode=777']}
        share_folder_options = {:create => true, :nfs => false, :extra => 'dmode=777,fmode=777'}
      if name == "t3o-web" 
        if (RUBY_PLATFORM =~ /mingw32/).nil?
          # May only run on non-Windows systems (symlinks won't work otherwise)
          config.vm.share_folder "package", "/var/cache/t3org.dev", "./tmp/package", share_folder_options
          config.vm.share_folder "web", "/var/www/vhosts/t3org.dev", "./web", share_folder_options

      config.vm.share_folder "apt-cache", "/var/cache/apt/archives", "./tmp/apt", {:create => true}

      # set auto_update to false, if do NOT want to check the correct additions
      # version when booting this machine
      #config.vbguest.auto_update = false

      config.vm.provision :chef_solo do |chef|
        chef.cookbooks_path  = ["cookbooks", "site-cookbooks"]
        chef.roles_path      = ["roles"]
        chef.data_bags_path  = ["data_bags"]

        chef.json = {}

        unless ENV['REINSTALL'].nil?
            chef.json.merge! ({
                :t3org => {
                    :forceInstall => true,

        # uncomment to enable xdebug
        if features[:xdebug]
            chef.json.merge! ({
                :dev => {
                    :xdebug => {
                        :remote => {
                             :enable => true,
                             :host => '',
                             :port => 9000,
                             :idekey => 'PHPSTORM',

        # Turn on verbose Chef logging if necessary
        chef.log_level      = features[:chef_verbose] ? :debug : :info

        # List the recipies you are going to work on/need.
        run_list = []
        run_list << "role[debian]" 
        run_list << "role[base]" 
        run_list << "role[vagrant]" 
        run_list << ENV['CHEF_RUN_LIST'].split(",") if ENV.has_key?('CHEF_RUN_LIST')
        chef.run_list = [run_list, options[:run_list].split(",")].flatten


      config.vm.customize [
        "modifyvm", :id,
        "--name", name,
        "--memory", options[:memory] || "1024",
        "--cpus", options[:cpus] || "1" 
      config.vm.customize [
        "setextradata", :id,
        "VBoxInternal2/SharedFoldersEnableSymlinksCreate/package", "1" 
      config.vm.customize [
        "setextradata", :id,
        "VBoxInternal2/SharedFoldersEnableSymlinksCreate/web", "1" 

#2 Updated by Christian Zenker over 5 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Sebastian Fischer

Hi Sebastian.

The connection opened and i had a look into the www path

This seems to happen sometimes. Try reinstalling the website (see Readme.md "REINSTALL=true vagrant provision") an remove the shared folder if you don't use it.

The other things are just warnings, that I did not fix yet to keep compatibility with vagrant <= 1.2.

#3 Updated by Sebastian Fischer over 5 years ago

I can confirm that the reprovisioning worked. But the warnings... meh are a little anoying. But better those instead of not working at all.

Thanks Christian for reply.

#4 Updated by Christian Zenker over 5 years ago

  • Status changed from Needs Feedback to Accepted

Sebastian Fischer wrote:

But the warnings... meh are a little anoying.

I'm happy to accept pull requests. ;)

#5 Updated by Thomas Löffler almost 4 years ago

I think this issue is resolved. Got no problems with the current vagrant box and latest vagrant version.

#6 Updated by Steffen Gebert over 2 years ago

  • Status changed from Accepted to Rejected

#7 Updated by Steffen Gebert over 2 years ago

  • Status changed from Rejected to Closed

Also available in: Atom PDF