-
Notifications
You must be signed in to change notification settings - Fork 35
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
[OSPRH-11692] node_exporter scrapeconfig must include full fqdn instead #535
[OSPRH-11692] node_exporter scrapeconfig must include full fqdn instead #535
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlarriba The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
IP: fmt.Sprintf("%s:%d", node.IP, telemetryv1.DefaultNodeExporterPort), | ||
Hostname: node.Hostname, | ||
IP: fmt.Sprintf("%s:%d", node.IP, telemetryv1.DefaultNodeExporterPort), | ||
FQDN: node.FQDN, |
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.
can we have both
what i think would be reasonable for wathcer to do is check the fqdn and fallback to the host name if not found.
in nova/openstack depending on how you configure things the HOST filed can be a hostname or a fqdn so having both i think is more correct.
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.
there is a lot of overhead per added label so it is preferable to avoid it if we can.
if we really need to we can generate hostname from fqdn
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.
(for clarification)... so @SeanMooney is your concern about watcher's view of the cluster i.e. how watcher will know the compute nodes if it will be by hostname or fqdn.
so if we go this way it means that we would require fqdn to be used in the watcher node.hostname . Again though we could tolerate it if watcher only has hostname, we'd need to process the fqdn to extract it.
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.
my concern is makeing sure we do not require FQDNs for watcher to work as that is not a reasonable requirement for upstream watcher given nova does not require that and until a few years ago technically did not support FQDNs, triple start using them before nova officially supported them...
i guess its ok for the operator to use fqdns provided we support both in watcher, we can detect ti the nova names are a host name or not and just match on the first label of the fqdn if we have a host name so i guess this is ok as it is.
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.
But having both will add an extra label to ALL metrics coming from node_exporter. We don't think it is worth.
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.
right that why i said i thinkits ok to just have fqdn provided watcher can work with or without fqdns on the nova side.
in our devstack jobs we should be testing with just hostname and in our operator jobs we can test with FQDNs.
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.
ack on your concern @SeanMooney i had the same feeling when updating the data source last night, especially when writing the docstring for the def _build_prometheus_host_instance_map(self):
https://review.opendev.org/c/openstack/watcher/+/934423/7/watcher/decision_engine/datasources/prometheus.py#66
This relies on a custom 'fqdn' label added to Prometheus scrape_configs.
It felt wrong that we made the assumption that watcher will have fqdn in its node.hostname ... but yeah i think we can tolerate it by extracting the hostname from fqdn and letting watcher work with both ... just added a comment at https://review.opendev.org/c/openstack/watcher/+/934423/comment/d4299ddf_564ef3ba/ and we have a sync call today so lets talk more there
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.
also forgot to add THANK YOU @jlarriba++ for jumping on this so quickly and getting this in for .04 feature freeze
/lgtm |
dc0d610
into
openstack-k8s-operators:main
/cherry-pick 18.0-fr1 |
@jlarriba: #535 failed to apply on top of branch "18.0-fr1":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cherry-pick 18.0-fr1 |
@jlarriba: new pull request created: #541 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
of hostname
This creates a ScrapeConfig.staticConfigs section like this