Commit Graph

915 Commits

Author SHA1 Message Date
Chris Roberts f2c146d6d7
Merge pull request #10387 from chrisroberts/e-winrm-elevated
Prepend computer name to user when created scheduled tasks
2018-11-09 16:26:03 -08:00
Chris Roberts c8f431cf44 Prepend computer name to user when created scheduled tasks
When running a shell provisioner elevated with winrm a scheduled
task is created to bypass permissions issues. If the name of the
computer has changed this may no longer work. To prevent errors
this PR updates the implementation to fetch the computer name
and prepends it to the username before creating the task.
2018-11-08 14:21:20 -08:00
Chris Roberts d8bbc5ce09 Add support for specifying the default NIC type used for guest adapters
Provides support for defining the NIC type used for any guest adapter
which does not define an adapter type. This is defaulted to "virtio".
2018-11-07 15:53:46 -08:00
Brian Cain bcb6bf8acd
Merge pull request #10347 from briancain/add-timeout-for-ssh-info-hyperv
Fixes #10229: Add proper reboot capability for Windows guests
2018-11-06 09:25:36 -08:00
Brian Cain d2b7da065f
Add test for WinRMNotReady exceptions for ready? method 2018-11-05 14:14:50 -08:00
Brian Cain 0188d409d4
Add test for windows reboot cap 2018-11-02 16:34:57 -07:00
Brian Cain 142a6898bc
Add reboot cap for windows
This commit introduces a proper reboot cap for Windows guests. Once it
initiates a reboot on the guest, it calls out to the wait_for_reboot cap
to block on until the guest is finished rebooting.
2018-11-02 15:25:57 -07:00
Mikhail Zholobov d9d081199c
action/network: Validate IP settings, show human-readable error 2018-11-02 22:29:19 +01:00
Brian Cain 54c8ebc31a
Fixes #10229: Add timeout for changing hostname on windows
Prior to this commit, if Windows was slow to reboot, Vagrant would fail
to find the right IP address to upload the wait_for_reboot script to.
This commit fixes this race condition by adding a timeout to ensure that
Vagrant can retry. It also properly catches an exception in the winrm
ready? method for checking if a guest is properly ready for
communications.
2018-11-02 09:23:00 -07:00
Brian Cain 6051f3598e
Fixes #10224: Allow validation of config while ignoring provider
This commit adds a new flag to the `vagrant validate` command which
allows users to completely ignore the provider block of a config file.
This is useful for when you are running `vagrant validate` in CI and
don't want to install a valid provider to check the syntax of your
Vagratnfile. When the flag is invoked, a warning will be displayed
saying that the provider block will be ignored and not validated.
2018-10-30 13:37:22 -07:00
Brian Cain 580bcaebb0
Merge pull request #10311 from briancain/DOCKER-VM-FOLDER-MOUNT
Deterministic host VM synced folder location for Docker provider
2018-10-24 16:19:41 -07:00
Brian Cain a1bb7b837a
Use semicolon over ampersand to separate commands 2018-10-24 15:27:33 -07:00
Brian Cain e8c6916ebc
Restart each interface if systemd-networkd or networkmanager is not used
This commit is a workaround due to how older debian and ubuntu systems
fail to properly restart networking. Instead of relying on the init
scripts or ifup/down tools to restart each interface, this commit
instead restarts each interface individually
2018-10-24 11:34:38 -07:00
Brian Cain 1761e65f26
Fixes #9763 #10300: Fall back on ifdown/ifup tools for network restart
This commit adds some additional logic that falls back to using the
ifdown/ifup tools to restart networking. On Ubuntu 14.04, the init
script was designed to always fail to restart newtorking, so it needs
to use the ifdown/up tools instead. This commit will use the networking
init script as a last resort to restart networking, assuming other
commands haven't broken networking already.

https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1301015
2018-10-23 14:47:12 -07:00
Brian Cain 7c06950e43
Ensure true or false for automount option 2018-10-23 09:00:55 -07:00
Brian Cain 6d0dfb2690
Fixes #10016: Add `automount` flag if specified with synced_folder
This commit adds a new option to virtualbox synced_folders called
`automount`, where if set to true, will supply the `--automount` flag to
virtualbox.
2018-10-22 15:45:32 -07:00
Chris Roberts 8562daf85e Prevent overly verbose output from SSH communicator
If the type of error changes on retry the messages will effectively
spam the user display with alternating messages. Log each message
sent and only re-display each message once within 10 seconds.
2018-10-19 15:18:03 -07:00
Brian Cain 65651178cd
Fixes #9591: Allow for 'default' smb_username if set
Prior to this commit, Vagrant would prompt for smb username and password
every time, even if only smb_username was defined. This commit changes
that by allowing a "default" username from the Vagrantfile, with the
option of overriding it.
2018-10-19 13:26:18 -07:00
Brian Cain e54c9b22ef
Merge pull request #10301 from briancain/debian-fixup-hostname-change
Fixes #9763, #10300: Split out how hostname is set with Debian hosts
2018-10-18 08:57:29 -07:00
Brian Cain 94bb50fa7e
Add test for syncing folders with docker provider 2018-10-17 14:14:27 -07:00
Brian Cain 0c5d55e69c
Fixes #9763, #10300: Split out how hostname is set with Debian hosts
Prior to this commit, the hostname was set with one big bash script and
attempted to determine what tools are available. This commit changes
that by splitting out that tool check on the Vagrant side of things with
the GuestInspection class, and adds back restarting networking to get a
DHCP lease with the change rather than using `dhclient`. This pattern
matches how hostnames are set in the redhat capability.
2018-10-16 12:00:25 -07:00
Brian Cain 42c01f241c
Mark password as sensitive in logs 2018-10-12 09:07:12 -07:00
Brian Cain e8115a4389
Update based on second round of feedback 2018-10-12 09:07:12 -07:00
Brian Cain d8ec19faa8
Fixup: Update vagrant cloud command PR with feedback 2018-10-12 09:07:12 -07:00
Brian Cain 3c45acc35f
Continue if entity already exists with publish command 2018-10-12 09:07:12 -07:00
Brian Cain 83bd592e30
Introduce curl helper and uploader classes
This commit introduces a new uploader class for uploading files and
splits up some commonly used functionality between it and the downloader
class into a curl helper library.
2018-10-12 09:07:10 -07:00
Brian Cain e70b871660
Introduce `cloud` command
This commit adds a new command to Vagrant called `cloud`. It handles any
and all interactions with the external service Vagrant Cloud.
2018-10-12 09:06:00 -07:00
Brian Cain cb0bd89ae1
Fixes #10289: Create proper tmp dir for ControlPath
Prior to this commit, when creating the ControlPath tmp dir for
socket path, Vagrant would simply rely on `rand(1000)` for making unique
dirs for rsyncing files which could result in collisions. This commit
updates that be properly using `Dir.mktmpdir` with a `vagrant-rsync-`
prefix.
2018-10-11 09:51:03 -07:00
Chris Roberts 93c2f0f497
Merge pull request #10263 from chrisroberts/e-winrm-extensions
Add winrm and upload commands
2018-10-09 14:42:54 -07:00
Chris Roberts 412290828b Fix trailing quotes in source path 2018-10-08 14:18:30 -07:00
Brian Cain 5daa25db80
Merge pull request #10267 from briancain/ruby-trigger-option
Fixes #9840: Introduce `ruby` option for trigger
2018-10-08 09:02:17 -07:00
Brian Cain f4d618eb58
Fixes #9840: Introduce `ruby` option for trigger
This commit introduces a new option to the core trigger feature: `ruby`.
It can be defined to run ruby code when the trigger is configured to
fire. If you give the ruby block an env and machine argument, the
defined ruby code can use those variables internally.
2018-10-05 12:53:41 -07:00
Chris Roberts 904a712838 Provide correct RDP information within configuration information
Dynamically generate RDP information when applicable via provider
if supported. When no RDP port is provided ignore RDP in config
and omit from output.
2018-10-04 14:41:10 -07:00
Chris Roberts 48d358adcb Add winrm and upload commands 2018-10-04 13:26:41 -07:00
Chris Roberts 648e0ddeaa Explicitly define driver version used for tests 2018-10-01 11:51:14 -07:00
Chris Roberts 85dc0ebec9 Allow automatic mac address assignment with virtuabox provider 2018-10-01 11:05:28 -07:00
Brian Cain 5f56f0c8b1
Merge pull request #10223 from chrisroberts/e-rhel-nmsysd
Update restart logic in redhat change_host_name cap
2018-09-25 13:53:41 -07:00
Brian Cain 58ebd52f99
Add abort option to core triggers
This commit adds a new option `abort`, which when configured, will exit
the Vagrant process completely. If set to `true`, it will exit cleanly
with exit code 0. Otherwise, the exit code can be configured.
2018-09-25 09:40:36 -07:00
Chris Roberts 8fd05fe3c1 Use `command -v` for checks in all inspection helpers. Fix stubs in tests. 2018-09-21 09:19:40 -07:00
Chris Roberts bc217d5e57 Update redhat change host name capability tests for systemd/NetworkManger updates 2018-09-20 16:46:45 -07:00
shotop a12b09b098 add specs around network restart logic 2018-09-20 15:28:37 -07:00
Joe Doss 86ab4533b1 Fix the test to check for systemctl restart NetworkManager.service too. 2018-09-20 15:28:37 -07:00
Brian Cain a4d5ee6ac1
Merge pull request #10215 from briancain/FIX-SALT-PILLAR
Salt pillar configuration on Windows guests
2018-09-20 09:17:32 -07:00
Oleksiy Protas de6a1794c7
Config, validation and test 2018-09-19 10:24:09 -07:00
Brian Cain c3c7ad4ea2
Merge pull request #10218 from briancain/fix-env-vars-puppet-windows
Fixes #8315: Properly set env variables for puppet provisioner
2018-09-19 09:04:01 -07:00
Brian Cain 5ebb548be9
Add test for SMB mount_shared_folder function
This commit ensures that the command that adds the smb username and
password properly quotes the password given by the user.
2018-09-18 13:38:57 -07:00
Brian Cain 06b3268b6f
Fixes #8315: Properly set env variables for puppet provisioner
Prior to this commit, the puppet provisioner would not properly set its
environment variables, if any were configured in the Vagrantfile. This
commit separates those properly with semicolons when calling out to
puppet apply.
2018-09-18 10:09:01 -07:00
Brian Cain 96a00ad692
Include test for get_pillar salt function 2018-09-17 14:32:17 -07:00
Maxim Kostrikin d06cd2f94b
Hardened proc disallow systemd detection
If you have a vagrant box with proc mounted with
proc    /proc    proc    defaults,hidepid=2     0     0
ps output will be limited to owned process
sudo should extend output
2018-09-10 18:13:58 +07:00
Brian Cain 4f42da15de
Merge pull request #10171 from eigengrau/default-template
vagrant init: Support VAGRANT_DEFAULT_TEMPLATE
2018-09-07 11:17:46 -07:00