diff --git a/resources/pool.rb b/resources/pool.rb index df278915..a2034cfc 100644 --- a/resources/pool.rb +++ b/resources/pool.rb @@ -276,8 +276,12 @@ def configure end if new_resource.no_managed_code - converge_if_changed :runtime_version do + Chef::Log.warn("ran into no managed runtime #{new_resource.runtime_version} | #{current_resource.runtime_version}") + if new_resource.runtime_version != current_resource.runtime_version + # temporary fix for issue with converge_if_changed should be able to be removed when we get to chef 14 + # converge_if_changed :runtime_version do cmd << configure_application_pool('managedRuntimeVersion:') + Chef::Log.warn("ran into no managed runtime #{cmd}") end else converge_if_changed :runtime_version do diff --git a/test/cookbooks/test/recipes/pool.rb b/test/cookbooks/test/recipes/pool.rb index d9655c80..2d6fcbd9 100644 --- a/test/cookbooks/test/recipes/pool.rb +++ b/test/cookbooks/test/recipes/pool.rb @@ -40,6 +40,12 @@ action [:add, :config, :stop] end +iis_pool 'test_no_managed_code' do + no_managed_code false + pipeline_mode :Integrated + action [:add, :config, :start] +end + iis_pool 'testapppool' do thirty_two_bit false runtime_version '4.0' @@ -53,6 +59,12 @@ action [:add, :config] end +iis_pool 'test_no_managed_code' do + no_managed_code true + pipeline_mode :Classic + action [:add, :config, :start] +end + iis_pool 'passwordwithentityapppool' do thirty_two_bit false runtime_version '4.0' diff --git a/test/integration/pool/controls/pool_spec.rb b/test/integration/pool/controls/pool_spec.rb index 375bf425..b2fd7e21 100644 --- a/test/integration/pool/controls/pool_spec.rb +++ b/test/integration/pool/controls/pool_spec.rb @@ -59,6 +59,13 @@ its('identity_type') { should eq 'NetworkService' } end +describe iis_pool('test_no_managed_code') do + it { should exist } + it { should be_running } + its('managed_pipeline_mode') { should eq 'Classic' } + its('managed_runtime_version') { should eq '' } +end + describe iis_pool('Process Model Cleanup') do it { should exist } it { should be_running }