On RHEL-like systems with major version >= 10, the current Ansible installation logic incorrectly parses the version from rpm -E %dist. This is because the current inline sed command that only extracts the first character of the version string—so for version 10, it extracts only 1, resulting in an incorrect download URL.
Currently, during the box add action env[:architecture] gets passed down to add_direct, however, there is no architecture in env, the correct arch which is set in Vagrantfile is box_architecture, this PR changes the action to pass down the correct parameter.
Closes: #13698, #13697
When importing a box that was built with more resources than is
available on the current system, import would fail. If the memory
and/or cpu values are set in the Vagrantfile configuration, provide
them when importing the guest. This allows the values to be modified
prior to registering the new guest preventing a resource unavailability
error.
Fixes#12180
Result from import may be received in an array. Detect if the result
is an array and extract the first result. Otherwise, if the result
is not a string, force an error.
Check for the oscdimg executable on both the PATH and known installation
location. When not found, provider a user friendly error message about
the missing executable and a helper link on where it can be found.
This includes a couple modifications to the cloud-init behavior.
First, the cloud-init wait action will now write a sentinel file
after successfully waiting for cloud-init. This results in subsequent
boots of the machine to skip executing the cloud-init wait command
as cloud-init is only executed on the initial boot.
Second, the cloud-init setup action will check for the sentinel file
written by the cloud-init wait action, and if detected it will skip
the cloud-init setup. When creating the ISO for cloud-init, a second
sentinel file will be used to log the path of the generated ISO
file. If the file exists, the ISO generation process will be skipped.
Adds missing comma in the constant definition and add test coverage
for when no configuration file is available to validate acceptable
addresses within defined constant values.
This adjusts the failure detection and errors raised when a box
cannot be added. New errors are added for when a requested provider
on a box does not support an architecture, and for when the no
providers on a box support an architecture. When box supports
an architecture but not with the requested provider, a list of
supported providers will be returned in the error message. If
a version constraint is requested and cannot be satisfied due
to provider and architecture filtering, the list of valid versions
will be provided.
Small change to the version list in the error output: the list
has been reversed so the most recent versions are listed first.
Include network display name within the output of the
`#read_host_only_interfaces` driver method. When matching
the private network name, use the `#read_host_only_interfaces`
method and not the `#read_host_only_networks` method which
is darwin specific. Backport the `display_name` inclusion
to old driver versions for consistent behavior.
Fixes#13655
Adds a communicator which does not provide communication to the
guest machine. All methods for the communicator are simply stubbed
with a successful result. This allows a guest to be configured
with the `:none` communicator and Vagrant to properly `up` it.
This currently lacks any user notification or guards within
configuration to verify guest configuration does not rely on
the communicator. It is wrapped as experimental to allow early
access to the basic functionality without making it generally
available.
Prefer to use the pwsh executable over the powershell executable
as the pwsh exectuable will be faster loading than the powershell
executable. If the pwsh executable is not found, the powershell
executable will be used instead. The preference can be overridden
using the VAGRANT_PREFERRED_POWERSHELL environment variable.
If only one provider is available for the architecture, it is
selected, but when actually selecting it the architecture
constraint was not included. Depending on the order of the provider
list, the wrong value would be chosen.
The `nofail` option results in failures being improperly suppressed
resulting in a successful run with a failed mount. Removing this
option so mounting failures will properly fail the process.
Remove customized require behaviors and modify the bin executable
to check for missing tools that Vagrant expects to exist when
running outside of an installer.
Updates the alpine guest network configuration for public network
entry with `use_dhcp_assigned_default_route` to use the `udhcpc`
command instead of the `dhclient` command which is not included.
Adds two new options to the SSH connect configuration: `connect_retries`
and `connect_retry_delay`. Provides user configurable values used when
establishing the SSH connection. Previous behavior would retry generally
by the default value without a pause between attempts. Updated behavior
will retry the number of times set within the config (unless value is
provided directly to connect call) and each retry will pause based on
the delay value set in the config (unless value is provided directly
to the connect call).
Adds suppport for configuring networking on amazonlinux when
network devices are handled by networkd. When not handled by
networkd, falls back to using the redhat capability.
Recent versions of RHEL based guests have updated network configuration.
Detect the correct location of the network configuration files, and
configure the guest based on the detected location.
Fixes#13616
Ruby 3.2 introduced a new error, `IO:TimeoutError`, for blocking
operations. Formerly, this case would return `Errno::ETIMEDOUT`. Catch
the new error while waiting for the communicator so that the retries can
be correctly attempted.
https://bugs.ruby-lang.org/issues/18630
When a request to check an outdated box (or update a box), add explicit
architecture compatibility check in addition to ensuring the version is
newer than before.
The architecture compatibility checks allow boxes that were marked as an
"unknown" architecture to see new "unknown" architectures as viable
update options, if an architecture specific provider is not available.
In the scenario that the existing version/provider has an explicit
architecture defined, a new version/provider with an "unknown"
architecture is not considered compatible.
This architecture check can be bypassed by explicitly setting
`config.vm.box_architecture = nil` in the Vagrantfile.
This removes the gem activation from the startup and adds a
helper for properly activating gems based on the defined
runtime constraints of the vagrant specification at loading
time.