From b62d3c6da8b695d113a1a5f8ade53cc891f8621e Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Mon, 16 Sep 2019 18:52:52 +0200 Subject: [PATCH] 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 726b06cdb49426719a13be3f02bcce72a697484c) --- lib/puppet/provider/openstack.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/provider/openstack.rb b/lib/puppet/provider/openstack.rb index 7397b0d1..614cb25f 100644 --- a/lib/puppet/provider/openstack.rb +++ b/lib/puppet/provider/openstack.rb @@ -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"