Skip to content

iis_config errors on collection properties #425

@habelson

Description

@habelson

Cookbook version

6.8.0

Chef-client version

14.0.202

Platform Details

Windows Server 2016

Scenario:

When setting a property that that can have more than one of the same section, iis_config succeeds on first run, but fails on subsequent runs.

Steps to Reproduce:

iis_config '/section:applicationPools -+"applicationPoolDefaults.recycling.periodicRestart.schedule.[value=\'01:00:00\']" /commit:apphost' do
  action :set
end

Expected Result:

chef-client run succeeds on subsequent runs

Actual Result:

chef-client succeeds on first run, but fails on subsequent runs:

ERROR ( message:New add object missing required attributes. Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to '01:00:00' . )

###Comments:
I'm aware this issue is related to #276 and that there is current work in progress to replace this feature with something better. I just wanted to make you aware of this edge case, in case it also comes up in the new code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions