Commit Graph

143 Commits

Author SHA1 Message Date
Mitchell Hashimoto f5cadc93fa guests/linux: POSIX sed [GH-6104] 2015-11-19 18:35:18 -08:00
Seth Vargo 82f620ed13 Fix upstart detection and event emit 2015-11-18 16:18:32 -08:00
Seth Vargo 5f383b546c Use sudo for read_ip_address capability
Fixes #4868
2015-07-10 13:25:11 -06:00
Mitchell Hashimoto 92e6062f8d Merge pull request #5622 from aneeshusa/fix-mounting-with-inactive-upstart
Check Upstart is running before emitting upstart events.
2015-07-06 16:20:21 -06:00
Mitchell Hashimoto 262b50bc02 guests/linux: fix exception when printf is empty [GH-5846] 2015-07-05 17:14:48 -07:00
Francesco ca8923835a Use the extended password parameter, more compatible 2015-06-08 04:13:23 +01:00
Aneesh Agrawal 49ff17b9b9 Check Upstart is running before emitting upstart events.
Fixes issue #5377.
Check that Upstart is not just installed but currently actively running
before attempting to emit an event after mounting shared folders.
Only requires the binary be named upstart, not that it lives in /sbin.
2015-04-22 09:20:27 -04:00
Jeff Johnson 9d50f72df3 For SMB on Linux guests, specify the user's domain as a separate parameter to the mount command. This is more reliable than passing user@domain as the username. This is not needed for SMB on Windows guests as they expect the user@domain form.
This does not change how it is configured in the Vagrantfile.

Fixes #3620
2015-03-31 08:16:06 -07:00
Seth Vargo d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Mitchell Hashimoto 94b2a8a56b communicators/ssh: insert random key, remove insecure key 2014-10-24 09:58:18 -07:00
dch 97589636b1 Provide output on raising LinuxMountFailed 2014-10-14 18:25:13 +01:00
Mitchell Hashimoto b2b79a4ea8 guests/linux: backoff a bit on the mount timeout [GH-4403] 2014-08-29 09:47:34 -07:00
Mitchell Hashimoto b42e9aef23 guests/linux: more verbose output when shared folder mount fails
[GH-4403]
2014-08-29 08:27:48 -07:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto 34b7cace7b synced_folders/rsync: rsync__chown [GH-3810] 2014-05-17 12:01:50 -07:00
Mitchell Hashimoto c7abea2032 guests/linux: exclude symlinks from chown search [GH-3744] 2014-05-09 16:08:11 -07:00
Mitchell Hashimoto 326e8012f7 guests/*: setup rsync_pre properly 2014-05-06 18:40:55 -07:00
Mitchell Hashimoto 4ef237a642 synced_folders/rsync: mkdir before rsync 2014-05-06 13:41:37 -07:00
Jonas Stendahl 8b5869fdc5 Don't wrap the escaped password in single quotes. 2014-05-06 15:47:44 +02:00
Mitchell Hashimoto 04369b3afe guests/linux: LANG=en for ifconfig [GH-3029] 2014-05-04 17:47:16 -07:00
Nikhil Benesch 2df36892dd synced_folders/rsync: only chown when necessary [GH-3525]
Run remote rsync as root to guarantee that rsync can write to guestpath.
This obviates the need to chown the guestpath to the SSH user prior to
sync.

This brings a substantial speedup (2x on a moderately-sized shared
folder) and properly triggers filesystem notifications on only the files
changed by a given sync.
2014-04-25 15:00:12 -04:00
Mitchell Hashimoto 22d9b0eeb2 guests/linux: unmount uses rmdir instead of rm -rf to avoid catastrophe 2014-04-21 13:56:30 -07:00
Mitchell Hashimoto 19c9973a0d guests/linux: set a timeout on nc 2014-04-21 13:55:40 -07:00
Mitchell Hashimoto e578e91e3a providers/docker: implement port checker for remote machine 2014-04-21 13:55:39 -07:00
Mitchell Hashimoto 3edfe6deaf providers/docker: remove synced folders after docker rm 2014-04-21 13:55:28 -07:00
Nikhil Benesch ee5d8e2358 guests/linux: rsync chown if either user or group incorrect [GH-3485] 2014-04-15 16:55:49 -04:00
Mitchell Hashimoto 9529dd8cde guests/linux: rsync chown group if owner now set [GH-3223] 2014-04-09 11:03:24 -07:00
Mitchell Hashimoto b20ff91784 guests/linux: SMB mounts with symbol passwords work [GH-3202] 2014-04-09 10:46:56 -07:00
Mitchell Hashimoto a6725710d3 guests/linux: don't show SMB password in plaintext on error [GH-3203] 2014-04-09 10:42:39 -07:00
Andy Clarke 26e0c85488 Fix SMB shared folder mount error with password containing symbols. 2014-03-17 17:38:34 -04:00
Mitchell Hashimoto ca00ad8257 guests/linux: one more time 2014-03-13 09:48:53 -07:00
Mitchell Hashimoto 3c02caf811 guests/linux: check for proper owner [GH-3186] 2014-03-13 09:48:22 -07:00
Mitchell Hashimoto 00d73eabda guests/linux: rsync only chown if invalid user/group [GH-3186] 2014-03-13 09:47:34 -07:00
Mitchell Hashimoto a6eafd6a12 synced_folders/rsync: execute rsync_post cap if it exists [GH-3163] 2014-03-12 18:43:59 -07:00
Mitchell Hashimoto 0fe4a4af26 synced_folders/smb: basically working 2014-02-27 08:13:05 -08:00
Mitchell Hashimoto e909b91bfd guests/linux: public key insertion is more robust
contents can have newlines (or not)
2014-02-12 22:11:33 -08:00
Mitchell Hashimoto 8c85e57db1 guests/linux: proper logic on ro 2014-02-07 16:04:36 -08:00
Michael Hahn d68544a906 Ensure options[:mount_options] is defined before checking if it includes key 2014-02-06 14:06:47 -08:00
Michael Hahn 3631b250b7 Fix #2945: Reference correct options variable 2014-02-06 13:59:56 -08:00
Mitchell Hashimoto 226dbccef8 guests/linux: don't chown VB shared folders if readonly [GH-2442] 2014-02-04 16:01:14 +01:00
Mitchell Hashimoto f63ef395f1 Merge branch 'rsync_install' of https://github.com/tmatilai/vagrant into tmatilai-rsync_install
Conflicts:
	plugins/guests/freebsd/plugin.rb
	plugins/guests/netbsd/plugin.rb
	plugins/guests/openbsd/plugin.rb
2014-02-03 12:12:49 +01:00
Teemu Matilainen e634cdc824 guests: rename LinuxShellExpandFailed error to ShellExpandFailed
Make the error generic for all guests (`DarwinShellExpandFailed` didn't
even exist) and not tied to synced folder.
2014-02-02 17:26:54 -03:00
Teemu Matilainen ee2ae94c25 synced_folders/rsync: Install `rsync` on guest if needed
Add new `rsync_installed` and `rsync_install` guest capabilities
to detect and install `rsync`.

Also copy `rsync_pre` capability to all Unix guests.
2014-01-31 02:12:57 -03:00
Mitchell Hashimoto 2e3fcf576c synced_folders/rsync: allow guests to execute things before 2014-01-10 17:51:44 -08:00
Mitchell Hashimoto 91380c0650 synced_folders/nfs: automatically install NFS client if possible
If guests have the following capabilities, automatic NFS client
installation will be done:

  * nfs_client_installed - Checks if the NFS client is installed
  * nfs_client_install - Install the NFS client

Support is already in for Debian, Ubuntu, RedHat, CentOS, and Fedora
2014-01-09 16:58:20 -08:00
Mitchell Hashimoto 732a03c1c4 guests/linux: properly quote and insert public key 2014-01-08 15:12:26 -08:00
Mitchell Hashimoto b3a9e6a088 insert_public_key cap, and use that if it exists 2014-01-03 11:13:21 -08:00
Teemu Matilainen 572cdeeda9 guests/linux: Emit upstart event on VirtualBox using the expanded path 2013-12-22 08:55:59 -03:00
Teemu Matilainen 2fab268ede guests/linux: Emit upstart event `vagrant-mounted` also on NFS mounts
Complements #2502, and fixes error on VMs without upstart (like #2596).
2013-12-22 08:46:24 -03:00
Mitchell Hashimoto 489506ff83 guests/linux: up the amount of retries for NFS mounts 2013-12-18 08:38:31 -08:00
Teemu Matilainen c566465bdc Fix testing if initctl exists
If /sbin/initctl was not found, the command (`false && ...`) returned
non-zero exit code leading to Vagrant throwing an exception.
2013-12-06 18:17:41 -03:00
Mitchell Hashimoto d9dc2d6cfd guests/linux: --no-wait on emit [GH-2564] 2013-12-03 12:14:10 -08:00
Mitchell Hashimoto 195f0d9639 guests/linux: emit upstart event for vagrant mounted if avail [GH-2502] 2013-11-25 11:31:15 -08:00
Mitchell Hashimoto 23bdbd6fd8 synced_folders/nfs: specify nfs_udp false to disable udp [GH-2304] 2013-11-23 13:43:48 -08:00
Mitchell Hashimoto 88425f0146 Merge pull request #2390 from borgstrom/master
core: allow owner & group to be supplied as an Integer and skip lookup
2013-11-23 11:46:50 -08:00
Mitchell Hashimoto dcf57bd2cc guests/linux: increase sleep time btween NFS mount retries 2013-11-23 11:35:27 -08:00
Evan Borgstrom ebb85b57fd Allow owner & group to be supplied as an Integer and skip lookup 2013-10-17 22:40:21 -04:00
Pete Michaud e65ac705b4 fixed missing backtick 2013-09-21 21:41:06 -05:00
Mitchell Hashimoto 4d03a7359e guests/linux: fail after a number of attempts 2013-09-20 17:52:36 -07:00
Mitchell Hashimoto 62e357ffcd guests/linux: only successful mount if exit status 0 2013-09-20 17:50:29 -07:00
Mitchell Hashimoto b9801f44a0 guests/linux: try `id -g` to determine group as well [GH-2197] 2013-09-16 20:51:09 -07:00
Mitchell Hashimoto e5b35d1c83 core: support "mount_options" for arbitrary mount options [GH-1029] 2013-09-01 12:25:21 -07:00
Mitchell Hashimoto 826c8a884d Merge pull request #1801 from davegudge/patch-1
core: use getent to get group ID
2013-08-28 17:02:46 -07:00
Mitchell Hashimoto c0404e3f63 Mount NFS with UDP protocol by default [GH-1706] 2013-07-23 17:36:48 -05:00
Mitchell Hashimoto f4c36795df Properly determine shared folder path even if .profile echos [GH-1677] 2013-07-19 23:53:53 -04:00
Mitchell Hashimoto 608bc7c0eb NFS exports with single quotes now work properly [GH-1166] 2013-07-16 16:23:33 -07:00
Mitchell Hashimoto 5e48391b05 read_ip_address linux cap only reads ip of first device [GH-1799] 2013-06-09 13:27:08 -07:00
Dave Gudge 699ac0ac96 Defining the group of a shared folder
Symtom: The group ID for groups that are not backed by a user account (e.g. admin) cannot be obtained from the id command.

Consequence: The shared folder group can only be set to a group where by a user account of the same name exists.

Solution: Correcting the method to define the group ID by looking up the group ID via the group name.
2013-06-06 13:11:49 +02:00
Mitchell Hashimoto d76f964470 Linux guest detection 2013-04-10 13:39:21 -07:00
Mitchell Hashimoto 66ff86fda5 Auto-detect policy server IP for CFEngine 2013-04-08 15:30:41 -07:00
Mitchell Hashimoto 22f3ea6606 Remove the linux config, not used anyways 2013-04-03 23:50:12 -07:00
Mitchell Hashimoto 067f431ee9 Better debugging on searching for capabilities 2013-04-03 23:46:39 -07:00
Mitchell Hashimoto 2f232e0175 Halt and mount NFS are caps 2013-04-03 23:33:20 -07:00
Mitchell Hashimoto 63f28a9011 Nicer error messages for new linux caps 2013-04-03 23:14:24 -07:00
Mitchell Hashimoto 2a542dab02 Switch configure_networks to capabilities system 2013-04-03 23:08:33 -07:00
Mitchell Hashimoto 28d3f274d8 First capability for linux 2013-04-03 23:01:43 -07:00
Mitchell Hashimoto 52f3847b0a Laying the foundation for the new guest plugin 2013-04-03 21:47:57 -07:00
Mitchell Hashimoto 665450614a Don't error if machine shuts down really quickly on graceful [GH-1505] 2013-03-28 15:52:00 -07:00
Elan Ruusamäe bd8a24e945 add basic pld linux support
PLD Linux Distribution: https://www.pld-linux.org/
2013-03-24 19:38:56 +02:00
Conor Horan-Kates 761a64f899 adding ability to detect solaris operating system to linux guest plugin 2013-03-11 08:42:06 -07:00
Mitchell Hashimoto 0eef208d2d Relax retry constrains on mounting NFS 2013-02-08 16:18:48 -08:00
Mitchell Hashimoto 6afb4326fa Move NFS to a built-in middleware 2013-02-08 15:34:04 -08:00
Mitchell Hashimoto 0fc7cf7f02 Guest `halt` implementations no longer depend on machine state 2013-01-22 12:09:35 -08:00
Jordi Llonch 793ad58e96 fedora 17 & 18 support 2013-01-07 05:23:07 +11:00
Mitchell Hashimoto 1d2beff649 Guests to V2 2012-11-06 21:14:45 -08:00
Mitchell Hashimoto b328e95045 Make puppet provisioner work with latest machine changes.
Specifically it was still reference env[:vm] which is now
`env[:machine]`.
2012-08-20 12:13:04 -07:00
Mitchell Hashimoto aad022a626 Switch all `channel` to `communicate` in the linux guest 2012-08-12 19:03:31 -07:00
Mitchell Hashimoto 0eddda3552 Halt works with new machine.
This required some modifications to the linux guest implementation. And
the other guests will have to be modified as well. This is because
`channel` is now `communicate`.
2012-08-12 18:54:52 -07:00
Mitchell Hashimoto 53d8c28c8e Move guests to Vagrant.plugin("1", :guest) 2012-06-26 16:28:49 -07:00
Mitchell Hashimoto 590f648fc0 Built-in plugins use Vagrant.plugin("1", :config) 2012-06-26 16:02:44 -07:00
Mitchell Hashimoto 41bc8e7454 Move Config::V1::Base to Vagrant::Plugin::V1::Config 2012-06-24 17:06:11 -07:00
Mitchell Hashimoto 459d82689e Get rid of autoload use in Guests
I don't use `activated` here because I'd really like to optimize
performance as much as possible, and loading files from disk is
generally slow. So instead of using `activated` I load the file at the
last possible moment which is when the exact class is being requested.

I don't think many people will do this outside of the core, and I'm not
too concerned.
2012-05-23 15:57:43 -07:00
Mitchell Hashimoto 9956e6d012 Better directory structure for plugins 2012-04-20 16:53:01 -07:00