This captures exceptions encountered in states that run file.get_managed
or file.manage_file, suppressing the traceback and instead returning a
False result for the state, with a meaningful error message.
Under the hood, all '_in' requisites are changed to extends of their
corresponding type. For example, a require_in for a given state extends
the target of the require_in with a 'require' requisite, pointing back
at the state where the require_in was located.
When these extends are reconciled, only the ID declarations are examined
to see if there is a state matching the requisite's target, meaning that
these '_in' requisites cannot point to a 'name' override in the same way
as their counterparts are able to. For more info, see
https://github.com/saltstack/salt/issues/9061.
This commit modifies the extend reconciliation behavior. If there is no
ID declaration matching the requisite's target, then
salt.state.find_name() is used to search the high data for an ID
declaration with a 'name' param matching the requisite target. If a
match is found, then the extend is reconciled against that matching ID.
If no match is found, then the requisite is not found the appropriate
error is returned.
This will cause the cli to not display the message that AWS is
not configured. This was confusing to users who are using the EC2
driver and get a message that AWS was not configured.
This commit catches MinionError exceptions encountered when caching
remote binary packages. In execution functions, a CLI-friendly
CommandExecutionError is raised. In states, a False outcome is returned
with a meaningful error message.
Seemed like this would be sort of mundane but there are actually a few dragons here.
Unit testing turned up the fact that we make use of methods in psutil that are deprecated!
When I originally wrote the mutli-arch support in this module, it was
done hastily and was not well-designed. For instance, it assumes that
x86_64 is the only arch for which packages from other arches are
supported. It additionally doesn't support ARM architectures at all,
making it completely useless on those devices.
This commit handles architectures in a more elegant way. Salt will now
only refer to the package with the arch appended if the arch both A) is
not 'noarch', and B) does not match the 'osarch' grain. This cleans
up the logic significantly, as well as enabling proper support for ARM
devices (though this is still untested).