[chef] Re: RE: Please help with windows_package exception


Chronological Thread 
  • From: Jay Mundrawala < >
  • To:
  • Subject: [chef] Re: RE: Please help with windows_package exception
  • Date: Sun, 22 Feb 2015 18:15:02 -0800

Specify the path to the MSI in the source attribute instead of as the name of the resource.

As example from the cookbook:

windows_package 'Mozilla Firefox 5.0 (x86 en-US)' do

  source 'http://archive.mozilla.org/pub/mozilla.org/mozilla.org/firefox/releases/5.0/win32/en-US/Firefox%20Setup%205.0.exe'

  options '-ms'

  installer_type :custom

  action :install

end

On Feb 22, 2015 6:06 PM, "Fouts, Chris" < "> > wrote:

Here’s a better cut/paste of the output. My original post looked like the *.msi name was misconfigured.

 

Chris

 

    ============================================================================

====

    Error executing action `install` on resource 'windows_package[c:\windows\tem

p\chef-client\DbBuilder-0.0.0051-339.msi]'

    ============================================================================

====

 

    Chef::Exceptions::ValidationFailed

    ----------------------------------

    Required argument source is missing!

 

    Cookbook Trace:

    ---------------

    c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:106:in `install

_package'

    c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:31:in `block in

<class:WindowsCookbookPackage>'

 

    Resource Declaration:

    ---------------------

    # In c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.rb

 

     26: windows_package "#{win_pkg}" do

     27:   action :install

     28:   installer_type :msi

    29:   options "quiet"

     30: end

     31:

 

    Compiled Resource:

    ------------------

    # Declared in c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.rb:

26:in `from_file'

 

    windows_cookbook_package("c:\windows\temp\chef-client\DbBuilder-0.0.0051-339

.msi") do

      provider Chef::Provider::WindowsCookbookPackage

      action [:install]

      retries 0

      retry_delay 2

      default_guard_interpreter :default

      declared_type :windows_package

      cookbook_name "db-mssql"

      recipe_name "install_dbbuilder"

      installer_type :msi

      options "quiet"

      package_name "c:\\windows\\temp\\chef-client\\DbBuilder-0.0.0051-339.msi"

    end

 

[2015-02-22T20:22:24-05:00] INFO: Running queued delayed notifications before re

-raising exception

 

Running handlers:

[2015-02-22T20:22:24-05:00] ERROR: Running exception handlers

Running handlers complete

[2015-02-22T20:22:24-05:00] ERROR: Exception handlers complete

[2015-02-22T20:22:24-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack

trace.out

Chef Client failed. 14 resources updated in 37.360134 seconds

[2015-02-22T20:22:24-05:00] INFO: Sending resource update report (run-id: 10c432

fa-7efa-49de-8248-e91238e1a0a8)

[2015-02-22T20:22:24-05:00] FATAL: Chef::Exceptions::ValidationFailed: windows_p

ackage[c:\windows\temp\chef-client\DbBuilder-0.0.0051-339.msi] (db-mssql::instal

l_dbbuilder line 26) had an error: Chef::Exceptions::ValidationFailed: Required

argument source is missing!

 

From: Fouts, Chris [mailto: " target="_blank"> ]
Sent: Sunday, February 22, 2015 8:28 PM
To: " target="_blank">
Subject: [chef] Please help with windows_package exception

 

If I install the *.msi manually, it installs. When installing it via windows_package resource, I get an exception. I can’t find what Chef means by “Required argument source is missing!”

 

    ==========================================================================

====

    Error executing action `install` on resource 'windows_package[c:\windows\t

p\chef-client\DbBuilder-0.0.0051-339.msi]'

    ==========================================================================

====

 

    Chef::Exceptions::ValidationFailed

    ----------------------------------

    Required argument source is missing!

 

    Cookbook Trace:

    ---------------

    c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:106:in `insta

_package'

    c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:31:in `block

<class:WindowsCookbookPackage>'

 

    Resource Declaration:

    ---------------------

    # In c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.rb

 

     26: windows_package "#{win_pkg}" do

     27:   action :install

     28:   installer_type :msi

     29:   options "quiet"

     30: end

     31:

 

    Compiled Resource:

    ------------------

    # Declared in c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.r

26:in `from_file'

 

    windows_cookbook_package("c:\windows\temp\chef-client\DbBuilder-0.0.0051-3

.msi") do

      provider Chef::Provider::WindowsCookbookPackage

      action [:install]

      retries 0

      retry_delay 2

      default_guard_interpreter :default

      declared_type :windows_package

      cookbook_name "db-mssql"

      recipe_name "install_dbbuilder"

      installer_type :msi

      options "quiet"

      package_name "c:\\windows\\temp\\chef-client\\DbBuilder-0.0.0051-339.msi

    end

 

[2015-02-22T20:22:24-05:00] INFO: Running queued delayed notifications before

-raising exception

[2015-02-22T20:22:24-05:00] INFO: Running queued delayed notifications before re

-raising exception

 

Running handlers:

[2015-02-22T20:22:24-05:00] ERROR: Running exception handlers

Running handlers complete

[2015-02-22T20:22:24-05:00] ERROR: Exception handlers complete

[2015-02-22T20:22:24-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack

trace.out

Chef Client failed. 14 resources updated in 37.360134 seconds

[2015-02-22T20:22:24-05:00] INFO: Sending resource update report (run-id: 10c432

fa-7efa-49de-8248-e91238e1a0a8)

[2015-02-22T20:22:24-05:00] FATAL: Chef::Exceptions::ValidationFailed: windows_p

ackage[c:\windows\temp\chef-client\DbBuilder-0.0.0051-339.msi] (db-mssql::instal

l_dbbuilder line 26) had an error: Chef::Exceptions::ValidationFailed: Required

argument source is missing!




Archive powered by MHonArc 2.6.16.

§