Git Product home page Git Product logo

Comments (52)

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny can you please check the following branch https://github.com/EasyAsABC123/iis/tree/hotfix_helper-class and see if this fixes your issue?

also which version of IIS cookbook were you using before this (in production)? I imagine <v.2.1.5
cb9f16d as that's when this was changed (not in this release).

Notice: just moving information off main thread #91 (comment)

from iis.

endakenny avatar endakenny commented on August 19, 2024

Yep - going to check that branch now. I was using iis version 2.1.2

from iis.

endakenny avatar endakenny commented on August 19, 2024

@EasyAsABC123 - im not at all sure if this is how should expect to use the hotfix helper class here is what i have done.

  1. Pulled down the cookbook(iis-hotfix_helper-class) and uploaded it to chef server
  2. Had my my simple cookbook depend on it rather than the iis 3.0.0. cookbook it was in previous test
  3. Ran chef client locally

It seems that for my versions of (knife/chef client/chef server) there is something fundamentally broken with the iis/iis-hotfix_helper-class recipe - i am unable to create an app pool and a site. Im no Ruby expert but it appears to fail to compile the iis cookbook irrespective of what im trying to do with my cookbook.

I imagine <v.2.1.5 cb9f16d as that's when this was changed (not in this release).

Regarding the iis version I've been using up to now it was 2.1.2 - however ive just swapped it out for the latest version on supermarket - 2.1.6 my simple tests work. I've further simplified the resources as follows:

creates a new app pool

iis_pool 'myAppPool_v1_1' do
runtime_version "2.0"
pipeline_mode :Classic
action :add
end

do the same but map to testfu.opscode.com domain

iis_site 'Testfu Site' do
protocol :http
port 80
path "#{node['iis']['docroot']}/testfu"
host_header "testfu.opscode.com"
action [:add,:start]
end

They work with [email protected] and [email protected] whatever changes(cb9f16d that you reference) were made between these versions are not relevant to my issue.

When i do the same test against [email protected] i get a compile error using these cookbooks:
[[email protected], [email protected], [email protected], [email protected]]

Compile error:

Recipe Compile Error in C:/Users/kennye/.chef/local-mode-cache/cache/cookbooks/iis/providers/app.rb

TypeError

wrong argument type Class (expected Module)

Cookbook Trace:

C:/Users/kennye/.chef/local-mode-cache/cache/cookbooks/iis/providers/app.rb:26:in include' C:/Users/kennye/.chef/local-mode-cache/cache/cookbooks/iis/providers/app.rb:26:inclass_from_file'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/mixin/from_file.rb:42:in class_eval' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/mixin/from_file.rb:42:inclass_from_file'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/provider/lwrp_base.rb:94:in build_from_file' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:211:inload_lwrp_provider'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:202:in block in load_lwrps_fro ' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:201:ineach'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:201:in load_lwrps_from_cookboo C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:121:inblock in compile_lwrps'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:120:in each' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:120:incompile_lwrps'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context/cookbook_compiler.rb:73:in compile' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/run_context.rb:88:inload'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/policy_builder/expand_node_object.rb:73:in setup_run_context' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/client.rb:265:insetup_run_context'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/client.rb:429:in do_run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/client.rb:227:inrun'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application.rb:217:in run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application/client.rb:328:inblock in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application/client.rb:317:in loop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application/client.rb:317:inrun_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application.rb:67:in run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/bin/chef-client:26:in<top (required)>'
C:/opscode/chef/bin/chef-client:23:in load' C:/opscode/chef/bin/chef-client:23:in

'

Relevant File Content:

C:/Users/kennye/.chef/local-mode-cache/cache/cookbooks/iis/providers/app.rb:

19: # limitations under the License.
20: #
21:
22: require 'chef/mixin/shell_out'
23: require 'rexml/document'
24:
25: include Chef::Mixin::ShellOut
26>> include Opscode::IIS::Helper
27: include Windows::Helper
28: include REXML
29:
30: action :add do
31: unless @current_resource.exists
32: cmd = "#{appcmd} add app /site.name:"#{@new_resource.app_name}""
33: cmd << " /path:"#{@new_resource.path}""
34: cmd << " /applicationPool:"#{@new_resource.application_pool}"" if @new_resource.application_pool
35: cmd << " /physicalPath:"#{win_friendly_path(@new_resource.physical_path)}"" if @new_resource.physical_path

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny attempting to replicate the issue, but i'm not getting any exceptions...

my attributes are:

"iis": {
      "pubroot": "C:/wwwroot/",
      "docroot": "C:/wwwroot/",
      "log_dir": "C:/logs/"
    }

my run list is:

"run_list": [
    "recipe[testing-new-iis-cookbook::default]"
  ]

I'm using the following cookbooks:
[email protected] - hotfix version should be 3.0.1 i'll update shortly if this fixes your issue
[email protected]
[email protected]
[email protected]

You can download my test chef-repo below:
https://s3.amazonaws.com/Justin.Schuhmann/cookbooks.zip

can you go to the cache directory on your vagrant box and see if in the /libraries/helper.rb file if it is

module Opscode
    module IIS
       module Helper

I'm running:
*** Chef 11.12.4 ***
windows server 2012 x64
installing the features in my test recipe from testing-new-iis-cookbook:

#
# Cookbook Name:: testing-new-iis-cookbook
# Recipe:: default
#
# Copyright 2014, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#

include_recipe "windows"
include_recipe "iis"
include_recipe 'iis::remove_default_site'

# Include Windows::Helper from Opscode Windows Cookbook
::Chef::Recipe.send(:include, Windows::Helper)

# Install all the IIS roles
%w{ IIS-WebServerRole IIS-WebServer NetFx4Extended-ASPNET45 IIS-HttpCompressionDynamic IIS-WebServerManagementTools IIS-ManagementConsole IIS-ApplicationDevelopment IIS-ApplicationInit IIS-ISAPIFilter IIS-ISAPIExtensions IIS-NetFxExtensibility45 IIS-ASPNET45 IIS-ManagementScriptingTools IIS-HttpRedirect }.each do |feature|
  windows_feature feature do
    action :install
  end
end

# Remove more default app pools (continuing where include_recipe 'iis::remove_default_site' left off)
iis_pool '.NET v4.5' do
  action [:stop , :delete]
end

iis_pool '.NET v4.5 Classic' do
  action [:stop , :delete]
end

iis_pool 'myAppPool_v1_1' do
  runtime_version "2.0"
  pipeline_mode :Classic
  action :add
end

directory "#{node['iis']['docroot']}testfu" do
  recursive true
  action :create
end

iis_site 'Testfu Site' do
  protocol :http
  port 80
  application_pool "myAppPool_v1_1"
  path "#{node['iis']['docroot']}testfu"
  host_header "testfu.opscode.com"
  action [:add,:start]
end

Let me know if you are available for a google hangout, perhaps we can find out what is happening.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny @btm although i didn't get this error while in my vagrant test environment, I am getting the same error in my companies chef environment. Looking at it, @btm if you have any insight here let me know.

Looks like the server might be running

  *** Chef 11.12.8 ***

rather than my vagrant's 11.12.4

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny @btm confirmed updating the chef-client from 11.12.4 to 11.12.8 causes this compile error.

confirmed compile error also occurs in chef-client 12.0.3 (latest).

not sure what changed about using includes or lwrp libraries...

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

fix pull request to come shortly, testing in multiple environments.
dealing with the following error:

NameError
---------
uninitialized constant Opscode::ChefClient::Helpers::WMI
chef-client/libraries/helpers.rb:

 37:            Chef::Log.debug("Node has Chef Server Ctl Executable? #{system("which chef-server-ctl > /dev/null 2>&1")}")
 38:            node.recipe?('chef-server') || system('which chef-server > /dev/null 2>&1') || system('which chef-server-ctl > /dev/null 2>&1')
 39:          end
 40:        end
 41:  
 42:        def root_owner
 43:          if ['windows'].include?(node['platform']) 
 44>>           adminAccount=WMI::Win32_UserAccount.find(:first,:conditions => "sid like 'S-1-5-21-%-500' and LocalAccount=True")
 45:            adminAccount.Name
 46:          else
 47:            'root'
 48:          end
 49:        end
 50:  
 51:        def dir_owner
 52:          if chef_server?
 53:            chef_server_user

from iis.

endakenny avatar endakenny commented on August 19, 2024

Thanks Justin, I reproduced on a different chef server and then on a
different chef workstation across different target nodes today, it is not
an edge case. Looking forward to a fix, thanks for all your help, enda
On 24 Dec 2014 20:19, "Justin Schuhmann" [email protected] wrote:

fix pull request to come shortly, testing in multiple environments.


Reply to this email directly or view it on GitHub
#95 (comment)
.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny absolutely not it appears to be an issue caused by newer versions of chef-client. Working on this, hopefully can get the above resolved..unfortunately this will still require chef-client 11.14.X to work, might have to get with OpsCode about if they want it to work on older versions or error gracefully at minimum.

from iis.

endakenny avatar endakenny commented on August 19, 2024

@easyas123abc- Cool, I appreciate it, hopefully I'll be done with chef 11
soon, if I get up and running with iis 3.0.0 on chef 12 then I'm happy as.
On 24 Dec 2014 20:25, "Justin Schuhmann" [email protected] wrote:

@endakenny https://github.com/endakenny absolutely not it appears to be
an issue caused by newer versions of chef-client. Working on this,
hopefully can get the above resolved..unfortunately this will still require
chef-client 11.14.X to work, might have to get with OpsCode about if they
want it to work on older versions or error gracefully at minimum.


Reply to this email directly or view it on GitHub
#95 (comment)
.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny if you don't mind looking at https://github.com/EasyAsABC123/iis/tree/hotfix_helper-class

You should get much further, however...i'm now receiving:

NameError
---------
uninitialized constant Opscode::ChefClient::Helpers::WMI
chef-client/libraries/helpers.rb:

 37:            Chef::Log.debug("Node has Chef Server Ctl Executable? #{system("which chef-server-ctl > /dev/null 2>&1")}")
 38:            node.recipe?('chef-server') || system('which chef-server > /dev/null 2>&1') || system('which chef-server-ctl > /dev/null 2>&1')
 39:          end
 40:        end
 41:  
 42:        def root_owner
 43:          if ['windows'].include?(node['platform']) 
 44>>           adminAccount=WMI::Win32_UserAccount.find(:first,:conditions => "sid like 'S-1-5-21-%-500' and LocalAccount=True")
 45:            adminAccount.Name
 46:          else
 47:            'root'
 48:          end
 49:        end
 50:  
 51:        def dir_owner
 52:          if chef_server?
 53:            chef_server_user

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny the above error is caused by chef-client v3.7.0 being required. I'll be checking in the hotfix soon, worked on this yesterday.

from iis.

christrotter avatar christrotter commented on August 19, 2024

I'm running into this as well.

 FATAL: NoMethodError: iis_pool[RecipeName] (RecipeName::default line 31) had an error: NoMethodError: No resource or method named `is_new_value' for `Chef::Provider::IisPool ""'

Using chef-client 11.16.4 (2008R2 node), chef-server 12.0.1. Windows is pulled from github (latest), and IIS is the EasyAsABC123 dev IIS (https://github.com/EasyAsABC123/iis).

The recipe looks like this:

 iis_pool "#{cookbook_name}" do
     runtime_version "4.0"
     pipeline_mode :Integrated
     action :add
 end

 iis_pool "#{cookbook_name}" do
     pool_username "username"
     pool_password "password"
     action :config
 end

 iis_pool "#{cookbook_name}" do
    action :recycle
 end

The 'add' portion works fine, the config portion is what breaks. Originally I had it all together, but then saw this: http://stackoverflow.com/questions/27012838/chef-iis-cookbook-thirty-two-bit-option-not-working

Actual error dump:

servername [2014-12-30T14:56:00-05:00] INFO: Processing iis_pool[RecipeName] action config (RecipeName::default line 31)
servername
servername ================================================================================
servername Error executing action `config` on resource 'iis_pool[RecipeName]'
servername ================================================================================
servername
servername NoMethodError
servername -------------
servername No resource or method named `is_new_value' for `Chef::Provider::IisPool ""'
servername
servername Cookbook Trace:
servername ---------------
servername c:/chef/cache/cookbooks/iis/libraries/helper.rb:50:in `is_new_or_empty_value?'
servername c:/chef/cache/cookbooks/iis/providers/pool.rb:131:in `configure'
servername c:/chef/cache/cookbooks/iis/providers/pool.rb:46:in `block in class_from_file'
servername
servername Resource Declaration:
servername ---------------------
servername # In c:/chef/cache/cookbooks/RecipeName/recipes/default.rb
servername
servername  31:  iis_pool "#{cookbook_name}" do
servername  32:      pool_username "username"
servername  33:          pool_password "password"
servername  34:          action :config
servername  35:  end
servername  36:
servername
servername Compiled Resource:
servername ------------------
servername # Declared in c:/chef/cache/cookbooks/RecipeName/recipes/default.rb:31:in `from_file'
servername
servername iis_pool("RecipeName") do
servername   action [:config]
servername   retries 0
servername   retry_delay 2
servername   guard_interpreter :default
servername   cookbook_name "RecipeName"
servername   recipe_name "default"
servername   runtime_version "4.0"
servername   pipeline_mode :Integrated
servername   pool_username "username"
servername   pool_password "password"
servername   pool_name "RecipeName"
servername end
servername
servername [2014-12-30T14:56:00-05:00] INFO: Running queued delayed notifications before re-raising exception
<snip>
servername [2014-12-30T14:56:03-05:00] ERROR: Running exception handlers
servername [2014-12-30T14:56:03-05:00] ERROR: Exception handlers complete
servername [2014-12-30T14:56:03-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
servername [2014-12-30T14:56:03-05:00] FATAL: NoMethodError: iis_pool[RecipeName] (RecipeName::default line 31) had an error: NoMethodError: No resource or method named `is_new_value' for `Chef::Provider::IisPool ""'

from iis.

christrotter avatar christrotter commented on August 19, 2024

Pulled the above-mentioned repo down after running into IIS site issues: https://github.com/EasyAsABC123/iis.git (maybe I had the wrong one)

I commented out the config portion and moved on to site creation:

FATAL: NoMethodError: iis_site[RecipeName] (RecipeName::default line 41) had an error: NoMethodError: undefined method `cleanpath' for Chef::Util::PathHelper:Class

Recipe portion:

 iis_pool "#{cookbook_name}" do
    action :recycle
 end

 iis_site "#{cookbook_name}" do
    path "c:\\web\\data\\#{cookbook_name}"
    site_name "#{cookbook_name}"
    application_pool "#{cookbook_name}"
    action [:add,:start]
 end

 iis_site "#{cookbook_name}" do
    bindings "http/'*':80:www.domain.com" 
    action [:config,:restart]
 end

Actual dump:

NodeName [2014-12-30T15:21:08-05:00] INFO: Processing iis_site[RecipeName] action add (RecipeName::default line 41)
NodeName
NodeName ================================================================================
NodeName Error executing action `add` on resource 'iis_site[RecipeName]'
NodeName ================================================================================
NodeName
NodeName NoMethodError
NodeName -------------
NodeName undefined method `cleanpath' for Chef::Util::PathHelper:Class
NodeName
NodeName Cookbook Trace:
NodeName ---------------
NodeName c:/chef/cache/cookbooks/iis/providers/site.rb:32:in `block in class_from_file'
NodeName
NodeName Resource Declaration:
NodeName ---------------------
NodeName # In c:/chef/cache/cookbooks/RecipeName/recipes/default.rb
NodeName
NodeName  41:  iis_site "#{cookbook_name}" do
NodeName  42:         path "c:\\web\\data\\#{cookbook_name}"
NodeName  43:         site_name "#{cookbook_name}"
NodeName  44:         application_pool "#{cookbook_name}"
NodeName  45:         action [:add,:start]
NodeName  46:  end
NodeName  47:
NodeName
NodeName Compiled Resource:
NodeName ------------------
NodeName # Declared in c:/chef/cache/cookbooks/RecipeName/recipes/default.rb:41:in `from_file'
NodeName
NodeName iis_site("RecipeName") do
NodeName   action [:add, :start]
NodeName   retries 0
NodeName   retry_delay 2
NodeName   guard_interpreter :default
NodeName   cookbook_name "RecipeName"
NodeName   recipe_name "default"
NodeName   path "c:\\web\\data\\RecipeName"
NodeName   site_name "RecipeName"
NodeName   application_pool "RecipeName"
NodeName end
NodeName
NodeName [2014-12-30T15:21:08-05:00] INFO: Running queued delayed notifications before re-raising exception
<snip>
NodeName [2014-12-30T15:21:12-05:00] ERROR: Running exception handlers
NodeName [2014-12-30T15:21:12-05:00] ERROR: Exception handlers complete
NodeName [2014-12-30T15:21:12-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
NodeName [2014-12-30T15:21:12-05:00] FATAL: NoMethodError: iis_site[RecipeName] (RecipeName::default line 41) had an error: NoMethodError: undefined method `cleanpath' for Chef::Util::PathHelper:Class

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

Do you have chef-client (cookbook) 3.7.0 installed or possibly higher might be required.  That’s where Chef::Util::PathHelper comes from, looking at the other error right now.
-- 
Justin Schuhmann

On December 30, 2014 at 3:25:16 PM, christrotter ([email protected]) wrote:

I commented out the config portion and moved on to site creation:

FATAL: NoMethodError: iis_site[RecipeName](RecipeName::default line 41) had an error: NoMethodError: undefined method `cleanpath' for Chef::Util::PathHelper:Class
Recipe portion:

iis_pool "#{cookbook_name}" do
action :recycle
end

iis_site "#{cookbook_name}" do
path "c:\web\data#{cookbook_name}"
site_name "#{cookbook_name}"
application_pool "#{cookbook_name}"
action [:add,:start]
end

iis_site "#{cookbook_name}" do
bindings "http/'*':80:www.domain.com"
action [:config,:restart]
end
Actual dump:

NodeName [2014-12-30T15:21:08-05:00] INFO: Processing iis_site[RecipeName] action add (RecipeName::default line 41)
NodeName
NodeName ================================================================================
NodeName Error executing action add on resource 'iis_site[RecipeName]'
NodeName ================================================================================
NodeName
NodeName NoMethodError
NodeName -------------
NodeName undefined method cleanpath' for Chef::Util::PathHelper:Class NodeName NodeName Cookbook Trace: NodeName --------------- NodeName c:/chef/cache/cookbooks/iis/providers/site.rb:32:inblock in class_from_file'
NodeName
NodeName Resource Declaration:
NodeName ---------------------
NodeName # In c:/chef/cache/cookbooks/RecipeName/recipes/default.rb
NodeName
NodeName 41: iis_site "#{cookbook_name}" do
NodeName 42: path "c:\web\data#{cookbook_name}"
NodeName 43: site_name "#{cookbook_name}"
NodeName 44: application_pool "#{cookbook_name}"
NodeName 45: action [:add,:start]
NodeName 46: end
NodeName 47:
NodeName
NodeName Compiled Resource:
NodeName ------------------
NodeName # Declared in c:/chef/cache/cookbooks/RecipeName/recipes/default.rb:41:in from_file' NodeName NodeName iis_site("RecipeName") do NodeName action [:add, :start] NodeName retries 0 NodeName retry_delay 2 NodeName guard_interpreter :default NodeName cookbook_name "RecipeName" NodeName recipe_name "default" NodeName path "c:\\web\\data\\RecipeName" NodeName site_name "RecipeName" NodeName application_pool "RecipeName" NodeName end NodeName NodeName [2014-12-30T15:21:08-05:00] INFO: Running queued delayed notifications before re-raising exception <snip> NodeName [2014-12-30T15:21:12-05:00] ERROR: Running exception handlers NodeName [2014-12-30T15:21:12-05:00] ERROR: Exception handlers complete NodeName [2014-12-30T15:21:12-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out NodeName [2014-12-30T15:21:12-05:00] FATAL: NoMethodError: iis_site[RecipeName] (RecipeName::default line 41) had an error: NoMethodError: undefined methodcleanpath' for Chef::Util::PathHelper:Class

Reply to this email directly or view it on GitHub.

from iis.

christrotter avatar christrotter commented on August 19, 2024

Yessir, I have chef-client v4.0.0 installed - pulled that down today as well.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

Currently i’m getting:

Error executing action add on resource 'iis_site[Testfu Site]'

NameError

uninitialized constant Chef::Util::PathHelper

Resource Declaration:

In C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/cookbooks/test-iis/recipes/default.rb

 29: iis_site 'Testfu Site' do
 30:   protocol :http
 31:   port 80
 32:   application_pool 'myAppPool_v1_1'
 33:   path "#{node['iis']['docroot']}testfu"
 34:   action [:add,:start]
 35: end
 36: 

Compiled Resource:

Declared in C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/cookbooks/test-iis/recipes/default.rb:29:in `from_file'

iis_site("Testfu Site") do
  action [:add, :start]
  retries 0
  retry_delay 2
  guard_interpreter :default
  cookbook_name "test-iis"
  recipe_name "default"
  protocol :http
  port 80
  application_pool "myAppPool_v1_1"
  path "C:/wwwroot/testfu"
  site_name "Testfu Site"
end

[2014-12-30T15:28:57-05:00] INFO: Running queued delayed notifications before re-raising exception
[2014-12-30T15:28:57-05:00] ERROR: Running exception handlers
[2014-12-30T15:28:57-05:00] ERROR: Exception handlers complete
[2014-12-30T15:28:57-05:00] FATAL: Stacktrace dumped to C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/chef-stacktrace.out
[2014-12-30T15:28:57-05:00] FATAL: NameError: iis_site[Testfu Site](test-iis::default line 29) had an error: NameError: uninitialized constant Chef::Util::PathHelper

After fixing the first issue you pointed out.
-- 
Justin Schuhmann

On December 30, 2014 at 3:31:18 PM, christrotter ([email protected]) wrote:

Yessir, I have chef-client v4.0.0 installed - pulled that down today as well.


Reply to this email directly or view it on GitHub.

from iis.

christrotter avatar christrotter commented on August 19, 2024

Let me know if there's anything I can do to help. We're still in proof of concept/pilot stages here, so happy to mess around.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

Upgraded chef-client to 11.14.2-1 fixed the uninitialized constant but brought about the cleanpath function missing error you were receiving.

Upgraded to chef-client 12.0.3-1 fixed the issue with clean path, the other bugs are fixed and will be in a hotfix branch momentarily.  Then i’d love for you to test again.

Hotfix Branch:
https://github.com/EasyAsABC123/iis/tree/hotfix_helper-class

I’ll be back in a few, please let me know the results.
-- 
Justin Schuhmann

On December 30, 2014 at 3:32:19 PM, Justin Schuhmann ([email protected]) wrote:

Currently i’m getting:

Error executing action add on resource 'iis_site[Testfu Site]'

NameError

uninitialized constant Chef::Util::PathHelper

Resource Declaration:

In C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/cookbooks/test-iis/recipes/default.rb

 29: iis_site 'Testfu Site' do
 30:   protocol :http
 31:   port 80
 32:   application_pool 'myAppPool_v1_1'
 33:   path "#{node['iis']['docroot']}testfu"
 34:   action [:add,:start]
 35: end
 36: 

Compiled Resource:

Declared in C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/cookbooks/test-iis/recipes/default.rb:29:in `from_file'

iis_site("Testfu Site") do
  action [:add, :start]
  retries 0
  retry_delay 2
  guard_interpreter :default
  cookbook_name "test-iis"
  recipe_name "default"
  protocol :http
  port 80
  application_pool "myAppPool_v1_1"
  path "C:/wwwroot/testfu"
  site_name "Testfu Site"
end

[2014-12-30T15:28:57-05:00] INFO: Running queued delayed notifications before re-raising exception
[2014-12-30T15:28:57-05:00] ERROR: Running exception handlers
[2014-12-30T15:28:57-05:00] ERROR: Exception handlers complete
[2014-12-30T15:28:57-05:00] FATAL: Stacktrace dumped to C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/chef-stacktrace.out
[2014-12-30T15:28:57-05:00] FATAL: NameError: iis_site[Testfu Site](test-iis::default line 29) had an error: NameError: uninitialized constant Chef::Util::PathHelper

After fixing the first issue you pointed out.
-- 
Justin Schuhmann

On December 30, 2014 at 3:31:18 PM, christrotter ([email protected]) wrote:

Yessir, I have chef-client v4.0.0 installed - pulled that down today as well.


Reply to this email directly or view it on GitHub.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

As a side note this is the test cookbook I ran:

Cookbook Name:: test-iis

Recipe:: default

Copyright 2014, YOUR_COMPANY_NAME

All rights reserved - Do Not Redistribute

stop and delete the default site

iis_site 'Default Web Site' do
  action [:stop, :delete]
end

directory "#{node['iis']['docroot']}testfu" do
  recursive true
  action :create
end

creates a new app pool

iis_pool 'myAppPool_v1_1' do
  runtime_version "2.0"
  pipeline_mode :Classic
  action :add
end

create and start a new site that maps to

the physical location C:\inetpub\wwwroot\testfu

iis_site 'Testfu Site' do
  protocol :http
  port 80
  application_pool 'myAppPool_v1_1'
  path "#{node['iis']['docroot']}testfu"
  action [:add,:start]
end

 iis_pool "test" do
     runtime_version "4.0"
     pipeline_mode :Integrated
     action :add
 end

 iis_pool "test" do
     pool_username "username"
     pool_password "password"
     action :config
 end

 iis_pool "test" do
    action :recycle
 end

-- 
Justin Schuhmann

On December 30, 2014 at 4:18:21 PM, Justin Schuhmann ([email protected]) wrote:

Upgraded chef-client to 11.14.2-1 fixed the uninitialized constant but brought about the cleanpath function missing error you were receiving.

Upgraded to chef-client 12.0.3-1 fixed the issue with clean path, the other bugs are fixed and will be in a hotfix branch momentarily.  Then i’d love for you to test again.

Hotfix Branch:
https://github.com/EasyAsABC123/iis/tree/hotfix_helper-class

I’ll be back in a few, please let me know the results.
-- 
Justin Schuhmann

On December 30, 2014 at 3:32:19 PM, Justin Schuhmann ([email protected]) wrote:

Currently i’m getting:

Error executing action add on resource 'iis_site[Testfu Site]'

NameError

uninitialized constant Chef::Util::PathHelper

Resource Declaration:

In C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/cookbooks/test-iis/recipes/default.rb

 29: iis_site 'Testfu Site' do
 30:   protocol :http
 31:   port 80
 32:   application_pool 'myAppPool_v1_1'
 33:   path "#{node['iis']['docroot']}testfu"
 34:   action [:add,:start]
 35: end
 36: 

Compiled Resource:

Declared in C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/cookbooks/test-iis/recipes/default.rb:29:in `from_file'

iis_site("Testfu Site") do
  action [:add, :start]
  retries 0
  retry_delay 2
  guard_interpreter :default
  cookbook_name "test-iis"
  recipe_name "default"
  protocol :http
  port 80
  application_pool "myAppPool_v1_1"
  path "C:/wwwroot/testfu"
  site_name "Testfu Site"
end

[2014-12-30T15:28:57-05:00] INFO: Running queued delayed notifications before re-raising exception
[2014-12-30T15:28:57-05:00] ERROR: Running exception handlers
[2014-12-30T15:28:57-05:00] ERROR: Exception handlers complete
[2014-12-30T15:28:57-05:00] FATAL: Stacktrace dumped to C:/cygwin/home/vagrant/.chef/local-mode-cache/cache/chef-stacktrace.out
[2014-12-30T15:28:57-05:00] FATAL: NameError: iis_site[Testfu Site](test-iis::default line 29) had an error: NameError: uninitialized constant Chef::Util::PathHelper

After fixing the first issue you pointed out.
-- 
Justin Schuhmann

On December 30, 2014 at 3:31:18 PM, christrotter ([email protected]) wrote:

Yessir, I have chef-client v4.0.0 installed - pulled that down today as well.


Reply to this email directly or view it on GitHub.

from iis.

christrotter avatar christrotter commented on August 19, 2024

I'm off until Friday, but if I get a chance I'll test it out. We had been avoiding chef client v12 due to issues running Windows stuff: chef-boneyard/windows#155

I'd be curious to see if you can get the 'bindings' option working for iis_site. This is the closest I ever got to it 'working': (this is probably off topic...)

# STDOUT: ERROR ( message:Invalid format for parameter "bindings" - 
    # it must be of the following format: 
    # "protocol://domain:port | protocol/BindingInformation,...". )
    # Could not get this working...tried so many variants...
    #bindings "http://www.domain.com:80 | http/*:80:www.domain.com"

    # THIS WORKS: bindings "http/'*':80:www.domain.com" 
    # except for the * showing up as '*' - if you leave the quotes out, nothing works

    # If you look at actual appcmd data: 
    # SITE "ResponseDriver" (id:4,bindings:http/ip.ad.dr.es:80:www.domain.local,http/10.(etc)
    #Nope: bindings "http/*:80:www.domain.com"
    #Nope: bindings "http/:80:www.domain.com"
    #Nope: bindings "http://www.domain.com:80"
    #Nope: bindings "http/*:www.domain.com"

    # If using bindings, don't use port/protocol/host_header attributes
    # If host_header and the site name differ, must specify site_name

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

Yeah, I might have to add the windows cookbook back to it so it can be
backwards compatible and forward compatible.

In IIS for the Site what are you trying to do? just add a domain
www.mydomain.com? or something else?

On Wed, Dec 31, 2014 at 7:51 AM, christrotter [email protected]
wrote:

I'm off until Friday, but if I get a chance I'll test it out. We had been
avoiding chef client v12 due to issues running Windows stuff:
chef-boneyard/windows#155
chef-boneyard/windows#155

I'd be curious to see if you can get the 'bindings' option working for
iis_site. This is the closest I ever got to it 'working': (this is probably
off topic...)

STDOUT: ERROR ( message:Invalid format for parameter "bindings" -

# it must be of the following format:
# "protocol://domain:port | protocol/BindingInformation,...". )
# Could not get this working...tried so many variants...
#bindings "http://www.domain.com:80 | http/*:80:www.domain.com"

# THIS WORKS: bindings "http/'*':80:www.domain.com"
# except for the * showing up as '*' - if you leave the quotes out, nothing works

# If you look at actual appcmd data:
# SITE "ResponseDriver" (id:4,bindings:http/ip.ad.dr.es:80:www.domain.local,http/10.(etc)
#Nope: bindings "http/*:80:www.domain.com"
#Nope: bindings "http/:80:www.domain.com"
#Nope: bindings "http://www.domain.com:80"
#Nope: bindings "http/*:www.domain.com"

# If using bindings, don't use port/protocol/host_header attributes
# If host_header and the site name differ, must specify site_name


Reply to this email directly or view it on GitHub
#95 (comment)
.

from iis.

christrotter avatar christrotter commented on August 19, 2024

We'd like to be able to specify port(s), protocol(s), IP (or *), and host header(s). The bindings option seemed the logical way to do that, but I haven't been able to get it working (see permutations above). Maybe (probably) I'm going about it the wrong way...

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

the command appears to be:
C:\Windows\System32\inetsrv>appcmd.exe set site /site.name:"Testfu Site"
/bindings:"http/192.168.0.1:80:www.contoso.com","https/*:443:"

which is built into :add, so you'd just pass "http/192.168.0.1:80:
www.contoso.com","https/*:443:" into bindings

so for

#Nope: bindings "http/*:80:www.domain.com"
#Nope: bindings "http/:80:www.domain.com"
#Nope: bindings "http://www.domain.com:80 <http://www.domain.com/>"
#Nope: bindings "http/*:www.domain.com"

it would be

iis_site "domain" do

bindings "http/*:80:www.domain.com","https/*:443:"

end

so basically, "[protocol(http/https)]/[ipaddress or *]:[port
number]:[domain name]" comma separated.

then just need to verify that :config works for it as well

On Wed, Dec 31, 2014 at 9:39 AM, christrotter [email protected]
wrote:

We'd like to be able to specify port(s), protocol(s), IP (or *), and host
header(s). The bindings option seemed the logical way to do that, but I
haven't been able to get it working (see permutations above). Maybe
(probably) I'm going about it the wrong way...


Reply to this email directly or view it on GitHub
#95 (comment)
.

from iis.

christrotter avatar christrotter commented on August 19, 2024

The separation of what to do when using :add, or :config, etc is not documented, would be great to see a basic how-to (or just note which options to use during which operation).

Thanks! I'll try this out when I have a sec.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

i'll add some bindings examples to the documentation (readme)

On Wed, Dec 31, 2014 at 10:14 AM, christrotter [email protected]
wrote:

The separation of what to do when using :add, or :config, etc is not
documented, would be great to see a basic how-to (or just note which
options to use during which operation).

Thanks! I'll try this out when I have a sec.


Reply to this email directly or view it on GitHub
#95 (comment)
.

from iis.

endakenny avatar endakenny commented on August 19, 2024

@EasyAsABC123 - in my attempted to test you branch of the iis cookbook (https://github.com/EasyAsABC123/iis/tree/hotfix_helper-class) - cannot upload it to my chef server.
I get this error:

PS C:\chef> knife cookbook upload iis-hotfix_helper-class --cookbook-path PATH:C:\chef\cookbooks
ERROR: Could not find cookbook iis-hotfix_helper-class in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.

I have verified that i am not doing anything silly in my config - knife.rb points to the correct cookbooks directory and that the directory of the correct name is present. I have also verified that i can upload other cookbooks(more than one.)

Furthermore when i test the uploading of the iis cookbook the code which verifies if there is another version of iis(of which your cookbook is kind of version) in the cookbooks directory can see the iis-hotfix_helper-class cookbook is present. See below

PS C:\chef> knife cookbook upload iis --cookbook-path PATH:C:\chef\cookbooks
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
WARNING: The cookbooks: iis exist in multiple places in your cookbook_path.
A composite version of these cookbooks has been compiled for uploading.

IMPORTANT: In a future version of Chef, this behavior will be removed and you will no longer
be able to have the same version of a cookbook in multiple places in your cookbook_path.
WARNING: The affected cookbooks are located:
iis:
C:/chef/cookbooks/iis
C:/chef/cookbooks/iis-hotfix_helper-class
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Uploading iis [3.0.2]
Uploaded 1 cookbook.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

Simply run knife cookbook upload iis --force

We want to make sure it is the latest code

Justin Schuhmann

On Jan 2, 2015, at 5:47 AM, endakenny [email protected] wrote:

@EasyAsABC123 - in my attempted to test you branch of the iis cookbook (https://github.com/EasyAsABC123/iis/tree/hotfix_helper-class) - cannot upload it to my chef server.
I get this error:

PS C:\chef> knife cookbook upload iis-hotfix_helper-class --cookbook-path PATH:C:\chef\cookbooks
ERROR: Could not find cookbook iis-hotfix_helper-class in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.

I have verified that i am not doing anything silly in my config - knife.rb points to the correct cookbooks directory and that the directory of the correct name is present. I have also verified that i can upload other cookbooks(more than one.)

Furthermore when i test the uploading of the iis cookbook the code which verifies if there is another version of iis(of which your cookbook is kind of version) in the cookbooks directory can see the iis-hotfix_helper-class cookbook is present. See below

PS C:\chef> knife cookbook upload iis --cookbook-path PATH:C:\chef\cookbooks
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
WARNING: The cookbooks: iis exist in multiple places in your cookbook_path.
A composite version of these cookbooks has been compiled for uploading.

IMPORTANT: In a future version of Chef, this behavior will be removed and you will no longer
be able to have the same version of a cookbook in multiple places in your cookbook_path.
WARNING: The affected cookbooks are located:
iis:
C:/chef/cookbooks/iis
C:/chef/cookbooks/iis-hotfix_helper-class
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Uploading iis [3.0.2]
Uploaded 1 cookbook.


Reply to this email directly or view it on GitHub.

from iis.

christrotter avatar christrotter commented on August 19, 2024

I tried running the IIS hotfix branch you linked, was still getting 'cleanpath' errors. Tried updating to chef-client 12.0.3-1, back to a ruby segfault that comes up just after loading cookbooks. Sooo...

Anything I should be doing differently? What other info can I provide to help?

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

yeah the issue there is that you need chef-client > 12 for Chef::Util::PathHelper to work.  I’m about to could backwards compatibility.  it really isn’t that much code then you can test on chef-client 11.x.x
-- 
Justin Schuhmann

On January 2, 2015 at 9:14:52 AM, christrotter ([email protected]) wrote:

I tried running the IIS hotfix branch you linked, was still getting 'cleanpath' errors. Tried updating to chef-client 12.0.3-1, back to a ruby segfault that comes up just after loading cookbooks. Sooo...

Anything I should be doing differently? What other info can I provide to help?


Reply to this email directly or view it on GitHub.

from iis.

endakenny avatar endakenny commented on August 19, 2024

@EasyAsABC123 - im not trying to upload the iis cookbook - im uploading the iis-hotfix_helper-class. it appears there is an issue uploading this cookbook only. i get the same error when trying to to use the --force option:

PS C:\chef> knife cookbook upload iis-hotfix_helper-class --force
ERROR: Could not find cookbook iis-hotfix_helper-class in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

rename that folder to iis, in the metabase file in that folder you’ll see the cookbook name is IIS.  this is what knife is looking at when you try to upload it.  That’s why you are getting the below error when trying to upload it.  
-- 
Justin Schuhmann

On January 2, 2015 at 9:25:42 AM, endakenny ([email protected]) wrote:

@EasyAsABC123 - im not trying to upload the iis cookbook - im uploading the iis-hotfix_helper-class. it appears there is an issue uploading this cookbook only. i get the same error when trying to to use the --force option:

PS C:\chef> knife cookbook upload iis-hotfix_helper-class --force
ERROR: Could not find cookbook iis-hotfix_helper-class in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.


Reply to this email directly or view it on GitHub.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@christrotter I just checked in the new backwards compatibility changes to that branch. I'm testing them myself. Initial test with chef-client 12 worked, i'll be testing chef-client 11.x.x now.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

new patch (3.0.3) worked in:
chef-client 
11.12.4-1
11.12.8-1
11.12.8-2
11.14.2-1(failed) NoMethodError: undefined method cleanpath new patch required to fix.
12.0.3-1
-- 
Justin Schuhmann

On January 2, 2015 at 9:27:09 AM, Justin Schuhmann ([email protected]) wrote:

rename that folder to iis, in the metabase file in that folder you’ll see the cookbook name is IIS.  this is what knife is looking at when you try to upload it.  That’s why you are getting the below error when trying to upload it.  
-- 
Justin Schuhmann

On January 2, 2015 at 9:25:42 AM, endakenny ([email protected]) wrote:

@EasyAsABC123 - im not trying to upload the iis cookbook - im uploading the iis-hotfix_helper-class. it appears there is an issue uploading this cookbook only. i get the same error when trying to to use the --force option:

PS C:\chef> knife cookbook upload iis-hotfix_helper-class --force
ERROR: Could not find cookbook iis-hotfix_helper-class in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.


Reply to this email directly or view it on GitHub.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny @christrotter
new path (3.0.4) worked in:
11.12.4-1
11.12.8-1
11.12.8-2
11.14.2-1
12.0.3-1

So if you don’t mind grabbing the latest from https://github.com/EasyAsABC123/iis/tree/hotfix_helper-class and putting it in your iis folder to test.
-- 
Justin Schuhmann

On January 2, 2015 at 10:16:54 AM, Justin Schuhmann ([email protected]) wrote:

new patch (3.0.3) worked in:
chef-client 
11.12.4-1
11.12.8-1
11.12.8-2
11.14.2-1(failed) NoMethodError: undefined method cleanpath new patch required to fix.
12.0.3-1
-- 
Justin Schuhmann

On January 2, 2015 at 9:27:09 AM, Justin Schuhmann ([email protected]) wrote:

rename that folder to iis, in the metabase file in that folder you’ll see the cookbook name is IIS.  this is what knife is looking at when you try to upload it.  That’s why you are getting the below error when trying to upload it.  
-- 
Justin Schuhmann

On January 2, 2015 at 9:25:42 AM, endakenny ([email protected]) wrote:

@EasyAsABC123 - im not trying to upload the iis cookbook - im uploading the iis-hotfix_helper-class. it appears there is an issue uploading this cookbook only. i get the same error when trying to to use the --force option:

PS C:\chef> knife cookbook upload iis-hotfix_helper-class --force
ERROR: Could not find cookbook iis-hotfix_helper-class in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.


Reply to this email directly or view it on GitHub.

from iis.

christrotter avatar christrotter commented on August 19, 2024

Hm, why only up to 11.14? (latest available is 11.16.4-1 - still getting cleanpath errors with this)

I'll try 11.14 and update...

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@christrotter because I manually have to update each version to test.  I’ll update to 11.16.4-1 and see what happens.

3.0.4 worked on 11.16.4-1 for me

this is the tests i’m running:

    #
    # Cookbook Name:: test-iis
    # Recipe:: default
    #
    # Copyright 2014, YOUR_COMPANY_NAME
    #
    # All rights reserved - Do Not Redistribute
    #

    # stop and delete the default site
    iis_site 'Default Web Site' do
      action [:stop, :delete]
    end

    directory "#{node['iis']['docroot']}testfu" do
      recursive true
      action :create
    end

    # creates a new app pool
    iis_pool 'myAppPool_v1_1' do
      runtime_version "2.0"
      pipeline_mode :Classic
      action :add
    end

    # create and start a new site that maps to
    # the physical location C:\inetpub\wwwroot\testfu
    iis_site 'Testfu Site' do
      protocol :http
      port 80
      application_pool 'myAppPool_v1_1'
      path "#{node['iis']['docroot']}testfu"
      action [:add,:start]
    end

     iis_pool "test" do
         runtime_version "4.0"
         pipeline_mode :Integrated
         action :add
     end

     iis_pool "test" do
         pool_username "username"
         pool_password "password"
         action :config
     end

     iis_pool "test" do
        action :recycle
     end

-- 
Justin Schuhmann

On January 2, 2015 at 10:32:25 AM, christrotter ([email protected]) wrote:

Hm, why only up to 11.14? (latest available is 11.16.4-1 - still getting cleanpath errors with this)

I'll try 11.14 and update...


Reply to this email directly or view it on GitHub.

from iis.

christrotter avatar christrotter commented on August 19, 2024

Aha, I had re-downloaded that branch...but didn't refresh the page so the zip was still 3.0.2. Refreshed, downloaded 3.0.4, and no longer getting cleanpath errors (I've moved to chef-client 11.14).

I'll do more testing and let you know.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@christrotter thanks, yeah with this type of development you'll see i apply new changes rapidly. :) thanks again.

from iis.

christrotter avatar christrotter commented on August 19, 2024

I'd say things are working, except for the bindings are still broken (using your syntax). I'll open a separate issue on that to keep things somewhat organized.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@christrotter using bindings "http/10.12.0.136:80:www.domain.com,https/*:443:www.domain.com" it is still failing for you? i tested that...i think, basically it is "protocol/ip address:port:domain,protocol/ip address:port:domain,protocol/ip address:port:domain" list goes on comma separated. feel free to post it in a separate issue and i'll work on it there.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

Appears to be resolved #96

from iis.

endakenny avatar endakenny commented on August 19, 2024

@EasyAsABC123 - I have made progress - thanks for your help. The cookbook works for me for a site and and app pool. Now im trying to use the iis_vdir resource which is the main reason im evaluating the new version of the iis cookbook. Im seeing odd behaviour where a resource will not work if the indentation is too many spaces (should i log a seperate issue for this?). That can be overcome by adjusting the indent.
For the iis_vdir resource - here is what i declared:

Resource Declaration:

In C:/chef/.chef/local-mode-cache/cache/cookbooks/testing-new-iis-cookbook/recipes/default.rb

61: iis_vdir 'Testfu Site/' do
62: action :add
63: #application_name 'Testfu Site'
64: path '/Content/Test'
65: physical_path "C:\inetpub\wwwroot\testfu\Content"
66: end
67:

Here is what is compiled:

Compiled Resource:

Declared in C:/chef/.chef/local-mode-cache/cache/cookbooks/testing-new-iis-cookbook/recipes/default.rb:61:in `from_file'

iis_vdir("Testfu Site/") do
action [:add]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :iis_vdir
cookbook_name "testing-new-iis-cookbook"
recipe_name "default"
path "/Content/Test"
physical_path "C:\inetpub\wwwroot\testfu\Content"
application_name "Testfu Site/"
logon_method :ClearText
allow_sub_dir_config true
end

Here is the appcmd comand that is run:
Chef Client failed. 0 resources updated in 49.350937 seconds
[2015-01-02T16:38:15+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: iis_vdir[Testfu Site/](testing-new-iis-cookbook::default line 61) had an error: Mixlib
::ShellOut::ShellCommandFailed: Expected process to exit with [0, 42], but received '87'
---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe add vdir /app.name:"" /path:"/Content/Test" /physicalPath:"C:\inetpub\wwwroot\testfu\Content" /logon
Method:ClearText /allowSubDirConfig:true ----
STDOUT: ERROR ( message:Must specify the APP object with identifier. )

@EasyAsABC123 - so the 'application_name'- although it appears to correctly compile to it correct value gets converted to "" - an empty string before for the actuall appcmd command. Do you know what the issue is here?

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

Make sure to leave this issue open until the pull request is accepted.

You just removed the # in front of application name right? # are comments in ruby so you weren't passing an application name. Perhaps I should validate that you pass something there.

Justin Schuhmann

On Jan 5, 2015, at 6:28 AM, endakenny [email protected] wrote:

Closed #95.


Reply to this email directly or view it on GitHub.

from iis.

endakenny avatar endakenny commented on August 19, 2024

@EasyAsABC123 - yes i know that the application_name is commented out - that is intentional - I tried to use this before i tried the above but i was getting an error to say it doesn't exist. Should i have expected that to work then? (i tried it but then figured the error was quite definitive)

Resource in recipe:

Resource Declaration:
---------------------
 In C:/chef/.chef/local-mode-cache/cache/cookbooks/testing-new-iis-cookbook/recipes/default.rb

 61: iis_vdir 'Testfu Site/' do
 62: action :add
 63: application_name 'Testfu Site'
 64: path '/Content/Test'
 65: physical_path "C:\\inetpub\\wwwroot\\testfu\\Content"
 66: end
 67:

Compiled Resource:

------------------
Declared in C:/chef/.chef/local-mode-cache/cache/cookbooks/testing-new-iis-cookbook/recipes/default.rb:61:in `from_file'

iis_vdir("Testfu Site/") do
  action [:add]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  declared_type :iis_vdir
  cookbook_name "testing-new-iis-cookbook"
  recipe_name "default"
  application_name "Testfu Site"
  path "/Content/Test"
  physical_path "C:\\inetpub\\wwwroot\\testfu\\Content"
end

[2015-01-02T16:34:02+00:00] INFO: Running queued delayed notifications before re-raising exception

Error was:

[2015-01-02T16:34:02+00:00] FATAL: NoMethodError: iis_vdir[Testfu Site/](testing-new-iis-cookbook::default line 61) had an error: NoMethodError: undefined meth
od `application_name=' for Chef::Resource::IisVdir

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny grab [email protected] from the hotfix branch, it fixes this issue

as a sidenote this is the iis_vdir definition (i updated readme)

iis_vdir 'Testfu Site/' do
   action :add
   application_name 'Testfu Site/'
   path '/Content/Test'
   physical_path "C:\\inetpub\\wwwroot\\testfu\\Content"
 end

from iis.

endakenny avatar endakenny commented on August 19, 2024

Thanks - im trying that now. About the indentation issues

Issue

Im seeing odd behaviour where a resource will not work if the indentation is too many spaces

shall i open a new issue for it?

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny can you provide an example? I don't exactly understand what you mean, there is nothing unique about iis and indentation. Is this a chef issue?

from iis.

endakenny avatar endakenny commented on August 19, 2024

@EasyAsABC123 - excellent , thank you. Now i can create virtual directories. Im not to clear on whats differnt from what i did(posted above) Does the iis_vdir value('Testfu Site/') have to be the same as the application_name value('Testfu Site/') for it work?

from iis.

endakenny avatar endakenny commented on August 19, 2024

@EasyAsABC123. The basic functionality is now working for me, i can create sites, app pools and virtual directories (Hallelujah!). Forget about the indentation - i was having a nightmare on Friday and attributed some errors to indentation. Everything works now with iis branch 3.0.7. Thanks for your help. Now i need to check it for compatibility with my large cookbook that uses iis and then i can add the a number of iis_vdir resources to it.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

No you don't have to pass application_name if you are passing it in the top as the name attribute.

Sorry for that confusion, it should work the same either way.

from iis.

EasyAsABC123 avatar EasyAsABC123 commented on August 19, 2024

@endakenny sounds good let me know if another issue occurs

from iis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.