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

module rewrite #126

Merged
merged 1 commit into from
Jan 6, 2014
Merged

module rewrite #126

merged 1 commit into from
Jan 6, 2014

Conversation

jlambert121
Copy link
Contributor

I wanted to add the ability to disable the dashboard service and resolve some dependency issues and ended up with a large number of conditionals which get hard to maintain and tend to go against recommended suggestions on how to use puppet. I have tried to keep breaking changes to a minimum.

Breaking changes I know of:
$server => true no longer also enables the dashboard and api service. These are now controlled by their own parameters.
Many (all that can be?) parameters are now validated. Shouldn't break anything, but I may have missed an option

Changes:
All 4 sensu services are now controlled by their own config/service class
Parameters validated
Sensu must be installed from the main class. Any attempt to call private classes will fail. This allows not having to pass parameters to sub classes for consistent results.

I am running this in my environment without any issues (or changes between the old and new module), but I would like some other people to take a look at this as well.

This should resolve #123, #124,

@jamtur01
Copy link
Contributor

jamtur01 commented Jan 6, 2014

Looks like some test failures beyond the other errored out 1.8.7 failures

@jlambert121
Copy link
Contributor Author

Fixed, rebased into the original commit. Thoughts on the path?

@jamtur01
Copy link
Contributor

jamtur01 commented Jan 6, 2014

I think it seems a lot more sane. +1 from my perspective.

jamtur01 added a commit that referenced this pull request Jan 6, 2014
@jamtur01 jamtur01 merged commit e90104f into sensu:master Jan 6, 2014
@jamtur01
Copy link
Contributor

jamtur01 commented Jan 6, 2014

Okay - I think this should just be merged. It's a lot better than the previous version.

Thanks @jlambert121 👍

@jlambert121
Copy link
Contributor Author

I think this should bump a major version though because I expect it to break someone's config and it isn't 100% backward compatible ($api and $dashboard).

@codec
Copy link

codec commented Jan 7, 2014

@fadenb 👍 - this breaks our wrapper module for sensu :(

For example: Do classes like sensu::repo::apt really have to be "private"? We inherit this so we can override apt::source parameters (providing our own in-house mirrors, etc).

@jlambert121
Copy link
Contributor Author

With the rewrite I can add an apt_source and yum_source to the main module. The reason I made them fail at the individual module level is parameters are no longer being passed to individual classes but referenced from the main class. If someone overrides a param in only one subclass you could get inconsistent results.

I need to do a fix for this today anyway - str2bool(Boolean) is only available in stdlib 4.0 and the latest PE only runs 3.2.0.

@jlambert121
Copy link
Contributor Author

@fadenb @codec I added a repo_source parameter to the main class in #130, does that meet your needs?

When this module is ready to release again it is going to be a major version bump (1.0.0) because there are some breaking changes in it. The two I'm aware of are if you're directly overriding parameters at a subclass (if any aren't available in the main class to do what you need that's a bug) and the addition of the api and dashboard parameter rather than rolling those into server.

@codec
Copy link

codec commented Jan 8, 2014

@jlambert121 That should work out for us - now we can databind all necessary parameters, thanks...

I'm still not sure how I feel about this "pattern" ... 👎

@jlambert121
Copy link
Contributor Author

Glad that works for you. What do you mean by "pattern" and what is bothering you?

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.

Adding/removing a standalone check to a node does not cause the sensu-client service to reload
4 participants