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

Monitoring doesn't work on OnMetal servers without manually set hostname #15

Open
erulabs opened this issue Apr 16, 2015 · 1 comment
Open

Comments

@erulabs
Copy link

erulabs commented Apr 16, 2015

Hello friends!

Thanks for the excellent cookbook! I love it!

It looks like there is an issue when working with Rackspace OnMetal servers. The error comes from the function which generates the systems hostname: https://github.com/rackspace-cookbooks/rackspace_cloud_monitoring/blob/master/libraries/helpers.rb#L60

OnMetal has no such attribute node['cloud']['public_ipv4'] - so a manually set target_hostname needs to be assigned.

I'll play around a bit and try to find a better solution. I'd think "node.name" would suffice, but I'm not sure if that hostname needs to be an FQDN or not. If I can find a solution, I'll issue a nice PR for ya'll as I am interested in helping contribute to this repo!

Edit: It looks like OnMetal has simply node['ipaddress'] 👍

Thanks!

@jujugrrr
Copy link
Contributor

@erulabs Thanks for the feedback!

The scope is quite reduced so far, and only pure cloud is supported. If you submit a PR with the appropriate tests it would be awesome. Otherwise I'll try to to find time or resource to work on it.

If you start to look at the code you'll see some assumptions are made in order to reduce complexity (like this "there is always a public_ipv4"). Hopefully there is enough test to refactor the libraries to make it support more thing, or be more flexible!

The fix should be pretty easy, as we just need to fallback yo ipaddress from what you say. We can even add an onmetal context in specs as this public_ipv4 attribute is created in Chefspec : https://github.com/rackspace-cookbooks/rackspace_cloud_monitoring/blob/master/test/unit/spec/spec_helper.rb#L15

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