Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix idempotence in subsequent Chef runs #79

Merged
merged 4 commits into from
Apr 30, 2019
Merged

Conversation

tknerr
Copy link
Owner

@tknerr tknerr commented Apr 30, 2019

Running the update-vm.sh multiple times kept reinstalling Vagrant, Vagrant plugins as well as VirtualBox even though it was already installed.

These were 3 different issues which broke idempotence:

  1. the vagrant dpkg_package installation was missing a guard expression to check if the desired vagrant version is already installed
  2. the install_vagrant_plugin(name, version) helper function actually had a guard, but it was no longer working due to a change in the output of vagrant plugin list that we parse
  3. the VirtualBox installation was not idempotent because we introduced a version conflict by installing libcurl3 at the beginning of the Chef, run where the VirtualBox installation later on needs (and thus reinstalled) libcurl4

This PR fixes the issues above, so that we have proper idempotence restored and subsequent Chef runs no longer reinstall the already installed stuff

tknerr added 4 commits May 1, 2019 00:14
…e in combination with 'action :nothing' in dpkg_package[vagrant] (which does not work if the remote file comes from vagrant-cachier cache, which is the reason we are not using it)
@tknerr tknerr merged commit 92eb776 into master Apr 30, 2019
@tknerr tknerr deleted the bugfix/fix-idempotence branch April 30, 2019 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant