Bug #6710
Relationship syntax should work with title arrays
| Status: | Closed | Start date: | 03/14/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | parser | |||
| Target version: | 2.7.12 | |||
| Affected Puppet version: | 2.6.0 | Branch: | ||
| Keywords: | relationship array title | |||
| Votes: | 2 |
Description
Impact Data¶
Reported by JJM working on my own projects, no known paying customers have been impacted by this issue.
Overview¶
The new Puppet 2.6 relationship syntax does not appear to work when titles are specified as an array.
Expected Behavior¶
Using the relationship syntax among declared resources should establish a relationship from former to the latter when using titles for arrays. When title arrays are used in both the left and right side of the relationship declaration, a many-to-many relationship is expected among the resources.
For example:
notify { [ left_one, left_two ]: } -> notify { [ right_one, right_two ]: }
right_one should require both left_one and left_two right_two should require both left_one and left_two
Actual Behavior¶
The title array is condensed into a string value and an unknown resource error is returned.
Steps to Reproduce¶
An acceptance test will be added once a ticket number is available.
Related issues
History
Updated by Jeff McCune about 1 year ago
Added acceptance test in commit https://github.com/puppetlabs/puppet-acceptance/commit/e17d46abf14bab98d8806b819133eda6319fafef
Updated by Ben Hughes about 1 year ago
- Status changed from Unreviewed to Investigating
Are you working on this and tracking it Jeff or just reporting it and making the test?
Updated by Dominic Maraglia about 1 year ago
- Target version set to 4
Acceptance test added and working (failing as expected).
I am setting the target as “unplanned” for the moment. Bugs will unknown fix targets need to have the acceptance test moved to “pending/” to prevent Hudson from mailing error reports for known errors.
Updated by Bruno Leon 10 months ago
This does not work with single values on left side either:
define a ()
{}
define b (
$list
) {
A[$list] -> B[$name]
}
a{'1':}
a{'2':}
a{'3':}
b{'test':
list => ['1','2','3','4']
}
Could not find resource ‘A[1]A[2]A[3]A[4]’ for relationship on ‘B[test]’
Updated by James Turnbull 9 months ago
- Target version deleted (
4)
Updated by Nick Lewis 5 months ago
- Status changed from Investigating to Accepted
- Assignee set to Nick Lewis
- Target version set to 2.7.x
Updated by Nick Lewis 5 months ago
- Status changed from Accepted to In Topic Branch Pending Review
A fix for this is available as pull request 271. Also added support for variables, strings, case statements, selectors, or array/hash access.
Updated by Daniel Pittman 4 months ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
- Target version changed from 2.7.x to 2.7.11
Updated by Matthaus Litteken 3 months ago
- Status changed from Merged - Pending Release to Closed
- Target version changed from 2.7.11 to 2.7.12
Released in 2.7.12rc1