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 ganglia is not supported on operatingsystemmajrelease 6 (CentOS) #41

Closed
NoodlesNZ opened this issue Jan 29, 2015 · 8 comments
Closed

Comments

@NoodlesNZ
Copy link
Contributor

I just noticed this when updating to release 1.4.0:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Module ganglia is not supported on operatingsystemmajrelease 6 on node web1.example.com

Seems really weird because I see CentOS version 6 in the metadata.json

@NoodlesNZ
Copy link
Contributor Author

So, I played around and it seems that this line: https://github.com/jhoblitt/puppet-ganglia/blob/master/manifests/params.pp#L65, if you change that to '6' then it works. Very strange, because this was working pre puppet 3.7.4 and/or using puppet-server

@jhoblitt
Copy link
Owner

jhoblitt commented Feb 2, 2015

Hmmm. I wonder if that's a change in puppet or in facter. Facter has been slowly changing the return type of facts away from strings.

@NoodlesNZ
Copy link
Contributor Author

Using stdlib's type() for $::operatingsystemmajrelease returns an integer, so I've not no idea. It may have something to do with puppet-server. I'm doing some more digging.

@jhoblitt
Copy link
Owner

jhoblitt commented Feb 2, 2015

I suspect $::operatingsystemmajrelease should properly be a string, so I'm OK with quoting the OS versions, but this sounds like a pretty major regression that should be reported.

@NoodlesNZ
Copy link
Contributor Author

Yup, seems to be something to do with puppet-server. If I run this with puppet apply:

case $::operatingsystemmajrelease {
  5: {
    notify{'This is 5':}
  }
  6: {
    notify{'This is 6':}
  }
  7: {
    notify{'This is 7':}
  }
  default: {
    notify{'Did not find':}
  }
}

Then it works, if I run it in site.pp via puppet-server then it falls through to the default.

@NoodlesNZ
Copy link
Contributor Author

I'll raise a bug and see what they say.

@NoodlesNZ
Copy link
Contributor Author

Ok, after talking to some of the puppet people on irc and doing some more testing it seems it was a change to future parser in 3.7.4. Although I don't like it, it seems the only way would be to quote the release numbers in the case statement. It seems to work with/without future parser.

I'll create a PR with a fix

@NoodlesNZ
Copy link
Contributor Author

Ok, PR #42 fixes this problem. Closing this off.

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

No branches or pull requests

2 participants