jayjanssen / vagrant-percona-deprecated

Vagrant setup to launch Percona Server or PXC on virtualbox or AWS
19 stars 14 forks source link

vagrant 1.7.1 fails with "* The following settings shouldn't exist: id" #10

Closed michaelcoburn closed 9 years ago

michaelcoburn commented 9 years ago

vagrant up on 1.7.1 is failing with * The following settings shouldn't exist: id:

Michaels-MacBook-Pro:vagrant-percona michael$ ./create-new-env.sh ps_sysbench ../ps
Creating 'ps_sysbench' Environment
Michaels-MacBook-Pro:vagrant-percona michael$ cd ../ps
Michaels-MacBook-Pro:ps michael$ vagrant up
Setting `id` on a provisioner is deprecated. Please use the
new syntax of `config.vm.provision "name", type: "type"
where "name" is the replacement for `id`. This will be
fully removed in Vagrant 1.8.
Setting `id` on a provisioner is deprecated. Please use the
new syntax of `config.vm.provision "name", type: "type"
where "name" is the replacement for `id`. This will be
fully removed in Vagrant 1.8.
Bringing machine 'ps1' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The following settings shouldn't exist: id

puppet provisioner:
* The following settings shouldn't exist: id
* The following settings shouldn't exist: id

I am able to clear the error by making the following edit to lib/vagrant-common.rb however this is probably a valuable directive and it seems to break puppet a little bit later in the execution, but at least it doesn't stop vagrant from running.

Michaels-MacBook-Pro:ps michael$ diff lib/vagrant-common.rb ../vagrant-percona/lib/vagrant-common.rb 
115c115
<   config.vm.provision "puppet", preserve_order: true do |puppet|

---
>   config.vm.provision "puppet", id: manifest_file, preserve_order: true do |puppet|

Now it runs properly (truncated):

Michaels-MacBook-Pro:ps michael$ vagrant up
Skipping AWS because of missing/non-readable /Users/michael/.aws_secrets file.  Read https://github.com/jayjanssen/vagrant-percona/blob/master/README.md#aws-setup for more information about setting up AWS.
Bringing machine 'ps1' up with 'virtualbox' provider...
==> ps1: Importing base box 'perconajayj/centos-x86_64'...
... more successful vagrant output ...

Here are my versions:

Michaels-MacBook-Pro:ps michael$ date
Sun Dec 28 07:31:48 CST 2014
Michaels-MacBook-Pro:ps michael$ vagrant version
Installed Version: 1.7.1
Latest Version: 1.7.1
You're running an up-to-date version of Vagrant!
Michaels-MacBook-Pro:ps michael$ vagrant plugin list
vagrant-aws (0.6.0)
vagrant-hostmanager (1.5.0)
vagrant-share (1.1.4, system)
michaelcoburn commented 9 years ago

Well, while my fix advances the provisioning process, it does break puppet. Specifically, variables defined in Vagrantfile such as $datadir_dev get ignored by puppet as if they don't exist:

==> master: Notice: /Stage[main]/Mysql::Datadir/Exec[datadir_dev_noop]/returns: sh: /sys/block//queue/scheduler: No such file or directory
==> master: Error: echo 'noop' > /sys/block//queue/scheduler returned 1 instead of one of [0]
==> master: Error: /Stage[main]/Mysql::Datadir/Exec[datadir_dev_noop]/returns: change from notrun to 0 failed: echo 'noop' > /sys/block//queue/scheduler returned 1 instead of one of [0]

Someone with more vagrant-percona / ruby-fu than myself is needed to debug the correct setting to use instead of id: manifest_file.

grypyrg commented 9 years ago

Next to a new vagrant, the Centos version was updated to 7, which includes new ways of dealing with settings and new puppet versions as well.

For me everything is kind of broken atm. as well.

I have not yet had any time to fix this.

jayjanssen commented 9 years ago

Fixed in https://github.com/jayjanssen/vagrant-percona/commit/c81d22a140225e66935db410eed3b06e6a7bdfd0

I had this patch already, just hadn't committed/pushed it. This will likely break vagrant < 1.7