-
Notifications
You must be signed in to change notification settings - Fork 265
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
Ensure multiple instances may be created with the default package. #348
Conversation
Hello @surprisingb , Thank you for your contribution, but it looks like the unit tests are failing. In order to merge your PR, please fix the errors. Please let us know if you need any help. |
Hi @lionce,
but the $haproxy_unit_template parameter is undef by default, and I didn't change anything related to this. |
Hey @surprisingb , I'll have a look on this! Cheers! |
Hi @surprisingb, Could you please rebase this to the latest changes on master ? Thank you. |
I rebased my repo but the error it's still the same. |
Hi @surprisingb, After looking through the failing test, apparently this change forces the haproxy_unit_template parameter (https://github.com/puppetlabs/puppetlabs-haproxy/blob/master/manifests/instance_service.pp#L42) to become required at https://github.com/puppetlabs/puppetlabs-haproxy/blob/master/manifests/instance_service.pp#L112. So to get this working as it should could you try, as a first step, setting the haproxy_unit_template. I hope this gives you a clear track on getting the tests passing. Please feel free to reach out if you have difficulties with this. Thanks. |
Hi @carabasdaniel, I defined a default service unit template, I'm still getting an error:
Line 120 refers to I also just found this note that I didn't see before, and maybe this specific use case is what the note is referring to... What do you think? |
Hello @surprisingb , in order to fix the tests (Could not find resource 'Service[haproxy-haproxy]' in parameter 'before'), you should add a pre_condition block with service {'haproxy-#{title}': }
The error is pointing to haproxy because title is still haproxy - check this line . Cheers! |
Hello @surprisingb , Please let us know if you're still working on this PR! If you need any help don't hesitate to ask. Thanks! Cheers! |
The class won't create multiple instances if the default package is used
Add default unit template to instance service manifest.
caf3228
to
4d7d4c4
Compare
Hello @surprisingb , i've updated your branch to include latest updates from master and fixed the failing tests. Cheers! |
Codecov Report
@@ Coverage Diff @@
## master #348 +/- ##
=========================================
Coverage ? 16.66%
=========================================
Files ? 1
Lines ? 6
Branches ? 0
=========================================
Hits ? 1
Misses ? 5
Partials ? 0 Continue to review full report at Codecov.
|
In a scenario with multiple instances, the services' files won't be created if the default haproxy package is used.
The title itself MUST be different between the instances, but the package could be the same for all of them.