Exception on second client run for windows_package resource

Hi,

I have defined the following resource in my recipe:

Install the WebDeploy msi

windows_package "WebDeploy" do
source "#{Chef::Config[:file_cache_path]}/WebDeploy_amd64_en-US.msi"
end

This succeeds upon the first run, but throws an error on any subsequent
runs:

PS C:\chef\cache> chef-client
Starting Chef Client, version 12.2.1
[2015-04-02T12:22:18+02:00] INFO: *** Chef 12.2.1 ***
[2015-04-02T12:22:18+02:00] INFO: Chef-client pid: 2856
[2015-04-02T12:22:40+02:00] INFO: Run List is [role[iis]]
[2015-04-02T12:22:40+02:00] INFO: Run List expands to [bor_generic_prd_server_win::default, bor_apps_iis::default]
[2015-04-02T12:22:40+02:00] INFO: Starting Chef Run for fdnweb-dmzprd.dev.prd
[2015-04-02T12:22:40+02:00] INFO: Running start handlers
[2015-04-02T12:22:40+02:00] INFO: Start handlers complete.
[2015-04-02T12:22:40+02:00] INFO: HTTP Request Returned 404 Not Found:
resolving cookbooks for run list: ["bor_generic_prd_server_win::default", "bor_apps_iis::default"]
[2015-04-02T12:22:40+02:00] INFO: Loading cookbooks [bor_generic_prd_server_win@0.1.0, bor_apps_iis@0.1.0]
Synchronizing Cookbooks:

  • bor_generic_prd_server_win
  • bor_apps_iis
    Compiling Cookbooks...
    Converging 2 resources
    Recipe: bor_apps_iis::webdeploy
  • remote_file[c:/chef/cache/WebDeploy_amd64_en-US.msi] action create[2015-04-02T12:22:40+02:00] INFO: Processing remote_file[c:/chef/cache/WebDeploy_amd64_en-US.msi] action create (bor_apps_iis::webdeploy line 7)
    (up to date)

  • windows_package[WebDeploy] action install[2015-04-02T12:22:41+02:00] INFO: Processing windows_package[WebDeploy] act
    ion install (bor_apps_iis::webdeploy line 12)

    • No version specified, and no candidate version available for WebDeploy
      ================================================================================
      Error executing action install on resource 'windows_package[WebDeploy]'
      ================================================================================

    Chef::Exceptions::Package

    No version specified, and no candidate version available for WebDeploy

    Resource Declaration:

    In c:/chef/cache/cookbooks/bor_apps_iis/recipes/webdeploy.rb

    12: windows_package "WebDeploy" do
    13: source "#{Chef::Config[:file_cache_path]}/WebDeploy_amd64_en-US.msi"
    14: end

    Compiled Resource:

    Declared in c:/chef/cache/cookbooks/bor_apps_iis/recipes/webdeploy.rb:12:in `from_file'

    windows_package("WebDeploy") do
    action :install
    retries 0
    retry_delay 2
    default_guard_interpreter :default
    package_name "WebDeploy"
    source "c:\chef\cache\WebDeploy_amd64_en-US.msi"
    version "3.1237.1764"
    timeout 600
    returns [0]
    declared_type :windows_package
    cookbook_name "bor_apps_iis"
    recipe_name "webdeploy"
    end

[2015-04-02T12:40:59+02:00] INFO: Running queued delayed notifications before re-raising exception

Running handlers:
[2015-04-02T12:40:59+02:00] ERROR: Running exception handlers
Running handlers complete
[2015-04-02T12:40:59+02:00] ERROR: Exception handlers complete
[2015-04-02T12:40:59+02:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 96.29897 seconds
[2015-04-02T12:40:59+02:00] FATAL: Chef::Exceptions::package: windows_package[WebDeploy] (bor_apps_iis::webdeploy line 1
2) had an error: Chef::Exceptions::package: No version specified, and no candidate version available for WebDeploy

I'm not supposed to write my own guard, am I?

Thanks in advance,

Nils