Commit Graph

4120 Commits

Author SHA1 Message Date
Brian Cain a457dee8b0
Set default disk to non-primary 2019-11-22 14:40:23 -08:00
Brian Cain a51e9b1fa1
Support both kinds of provider config options for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 83fea21ff1
Simplify builtin disk action 2019-11-22 14:40:23 -08:00
Brian Cain e598007237
Add provider specific disk options under provider_config hash 2019-11-22 14:40:23 -08:00
Brian Cain 6c54bf6ad9
Fix logger namespace typo 2019-11-22 14:40:23 -08:00
Brian Cain d54e870752
Add file option to disk config 2019-11-22 14:40:23 -08:00
Brian Cain 71ad0f7aba
Remove duplicate setting of disks variable 2019-11-22 14:40:23 -08:00
Brian Cain 35f113e759
Put back accidental case switching for comments on provisioner 2019-11-22 14:40:23 -08:00
Brian Cain 9c1d05113f
Update merge comment for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 93828508ec
Update config/vm with tests for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 499e39dd10
Ensure primary is true or false 2019-11-22 14:40:23 -08:00
Brian Cain cef1bd47b3
Add initial disk builtin action 2019-11-22 14:40:23 -08:00
Brian Cain a55e3d2b91
Make config.vm.disks accessible instead of internal 2019-11-22 14:40:23 -08:00
Brian Cain c18f36e516
Fix code comment typo 2019-11-22 14:40:23 -08:00
Brian Cain ad73969010
Fixup disk config parsing to allow hash and block 2019-11-22 14:40:23 -08:00
Brian Cain 7cfccb5cfd
Update variable docs for disk name 2019-11-22 14:40:23 -08:00
Brian Cain ee751ca6e1
Add disk name for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 995c4bbc60
Add validation for disk configs 2019-11-22 14:40:23 -08:00
Brian Cain a18ce4f732
Add primary config option for disk 2019-11-22 14:40:23 -08:00
Brian Cain 393ce9eb1b
Rename drives to disks to match class, and properly merge configs 2019-11-22 14:40:23 -08:00
Brian Cain 28d339eac5
Ensure block is properly passed through to add_config 2019-11-22 14:40:23 -08:00
Brian Cain ee388d8293
Ensure config is renamed to options 2019-11-22 14:40:23 -08:00
Brian Cain 34673fe5f9
Add disk class function for provider layers 2019-11-22 14:40:23 -08:00
Brian Cain 98a2d0f723
Update internal drives state to be array instead of hash 2019-11-22 14:40:23 -08:00
Brian Cain abcc334900
Add note about disk options value 2019-11-22 14:40:23 -08:00
Brian Cain 1a21782bd5
Add note about disk name 2019-11-22 14:40:23 -08:00
Brian Cain e361900d3a
Update doc string for name attribute 2019-11-22 14:40:23 -08:00
Brian Cain aa5a3ef7f7
Add initial disk management config class 2019-11-22 14:40:23 -08:00
Brian Cain e100d9cd48
Merge pull request #11205 from briancain/DOCKER-BUILDKIT-FIXUP
Enhance docker build method for the Docker provider to include buildkit output
2019-11-22 14:21:59 -08:00
Brian Cain 2901dae948
Add option for docker executor to handle stderr from results
Instead of always joining stdout and stderr, only join the two if the
caller explicitly asks for it. Otherwise, only return stdout.
2019-11-22 12:04:09 -08:00
Brian Cain fb7a9d5582
Remove trailing whitespace 2019-11-21 13:44:28 -08:00
Tomas Krizek 3519f82b24
guest/redhat: fix nfs client installation
CentOS 8+ and Fedora 30+ no longer have the alias "nfs" for "nfs-server"
systemd service.

This shouldn't break backward compatibility, since "nfs-server" service
is available on all supported redhat systems that have systemctl binary.

Fixes #10838
2019-11-21 13:11:29 -08:00
Brian Cain 4d70856b8a
Enhance docker build matching for determining built container ID
Prior to this commit, docker would look for a container ID based on
"Successfully built" string. This output does not exist if a user has
enabled the experimental feature buildkit. This commit updates the build
behavior to match against both kinds of outputs, and instead of using
`scan`, it uses MatchData and groups the container id with match group
name `:id` instead of making hard assumptions with the matches being
contained inside arrays from scan.
2019-11-19 10:59:28 -08:00
Juha Ruotsalainen 4fc8b07974
Removed the word 'done'.
There are cases, when 'done' is prefix with a duration, like `... 0.1s done`.
2019-11-19 10:02:03 -08:00
Rumpu-Jussi f3629ebd09
Buildkit-based output processed a bit differently. 2019-11-19 10:02:03 -08:00
Juha Ruotsalainen 8041d0ae78
Build quietly and capture the image hash
At least on macOS combo Catalina + Docker engine 19.03.4 + Docker desktop 2.1.0.4 + vagrant 2.2.6 the original `matches = result.scan(/Successfully built (.+)$/i)` -line fails to generate a match. With this change I can `vagrant up --provider=docker` successfully.
2019-11-19 10:02:03 -08:00
Antonio Terceiro 4fd2373753 nfs: avoid adding extra newlines to /etc/exports
StringBlockEditor already adds the necessary newlines. That extra
newline was making /etc/exports longer and longer, full of empty lines,
because StringBlockEditor doesn't know about it and does not remove it.
2019-11-17 00:33:08 -03:00
Jeff Bonhag 307123c1f2
Fixes #10753: Add reboot support for Linux guests (#11194)
This commit adds support for setting `reboot: true` while using the
shell provisioner with Linux guests.
2019-11-15 14:46:36 -05:00
Brian Cain 06799402ed
Fixup: Ensure Gem::Version.new does not receive nil value
This commit fixes an issue where Gem::Version.new could recieve a nil
value if no addtional box updates are available. For some versions of
ruby, this is actually an error case. This commit fixes that by
converting it to an integer to prevent an exception.

Issue reference: https://github.com/rubygems/rubygems/issues/2359
2019-11-14 14:51:29 -08:00
Jeff Bonhag 0e68f02dc9
Fixes #11163: Get latest version for provider (#11192)
This commit changes the behavior of `vagrant box outdated --global` so
it gets the latest version for the current machine's provider, rather
than the latest version for any provider.
2019-11-13 17:33:15 -05:00
Brian Cain 403fece5ac
Merge pull request #11184 from briancain/fixup/cleanup-cloud-publish-cmd
Fixes #11137: Fixup how cloud publish handles its arguments
2019-11-12 09:07:42 -08:00
Brian Cain 509812b8e6
Merge pull request #11175 from briancain/fixup/show-machine-name-in-hostname-validation
Fixes #11173: Show guest name in hostname error message
2019-11-07 13:21:42 -08:00
Brian Cain 145f04893c
Fixes #11137: Fixup how cloud publish handles its arguments
Prior to this commit, if a user didn't supply a box file on disk or a
box url, Vagrant would crash and display a stacktrace with an invalid
file. This commit fixes that by adding some extra handling around the
arguments supplied to the publish command.
2019-11-07 10:19:52 -08:00
Jeff Bonhag 8a69c1205c
Fixes #10170: Check for modinfo in /sbin (#11178)
Check for modinfo in /sbin if it doesn't appear on the PATH.

If it's not found on the PATH or in /sbin, the command will default back to modinfo so the user sees the error message about adding it to their PATH.
2019-11-06 16:10:24 -05:00
Brian Cain d4f83ca4a3
Merge pull request #11170 from moench-tegeder/suse_hostname_vs_getent
explicitly test the hostname we'll be setting
2019-11-05 09:30:28 -08:00
Brian Cain 0aaa2cc147
Fixes #11173: Show guest name in hostname erorr message
This commit adds the machine guest name in the hostname validation error
message so that it's easier to see which guest in a Vagrantfile has the
validation error.
2019-11-04 08:41:51 -08:00
Christoph Moench-Tegeder 6f6e58f4ae explicitly test the hostname we'll be setting
getent queries the system resolver for the hostname - but it's not
the resolver we're interested in. In fact, the hostname-to-be-set
may already exist in DNS (becuase DNS really is a nifty thing and
can do a lot of things which are not that possible with /etc/hosts
alone), in which case getent will "not fail" and vagrant will believe
the hostname had already been set.
Instead, query hostnamectl for the "static" hostname - that's the
one we will be setting, so we're ok IFF hostnamectl returns exactly
what we would be setting.
2019-11-01 15:41:04 +01:00
Brian Cain f998e535ce
Fixes #11139: Skip machines that haven't been created for snapshot save
This commit fixes the original #11027 fix, which assumed that the
hyper-v provider just wasn't properly getting a VM id when it listed
snapshots. In reality, it was just that if you invoke the
`with_target_vm` method with no arguments, it runs on the entire environment.
This meant that the capability snapshot_list attempted to be invoked on
machines that didn't exist yet, which is the original cause for why the
list_snapshot method did not recieve a vm ID. This commit fixes that by
simply skipping the machine if it does not yet exist.
2019-10-24 13:33:25 -07:00
Dan Čermák 435a32684f
Only return interfaces where addr is not nil
tunnel interfaces on Linux have addr set to nil which makes the function
list_interfaces fail with a backtrace.
2019-10-10 10:49:03 -07:00
Chris Roberts b12a23273e
Merge pull request #11108 from chrisroberts/macos-catalina
Fix NFS sharing in macOS 10.15 (based on #11105)
2019-10-10 09:20:33 -07:00