-
Notifications
You must be signed in to change notification settings - Fork 107
Make Salt install/configure Vagrant 1.8 compatible #180
Make Salt install/configure Vagrant 1.8 compatible #180
Conversation
The original Vagrantfile was meant to be used with Vagrant 1.7.4, but required 2 patches to Vagrant for proper functionality, which I had submitted as pull requests. Vagrant has since released a new version, 1.8.0, which has updates the Salt provisioner. PR status: - [One PR](hashicorp/vagrant#6474) was merged - [Another PR](hashicorp/vagrant#6473) was not The second PR was rejected "in favor" of [a third PR](hashicorp/vagrant#6073) which simply removed the config_dir option entirely instead of using sudo to be able to write in a priveleged directory. [An unrelated PR](https://github.com/mitchellh/vagrant/pull/6382/files) removed a second option we had been using: install_command. These changes in Vagrant were due to incompabilities with the official Salt bootstrap script, so this commit brings the install_salt script's behavior closer to that of the official Salt bootstrap script as well. Namely, it can now copy over configuration files as part of installation, using the same flags as the official script. The configure_salt script is now used just to setup the salt and pillar roots on Travis (this is accomplished via shared folders in Vagrant), hence the renaming. With this commit and the new Vagrant version, the included Vagrantfile now works with a vanilla Vagrant 1.8.0 install, no patching needed.
bfa9f49
to
49faf66
Compare
This is fairly low-importance, but help from someone with a Mac would be appreciated on this one! I have no idea how OS X got '.travis/install_salt' for $OS_NAME (via $1) in the error message... |
The title is misleading - I thought you were trying to undo the changes we waited so long to get. This is great though, thanks! The build seems to be failing, because you've changed the parameter order of the call to .travis/install_salt -F -c .travis -- "osx"` # kill the command before it does anything |
@johntron Sorry, I didn't realize the title was misleading. Feel free to change it to something that's more understandable. Looking at your comments now. |
Sorry, I should have mentioned this before - it looks like the problem is that getopt behaves differently on OS X vs. Linux. (The builds are successful on Linux hosts but not OS X hosts). I couldn't figure out how it differs from the man page, so I'd appreciate help from someone with a Mac that can investigate what getopt is doing. I changed the parameter order to mirror the flags used by the official script, and am using getopt to parse them portably. Here's the behavior I want, which is what's happening on Linux: the arg-parsing loop should call |
What's especially confusing to me is that ".travis/install_salt" should be |
OS X does not use GNU getopt but rather BSD getopt, which is less friendly. Update getopt usage and argument parsing to be portable.
49faf66
to
36b881e
Compare
I figured out how to make this work on OS X! It would be super helpful for me if this and #181 got merged in (ideally this one first). |
Also, a note to myself: when this gets merged, remember to update the installation notes on the wiki. |
@bors-servo r+ |
1 similar comment
@bors-servo r+ |
@bors-servo: r=larsbergstrom |
📌 Commit 36b881e has been approved by |
…r=larsbergstrom Make Salt install/configure Vagrant 1.8 compatible The original Vagrantfile was meant to be used with Vagrant 1.7.4, but required 2 patches to Vagrant for proper functionality, which I had submitted as pull requests. Vagrant has since released a new version, 1.8.0, which has updates the Salt provisioner. PR status: - [One PR](hashicorp/vagrant#6474) was merged - [Another PR](hashicorp/vagrant#6473) was not The second PR was rejected "in favor" of [a third PR](hashicorp/vagrant#6073) which simply removed the config_dir option entirely instead of using sudo to be able to write in a privileged directory. [An unrelated PR](https://github.com/mitchellh/vagrant/pull/6382/files) removed a second option we had been using: install_command. These changes in Vagrant were due to incompatibilities with the official Salt bootstrap script, so this commit brings the install_salt script's behavior closer to that of the official Salt bootstrap script as well. Namely, it can now copy over configuration files as part of installation, using the same flags as the official script. The configure_salt script is now used just to setup the salt and pillar roots on Travis (this is accomplished via shared folders in Vagrant), hence the renaming. With this commit and the new Vagrant version, the included Vagrantfile now works with a vanilla Vagrant 1.8.0 install, no patching needed. Note to self: update the wiki when this is merged! <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/180) <!-- Reviewable:end -->
☀️ Test successful - travis |
Thanks for getting this merged! Being able to use Vagrant locally is really useful in testing out changes (and prevents a ton of amended commits over small typos caught by Travis 😄). I've updated the Vagrant instructions on the wiki; it turns out the installation instructions don't need changing after all. |
Thank you for all your help! Sorry this one lingered a bit in the review queue. |
The original Vagrantfile was meant to be used with Vagrant 1.7.4, but
required 2 patches to Vagrant for proper functionality, which I had
submitted as pull requests. Vagrant has since released a new version,
1.8.0, which has updates the Salt provisioner. PR status:
The second PR was rejected "in favor" of a third PR which simply
removed the config_dir option entirely instead of using sudo to be able
to write in a privileged directory. An unrelated PR removed a second
option we had been using: install_command.
These changes in Vagrant were due to incompatibilities with the official
Salt bootstrap script, so this commit brings the install_salt script's
behavior closer to that of the official Salt bootstrap script as well.
Namely, it can now copy over configuration files as part of
installation, using the same flags as the official script.
The configure_salt script is now used just to setup the salt and pillar
roots on Travis (this is accomplished via shared folders in Vagrant),
hence the renaming.
With this commit and the new Vagrant version, the included Vagrantfile
now works with a vanilla Vagrant 1.8.0 install, no patching needed.
Note to self: update the wiki when this is merged!