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 msi package provider fails to install with NoMethodError for 'shell_out!' #2625

Closed
gh2k opened this issue Dec 12, 2014 · 6 comments
Closed
Milestone

Comments

@gh2k
Copy link

gh2k commented Dec 12, 2014

Running Chef omnibus installer, with Chef 12.0.1

When including an msi package on Windows, the Chef run blows up with:
undefined method `shell_out!' for #Chef::Provider::Package::Windows::MSI:0x12b62e0

Here's some more info:

       [2014-12-12T07:13:36-08:00] INFO: Processing windows_package[nxlog-ce] action install (nxlog-ce::default line 47)

       ================================================================================
       Error executing action `install` on resource 'windows_package[nxlog-ce]'
       ================================================================================

       NoMethodError
       -------------
       undefined method `shell_out!' for #<Chef::Provider::Package::Windows::MSI:0x12b62e0>

       Resource Declaration:
       ---------------------
       # In C:/Windows/Temp/kitchen/cache/cookbooks/nxlog-ce/recipes/default.rb

        47:   package 'nxlog-ce' do
        4
       8:     source "#{Chef::Config[:file_cache_path]}/#{package_name}"
        49:   end
        50: end

       Compiled Resource:
       ------------------
       # Declared in C:/Windows/Temp/kitchen/cache/cookbooks/nxlog-ce/recipes/default.rb:47:in `from_file'

       windows_package("nxlog-
       ce") do
         action :install
         retries 0
         retry_delay 2
         default_guard_interpreter :default
         package_name "nxlog-ce"
         source "C:\\Windows\\Temp\\kitchen\\cache\\nxlog-ce-2.8.1248.msi"
         version "2.8.1248\x00"
         timeout 600
         returns [0]
         cookboo
       k_name "nxlog-ce"
         recipe_name "default"
       end

       [2014-12-12T07:13:36-08:00] INFO: Running queued delayed notifications before re-raising exception
       [2014-12-12T07:13:36-08:00] ERROR: Running exception handlers
       [2014-12-12T07:13:36-08:00] ERROR: Exception handlers complete
       [2014-12-12T07:13:36-08:00] FATAL
       : Stacktrace dumped to C:/Windows/Temp/kitchen/cache/chef-stacktrace.out
       [2014-12-12T07:13:37-08:00] FATAL: NoMethodError: windows_package[nxlog-ce] (nxlog-ce::default line 47) had an error: NoMethodError: undefined method `shell_out!' for #<Chef::Provider::Package::Windows::MSI:0x12b62e0>

Looks like the ShellOut mixin isn't included in the msi package provider?

@jaym
Copy link
Contributor

jaym commented Dec 12, 2014

Verified this is an issue

@jaym
Copy link
Contributor

jaym commented Dec 12, 2014

This is weird, shellout was pulled up to provider, seems like it should still work:
9e85bbd#diff-a77ce807b1b8d52f58031169827e58ba
cc @lamont-granquist

@jaym
Copy link
Contributor

jaym commented Dec 12, 2014

@lamont-granquist
Copy link
Contributor

how did that ever work? or did we accidentally drop the inheritance at some point?

@lamont-granquist
Copy link
Contributor

no, if you look at the base windows package provider, it is using composition instead of inheritance (a good thing) and that msi class is not supposed to inherit from any base class. if i removed shell_out from that class it was just a mistake and that should get added back.

@sersut
Copy link
Contributor

sersut commented Dec 15, 2014

Fixed by ^^ commit.

@sersut sersut closed this as completed Dec 15, 2014
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants