This repository was archived by the owner on Mar 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Tracing protocol is HTTP even though tempo-k8s is related to self-signed-certificates #153
Copy link
Copy link
Closed
Labels
Description
Bug Description
The tracing protocol that is expected is HTTP even though tempo-k8s is related to self-signed-certificates. Furthermore, even though we are using charm_tracing_config
, tracing is enabled but server_cert is returning None. Since tempo-k8s is using HTTPS, the mysql charm tries to export spans to tempo and fails continuously (leading to the charm getting stuck with the same hook handler - which does not return as span exporting is retrying infinitely)
To Reproduce
In k8s model:
- juju deploy cos-lite --trust --channel edge
- juju deploy tempo-k8s --channel edge
- juju integrate tempo-k8s:grafana-dashboard grafana:grafana-dashboard
- juju integrate tempo-k8s:grafana-source grafana:grafana-source
- juju integrate tempo-k8s:ingress traefik:traefik-route
- juju integrate tempo-k8s:metrics-endpoint prometheus:metrics-endpoint
- juju integrate tempo-k8s:logging loki:logging
- juju deploy self-signed-certificates
- juju integrate tempo-k8s:certificates self-signed-certificates
In lxd model:
- checkout code from Update charm tracing libs + add support for exporting traces via HTTPS mysql-operator#465
- tox -e build-production
- juju deploy -n 1 ./mysql_ubuntu-22.04-amd64.charm
- juju consume uk8s:admin/cos.tempo-k8s
- juju consume uk8s:admin/cos.self-signed-certificates
- juju integrate mysql:tracing-certificates self-signed-certificates
- juju integrate mysql tempo-k8s
Environment
juju: 3.4.3
microk8s: MicroK8s v1.27.13 revision 6744
lxd: 6.1
ubuntu 22.4.3 LTS
Relevant log output
...
unit-mysql-3: 15:55:47 WARNING unit.mysql/3.juju-log <class '__main__.MySQLOperatorCharm'>.tracing_server_ca_cert is None; sending traces over INSECURE connection.
unit-mysql-3: 15:55:47 INFO unit.mysql/3.juju-log Unit workload member-state is online with member-role primary
unit-mysql-3: 15:55:48 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 1s.
unit-mysql-3: 15:55:49 WARNING unit.mysql/3.juju-log Timeout was exceeded in force_flush().
unit-mysql-3: 15:55:49 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 2s.
unit-mysql-3: 15:55:51 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 4s.
unit-mysql-3: 15:55:55 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 8s.
unit-mysql-3: 15:56:03 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 16s.
unit-mysql-3: 15:56:19 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 32s.
unit-mysql-3: 15:56:52 INFO juju.worker.uniter.operation ran "update-status" hook (via hook dispatching script: dispatch)
unit-mysql-3: 15:56:52 WARNING unit.mysql/3.juju-log <class '__main__.MySQLOperatorCharm'>.tracing_server_ca_cert is None; sending traces over INSECURE connection.
unit-mysql-3: 15:56:53 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 1s.
unit-mysql-3: 15:56:54 WARNING unit.mysql/3.juju-log Timeout was exceeded in force_flush().
unit-mysql-3: 15:56:54 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 2s.
unit-mysql-3: 15:56:56 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 4s.
unit-mysql-3: 15:57:00 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 8s.
unit-mysql-3: 15:57:08 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 16s.
unit-mysql-3: 15:57:24 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 32s.
unit-mysql-3: 15:57:57 WARNING unit.mysql/3.juju-log <class '__main__.MySQLOperatorCharm'>.tracing_server_ca_cert is None; sending traces over INSECURE connection.
unit-mysql-3: 15:57:57 INFO unit.mysql/3.juju-log Unit workload member-state is online with member-role primary
unit-mysql-3: 15:57:58 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 1s.
unit-mysql-3: 15:57:59 WARNING unit.mysql/3.juju-log Timeout was exceeded in force_flush().
unit-mysql-3: 15:57:59 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 2s.
unit-mysql-3: 15:58:01 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 4s.
unit-mysql-3: 15:58:05 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 8s.
unit-mysql-3: 15:58:13 WARNING unit.mysql/3.juju-log Transient error Internal Server Error encountered while exporting span batch, retrying in 16s.
...
Additional context
Certificate retrieved in mysql charm:
ubuntu@juju-5ba1f4-3:~$ ls -la /var/snap/charmed-mysql/common/var/run/
total 16
drwxr-xr-x 3 snap_daemon root 4096 Jul 26 15:27 .
drwxr-xr-x 5 snap_daemon root 4096 Jul 26 15:25 ..
drwxr-xr-x 2 snap_daemon root 4096 Jul 26 15:26 mysqld
-rw-r--r-- 1 root root 1240 Jul 26 15:27 tracing-ca.crt
databag from the perspective of mysql (note that protocol type is http):
- relation-id: 19
endpoint: tracing
cross-model: true
related-endpoint: tracing
application-data:
receivers: '[{"protocol": {"name": "otlp_http", "type": "http"}, "url": "http://10.0.0.44:4318"}]'
related-units:
tempo-k8s/0:
in-scope: true
data:
egress-subnets: 10.152.183.195/32
ingress-address: 10.152.183.195
private-address: 10.152.183.195