Skip to content

Ticket/2.7.x/10237#174

Closed
stschulte wants to merge 1 commit intopuppetlabs:2.7.xfrom
stschulte:ticket/2.7.x/10237
Closed

Ticket/2.7.x/10237#174
stschulte wants to merge 1 commit intopuppetlabs:2.7.xfrom
stschulte:ticket/2.7.x/10237

Conversation

@stschulte
Copy link
Contributor

If we specify array_matching => all for a property and the should value
is an empty array I would expect that puppet removes any possible is
value instead of ignoring the property entirely. Example taken from
issue #10237:

k5login {'/root/.k5login':
  principals => []
}

With this patch applied we do not ignore the principals property.
Instead we do remove any principal that is mentioned in
/root/.k5login (in my opinion the expected behaviour).

This change effects other types that use :array_matching => all
as well and is potentially dangerous if we have a default value
of [] somewhere. But that does not seem to be the case.

If we specify array_matching => all for a property and the should value
is an empty array I would expect that puppet removes any possible is
value instead of ignoring the property entirely. Example taken from
issue #10237:

    k5login {'/root/.k5login':
      principals => []
    }

With this patch applied we do not ignore the principals property.
Instead we do remove any principal that is mentioned in
`/root/.k5login` (in my opinion the expected behaviour).

This change effects other types that use :array_matching => all
as well and is potentially dangerous if we have a default value
of [] somewhere. But that does not seem to be the case.
@jhelwig
Copy link
Contributor

jhelwig commented Oct 23, 2011

I would also expect the behavior to be to remove any principal mentioned, but it doesn't seem like a change that should be made in a point release. I'd be a lot more comfortable if it were changed to warn in 2.7.x and moved to the new behavior in a future version, especially since this affects all types with :array_matching => :all (including custom types written by users of Puppet).

@jhelwig
Copy link
Contributor

jhelwig commented Dec 12, 2011

I think that this should be targeted no sooner than master (for release in Telly). This is a very big change in behavior to how arrays are handled for properties/parameters.

I'm closing this so it can be re-targeted at master.

@jhelwig jhelwig closed this Dec 12, 2011
hlindberg pushed a commit to hlindberg/puppet that referenced this pull request Oct 16, 2014
…rements

(#21029) 3.x masters require OpenSSL 0.9.8o+
melissa pushed a commit to melissa/puppet that referenced this pull request Mar 30, 2018
(PCP-113) Failed puppet run should return more information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants