Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for declaring multiple selinux::module types #40

Merged
merged 1 commit into from
May 26, 2015
Merged

Bug fix for declaring multiple selinux::module types #40

merged 1 commit into from
May 26, 2015

Conversation

apatik
Copy link

@apatik apatik commented May 21, 2015

Hello Mr. Fryman

I recently began using trying out this module, and ran into a peculiar issue. When I try to have two selinux::module declarations get applied to the same host (which should be possible, seeing as how it's a defined type), I get catalog cycle dependency errors. Having multiple selinux::module types defined in such a way that one is dependent on the other (such as having them in separate profile manifests where other contents of the profile require ordering at the role manifest level) appears to be the trigger for the issue. Having read the type definition and thinking about it a bit, I believe the root issue is the way you used tags in the file declarations. While it's a neat trick to work around not knowing if you'll have a .mod file declaration ahead of time, you don't have anything unique in the tag names. As such, when you use the collector to chain resources, the tag search doesn't distinguish between file declarations from this instance of the defined type and other instances of it in the catalog. My proposed workaround is to replace 'selinux-module-build' and 'selinux-module' with 'selinux-module-build-${name}' and 'selinux-module-${name}', respectively. I've tested this method out, and it appears to resolve the issue, without changing anything external or breaking anything (meaning this can be a simple bugfix version release semantically). I'm open to suggestions about how else to handle this, if there's a more preferable way.

…g cycle errors when used in different manifests that had an ordering set between them
@jfryman
Copy link
Contributor

jfryman commented May 26, 2015

Works for me! Thanks for the code!

jfryman added a commit that referenced this pull request May 26, 2015
Bug fix for declaring multiple selinux::module types
@jfryman jfryman merged commit ecd30ff into voxpupuli:master May 26, 2015
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