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

Update gmetad.conf and add custom RRAs #22

Merged
merged 22 commits into from
Nov 3, 2014
Merged

Update gmetad.conf and add custom RRAs #22

merged 22 commits into from
Nov 3, 2014

Conversation

NoodlesNZ
Copy link
Contributor

I have updated gmetad.conf from the ganglia repo and added custom RRAs with default params. I have also changed the gmetad.conf template to remove el6 from the filename (as it's used as a common template across all supported OSes)

@@ -101,8 +113,12 @@ gridname "<%= @gridname %>"
#-------------------------------------------------------------------------------
# User gmetad will setuid to (defaults to "nobody")
# default: "nobody"
setuid_username "<%= @gmetad_user %>"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing that was accidental?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default gmetad.conf doesn't have this set. I'll add it back in for debian support though.

@@ -48,6 +48,7 @@
class ganglia::gmetad(
$clusters = [ { 'name' => 'my cluster', 'address' => 'localhost' } ],
$gridname = undef,
$rras = $ganglia::params::rras,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be nice if this was validated as an array.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was unsure how to do that, but yes I agree it should be validated. Will look into it

@jhoblitt
Copy link
Owner

Thank you for working on this!

By any chance did you test with the epel5 version? el5 may need to get it's own templates.

Any docs you could add the readme for this new feature would be helpful.

@NoodlesNZ
Copy link
Contributor Author

I haven't got a rhel5 box to play with unfortunately. Is el5 still being actively used with el6 and el7?

@NoodlesNZ
Copy link
Contributor Author

Have added some documentation on the RRAs

@NoodlesNZ
Copy link
Contributor Author

Ok, this should be ready to go apart from the array validation. What's the best way to go about that? Should I just copy the example in ganglia_validate_clusters.rb?

@NoodlesNZ
Copy link
Contributor Author

Sorry, had some issues with Ruby. Can you review and see if I've done everything correctly? I can see the validation working on my local puppet.

@NoodlesNZ
Copy link
Contributor Author

@jhoblitt is there anything else that needs to be to done to merge this?

@jhoblitt
Copy link
Owner

@NoodlesNZ It looks good skimming through it. I just need to give it a try myself (and sadly I've been swamped).

@jhoblitt
Copy link
Owner

jhoblitt commented Nov 2, 2014

I haven't forgotten about this -- I needed to get the acceptance tests back into a working state, which I just merged in PR #23.

@jhoblitt
Copy link
Owner

jhoblitt commented Nov 2, 2014

I rebased this PR on the current master (one line manifests/params.pp needs to be removed after the merge) and the acceptance tests pass on debian but fail on el6.

Passes:

BEAKER_set=debian-73-x64 ber beaker

Fails:

BEAKER_set=centos-64-x64 ber beaker

with

Failures:

  1) ganglia::gmetad class running puppet code applies the manifest twice with no stderr
     Failure/Error: apply_manifest(pp, :catch_failures => true)
     Beaker::Host::CommandFailure:
       Host 'centos-64-x64' exited with 6 running:
         env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.g4lSNF  
       Last 10 lines of output were:

        [FAILED]
        Error: /Stage[main]/Ganglia::Gmetad::Service/Service[gmetad]/ensure: change from stopped to running failed: Could not start Service[gmetad]: Execution of '/sbin/service gmetad start' returned 1: Starting GANGLIA gmetad: gmetad config file error: Missing argument to option 'case_sensitive_hostnames'

        [FAILED]
        Notice: /Stage[main]/Ganglia::Gmetad::Service/Service[gmetad]: Triggered 'refresh' from 1 events
        Notice: /Stage[main]/Ganglia::Gmetad/Anchor[ganglia::gmetad::end]: Dependency Service[gmetad] has failures: true
        Warning: /Stage[main]/Ganglia::Gmetad/Anchor[ganglia::gmetad::end]: Skipping because of failed dependencies
        Info: Creating state file /var/lib/puppet/state/state.yaml
        Notice: Finished catalog run in 51.28 seconds
     # ./spec/acceptance/gmetad_spec.rb:22:in `block (3 levels) in <top (required)>'

  2) ganglia::gmetad class Service "gmetad" should be running
     Failure/Error: it { should be_running }
       expected Service "gmetad" to be running
     # ./spec/acceptance/gmetad_spec.rb:32:in `block (3 levels) in <top (required)>'

  3) ganglia::gmetad class Service "gmetad" should be enabled
     Failure/Error: it { should be_enabled }
       expected Service "gmetad" to be enabled
     # ./spec/acceptance/gmetad_spec.rb:33:in `block (3 levels) in <top (required)>'

Are you willing to take a look?

@NoodlesNZ
Copy link
Contributor Author

I'll take a look

@NoodlesNZ
Copy link
Contributor Author

Sorry, missed adding case_sensitive_hostnames to one of the cases. Should be fine now.

@jhoblitt
Copy link
Owner

jhoblitt commented Nov 3, 2014

Great - thank you! I'm going to merge this. Let me know if want to take a stab at writing unit tests for ganglia_validate_rras() as a seperate PR or if I should take care of it when I have a chance.

@jhoblitt jhoblitt closed this Nov 3, 2014
@NoodlesNZ
Copy link
Contributor Author

I'll give it a go. I've never used ruby unit tests before, but I'll try and follow ones that you've already done.

@jhoblitt
Copy link
Owner

jhoblitt commented Nov 3, 2014

Let me know if you need any help. Rspec is easy to work with but it can
take a while to get your head around some of the magic it does behind
the scenes.

@jhoblitt jhoblitt reopened this Nov 3, 2014
jhoblitt pushed a commit that referenced this pull request Nov 3, 2014
Update gmetad.conf and add custom RRAs
@jhoblitt jhoblitt merged commit 67db493 into jhoblitt:master Nov 3, 2014
@jhoblitt
Copy link
Owner

jhoblitt commented Nov 3, 2014

That was weird -- GH closed the PR without merging it...

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