diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-10 08:44:56 -0600 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-10 07:11:33 -0800 |
commit | 20ecc2e5a5e19bdae106a5ccd8863adbde60eac6 (patch) | |
tree | c6774bec11574957b0dd6570d866c915433fff13 /lib/chef/util | |
parent | 68bab0b362c47e5a75492e57094f72ecee1171ae (diff) | |
download | chef-20ecc2e5a5e19bdae106a5ccd8863adbde60eac6.tar.gz |
dsc_script passes timeout to lcm shellout
Diffstat (limited to 'lib/chef/util')
-rw-r--r-- | lib/chef/util/dsc/local_configuration_manager.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/util/dsc/local_configuration_manager.rb b/lib/chef/util/dsc/local_configuration_manager.rb index c3149429f9..f8398341e5 100644 --- a/lib/chef/util/dsc/local_configuration_manager.rb +++ b/lib/chef/util/dsc/local_configuration_manager.rb @@ -27,14 +27,14 @@ class Chef::Util::DSC clear_execution_time end - def test_configuration(configuration_document) - status = run_configuration_cmdlet(configuration_document) + def test_configuration(configuration_document, shellout_flags) + status = run_configuration_cmdlet(configuration_document, false, shellout_flags) log_what_if_exception(status.stderr) unless status.succeeded? configuration_update_required?(status.return_value) end - def set_configuration(configuration_document) - run_configuration_cmdlet(configuration_document, true) + def set_configuration(configuration_document, shellout_flags) + run_configuration_cmdlet(configuration_document, true, shellout_flags) end def last_operation_execution_time_seconds @@ -45,7 +45,7 @@ class Chef::Util::DSC private - def run_configuration_cmdlet(configuration_document, apply_configuration = false) + def run_configuration_cmdlet(configuration_document, apply_configuration, shellout_flags) Chef::Log.debug("DSC: Calling DSC Local Config Manager to #{apply_configuration ? "set" : "test"} configuration document.") test_only_parameters = ! apply_configuration ? '-whatif; if (! $?) { exit 1 }' : '' @@ -57,9 +57,9 @@ class Chef::Util::DSC save_configuration_document(configuration_document) cmdlet = ::Chef::Util::Powershell::Cmdlet.new(@node, "#{command_code}") if apply_configuration - status = cmdlet.run! + status = cmdlet.run!({}, shellout_flags) else - status = cmdlet.run + status = cmdlet.run({}, shellout_flags) end ensure end_operation_timing |