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
cephadm: using ip instead of short hostname for prometheus urls #49836
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we find that we need a hostname-to-IP lookup, I think that we should provide that as a mgr API call so that all consumers get a consistent view of hosts-IPs (the idea of maintaining a registry of IPs-names has already been around for a while).
057ae74
to
8852f24
Compare
d6aa7a9
to
2410b3e
Compare
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe adding some tests... (integration-like, since most of the pain here can come from the network config). Mocking doesn't seem possible here since getaddrinfo() is implemented in C...
5a977e9
to
604cfa3
Compare
Fixes: https://tracker.ceph.com/issues/58548 Signed-off-by: Redouane Kachach <rkachach@redhat.com>
74be0f1
to
f56b131
Compare
Not sure if right now there're integration tests for monitoring stack. In this case we need to fire some alarm and then make sure the generated prometheus link is an IP ... |
|
Thanks for addressing my comments @rkachach !
With pure functions I find it superhelpful to use doctests, as they serve both as documentation and unit tests. Despite unfortunately these functions are not 'pure' (they heavily depend on the internal state of the network stack), I still think that is should be useful to document (in the doctstring) some sample input-outputs obtained in a real/testing environment. That helps a lot in debugging future issues or when refactoring the code. |
Very interesting lib indeed, specially as it keeps, code, dos and UT in the same file. Thanks :) BTW: I checked and we don't have integration testing specific to monitoring. We will be introducing some new tests but that would be done on a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼 Thanks @rkachach
|
11 failures, one dead job
|
|
failed/dead job reruns: https://pulpito.ceph.com/adking-2023-02-24_17:44:54-orch:cephadm-wip-adk-testing-2023-02-20-1650-distro-default-smithi/ After reruns, 3 failures and 1 dead job
Another instance of this test passed in original run so didn't bother with another rerun
Overall, nothing to block merging. Will note initial version of basic monitoring stack test passed. |
Tested with both ipv4 and ipv6 addresses, following is an example of the generated links after the change:
http://[fe80::5054:ff:fef8:982e]:9095/graph?g0.expr=up%7Bjob%3D%22ceph%22%7D+%3D%3D+0&g0.tab=1http://192.168.100.101:9095/graph?g0.expr=up%7Bjob%3D%22ceph%22%7D+%3D%3D+0&g0.tab=1Fixes: https://tracker.ceph.com/issues/58548
Signed-off-by: Redouane Kachach rkachach@redhat.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows