Restore defaults for combine and failonfail in openstack command

[1] added "override_locale: false" to the openstack command executions,
to respect the current locale. This had an unintended side effect,
since it changed the values for failonfail and combine to false in
that same execution, as described in [2].

We should ensure that openstack command failures are respected, so
this commit restores that behavior.

[1] - https://review.opendev.org/640997
[2] - https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/execution.rb#L139-L143

Change-Id: I55e587ea5c83338ae989aa56f1f379079eb02e08
(cherry picked from commit 726b06cdb4)
This commit is contained in:
Javier Pena 2019-09-16 18:52:52 +02:00 committed by Javier Peña
parent 3719ca1465
commit cf84ba5d79
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class Puppet::Provider::Openstack < Puppet::Provider
begin
action = args[1]
Timeout.timeout(command_timeout(action)) do
execute([command(:openstack_command)] + args, override_locale: false)
execute([command(:openstack_command)] + args, override_locale: false, failonfail: true, combine: true)
end
rescue Timeout::Error
raise Puppet::ExecutionFailure, "Command: 'openstack #{args.inspect}' has been running for more than #{command_timeout(action)} seconds"