Open Saviq opened 6 years ago
Does it stay in blocked state after a relation with kapacitor is made?
I noticed that you are using the influxdb-13 charm by influxdb charmers. We had some issues with that charm and that is why we check if a relation is made with cs:~chris.macnaughton/influxdb-7. Fixing this relation issue of influxdb-api would fix our issue as well to connect to the influxdb-13 charm
Just to confirm, yes it still gets stuck:
$ juju status
Model Controller Cloud/Region Version SLA
default serwer.dom localhost/localhost 2.3.1 unsupported
App Version Status Scale Charm Store Rev OS Notes
chronograf blocked 1 chronograf jujucharms 1 ubuntu
grafana active 1 grafana jujucharms 11 ubuntu
influxdb active 1 influxdb jujucharms 13 ubuntu
juju-gui unknown 1 juju-gui jujucharms 142 ubuntu
kapacitor blocked 1 kapacitor jujucharms 1 ubuntu
Unit Workload Agent Machine Public address Ports Message
chronograf/2* blocked idle 5 10.146.87.35 Please create a relation with InfluxDB.
grafana/0* active idle 0 10.146.87.127 3000/tcp Started grafana-server
influxdb/0* active idle 1 10.146.87.37 8083/tcp,8086/tcp
juju-gui/0* unknown idle 2 10.146.87.197 80/tcp,443/tcp
kapacitor/0* blocked idle 6 10.146.87.69 Waiting for relation with InfluxDB
Machine State DNS Inst id Series AZ Message
0 started 10.146.87.127 juju-9080a0-0 xenial Running
1 started 10.146.87.37 juju-9080a0-1 xenial Running
2 started 10.146.87.197 juju-9080a0-2 xenial Running
5 started 10.146.87.35 juju-9080a0-5 xenial Running
6 started 10.146.87.69 juju-9080a0-6 xenial Running
Relation provider Requirer Interface Type Message
influxdb:grafana-source grafana:grafana-source grafana-source regular
influxdb:query chronograf:influxdb influxdb-api regular
influxdb:query kapacitor:influxdb influxdb-api regular
kapacitor:kapacitor chronograf:kapacitor kapacitor regular
Then it is because the configure on the provides side is not set properly. The only solution i see at the moment is using chris his charm or waiting for the interface changes and a new build of the charmhelpers influxdb charm.
Can you please point at where this relation version check is done?
When I'm running debug-hooks in the chronograf and influxdb charm i get no errors in chronograf, bu tI get the following error in influxdb:
root@juju-98196d-0:/var/lib/juju/agents/unit-influxdb-0/charm# hooks/query-relation-joined
Traceback (most recent call last):
File "hooks/query-relation-joined", line 19, in <module>
main()
File "/var/lib/juju/agents/unit-influxdb-0/.venv/lib/python3.5/site-packages/charms/reactive/__init__.py", line 72, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-influxdb-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 375, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-influxdb-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 351, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-influxdb-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 173, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-influxdb-0/charm/reactive/influxdb.py", line 261, in query_available
query.configure(port=port)
TypeError: configure() missing 2 required positional arguments: 'username' and 'password'
This means that the relation info is never properly set so the state that influxdb is available is never set is well. This is because of the issue you mentioned in the influxdb-api interface. And because the state is never set, chronograf will not know if influxdb is available. The influxdb charm will get in error state but in the next update-status, no relation conversation will be found so the charm will get back to ready state. The juju status will tell you that the relation is set but one side got into error state en did not trigger the other side properly.
performing relation-get
in the chronograf charm, only gives me the IP, which means that no relation information has been set.
root@juju-98196d-1:/var/lib/juju/agents/unit-chronograf-0/charm# relation-get
private-address: 10.142.0.5
I monkey-patched the issue locally here by applying the patch above, so the relation is made:
$ relation-get
egress-subnets: 10.146.87.37/32
hostname: 10.146.87.37
ingress-address: 10.146.87.37
port: "8086"
private-address: 10.146.87.37
Well, since the influxdb charm is not providing a username or password, We should add a check if those are provided or not in chronograf. Since we are trying to get the username and password from that relation. That is the reason why we are currently only working with chris his influxdb charm. I gave it the enhancement label and in the next charm release we will have a look at how to integrate this with the charmhelpers influxdb.
The chronograf charm is permanently blocked regardless of having related it to influxdb:
NB: it also suffers from an influxdb-api relateion issue, so requires monkey-patching the influxdb charm.
See
debug-log
here.