Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove_default_site broken #377

Closed
taliesins opened this issue Jun 9, 2017 · 2 comments
Closed

remove_default_site broken #377

taliesins opened this issue Jun 9, 2017 · 2 comments
Assignees

Comments

@taliesins
Copy link

Cookbook version

Release v6.7.0

Chef-client version

[Version of chef-client in your environment]

Platform Details

Running chefdk on windows

Scenario:

Remove default website.

Steps to Reproduce:

Add include_recipe 'iis::remove_default_site' to a cookbook and attempt to deploy it.

Expected Result:

Expecting it to remove the default site if it exists. This was working before. I think it is recent check-ins that have broken this functionality.

Actual Result:

iis_site[Default Web Site] action stop[2017-06-09T10:15:46+01:00] INFO: Processing iis_site[Default Web Site] action stop (iis::remove_default_site line 21)


    ================================================================================
    Error executing action `stop` on resource 'iis_site[Default Web Site]'
    ================================================================================

    TypeError
    ---------
    no implicit conversion of nil into String

    Cookbook Trace:
    ---------------
    C:/dev-env/provision/temp/cache/cookbooks/iis/libraries/helper.rb:70:in `windows_cleanpath'
    C:/dev-env/provision/temp/cache/cookbooks/iis/resources/site.rb:45:in `block in class_from_file'

    Resource Declaration:
    ---------------------
    # In C:/dev-env/provision/temp/cache/cookbooks/iis/recipes/remove_default_site.rb

     21: iis_site 'Default Web Site' do
     22:   action [:stop, :delete]
     23: end
     24:

    Compiled Resource:
    ------------------
    # Declared in C:/dev-env/provision/temp/cache/cookbooks/iis/recipes/remove_default_site.rb:21:in `from_file'

    iis_site("Default Web Site") do
      action [:stop, :delete]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :iis_site
      cookbook_name "iis"
      recipe_name "remove_default_site"
      site_name "Default Web Site"
      options ""
      log_directory "C:\\inetpub\\logs\\LogFiles"
    end

    Platform:
    ---------
    i386-mingw32

@EasyAsABC123
Copy link
Contributor

This is a bug with how i did some idempotency fixes in 6.7.0 basically any line like the below
desired.physical_path = windows_cleanpath(desired.physical_path)

needs a guard clause on it
desired.physical_path = windows_cleanpath(desired.physical_path) if desired.physical_path

i have a change for this and am adding tests now

@EasyAsABC123
Copy link
Contributor

Resolved by #378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants