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

windows_feature_powershell on 2008r2 is case-sensitive #8625

Open
amcappelli opened this issue May 31, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@amcappelli
Copy link

commented May 31, 2019

Description

Trying to install a feature with windows_feature_powershell on 2008R2 fails if the case does not match exactly what is returned by Get-WindowsFeature

Chef Version

14.13.11

Platform Version

Windows 2008R2

Replication Case

succeeds when case matches Get-WindowsFeature exactly:
chef-apply -e "windows_feature_powershell 'WAS-NET-Environment'"
errors when it does not:
chef-apply -e "windows_feature_powershell 'Was-Net-Environment'"

Client Output

success:

Recipe: (chef-apply cookbook)::(chef-apply recipe)
  * windows_feature_powershell[WAS-NET-Environment] action install (up to date)

failure:

Recipe: (chef-apply cookbook)::(chef-apply recipe)
  * windows_feature_powershell[Was-Net-Environment] action install

    ================================================================================
    Error executing action `install` on resource 'windows_feature_powershell[Was-Net-Environment]'
    ================================================================================

    RuntimeError
    ------------
    The Windows feature Was-Net-Environment is not available on this version of Windows. Run 'Get-WindowsFeature' to see
 the list of available feature names.

    Resource Declaration:
    ---------------------
    # In C:/Users/acappelli/AppData/Local/Temp/2/recipe-temporary-file20190531-9104-g1myc5

      1: windows_feature_powershell 'Was-Net-Environment'

    Compiled Resource:
    ------------------
    # Declared in C:/Users/acappelli/AppData/Local/Temp/2/recipe-temporary-file20190531-9104-g1myc5:1:in `run_chef_recip
e'

    windows_feature_powershell("Was-Net-Environment") do
      action [:install]
      default_guard_interpreter :default
      declared_type :windows_feature_powershell
      cookbook_name "(chef-apply cookbook)"
      recipe_name "(chef-apply recipe)"
      feature_name ["Was-Net-Environment"]
    end

    System Info:
    ------------
    chef_version=14.13.11
    platform=windows
    platform_version=6.1.7601
    ruby=ruby 2.5.5p157 (2019-03-15 revision 67260) [x64-mingw32]
    program_name=C:/opscode/chef/bin/chef-apply
    executable=C:/opscode/chef/bin/chef-apply

Stacktrace

https://gist.github.com/amcappelli/8687c6bfd9db2fc554291e14b14141c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.