admin/nagios user setup fails on cs:influxdb-14

Bug #1772911 reported by Gareth Woolridge
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
InfluxDB Charm
Fix Released
Critical
Unassigned

Bug Description

cs:influxdb-13 (latest yesterday) successfully created the admin influxdb user and dropped the creds in /root/.influx-auth. Also when related to nrpe the charm successfully created the nagios user dropping the creds in /var/lib/nagios/.influx-auth

The recent release of cs:influxdb-14 to the charmstore seems to have caused a regression here where the users and auth files do not get created causing mojo deployments to fail on verification:

2018-05-23 08:48:36 [ERROR] 1 FAIL on influxdb/0:
+ /usr/local/lib/nagios/plugins/check_influxdb.py
error authorizing query: create admin user first or disable authentication
CRITICAL: Exception while attempting to check InfluxDB
Traceback (most recent call last):
File "/usr/local/lib/nagios/plugins/check_influxdb.py", line 29, in <module>
output = subprocess.check_output(cmd)
File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['influx', '-execute', 'show diagnostics', '-format', 'json']' returned non-zero exit status 1
2018-05-23 08:48:36 [ERROR] Nagios checks failed

Related branches

description: updated
Revision history for this message
Tom Haddon (mthaddon) wrote :

We should publish the previous version of the charm as cs:influxdb-15 until we can get this fixed, unless the fix is very quick.

Changed in influxdb-charm:
assignee: nobody → Haw Loeung (hloeung)
status: New → Confirmed
importance: Undecided → Critical
Haw Loeung (hloeung)
Changed in influxdb-charm:
status: Confirmed → In Progress
Haw Loeung (hloeung)
Changed in influxdb-charm:
status: In Progress → Fix Released
Revision history for this message
Jamon Camisso (jamon) wrote :

Seeing this bug again intermittently. I tested it a few times across Trusty, Xenial, and Bionic and managed to trigger it (somehow) on Trusty & Xenial. It seems like some kind of race, because changing a config option and resolving the errored unit appears to generate the file.

Revision history for this message
Haw Loeung (hloeung) wrote :

It's probably to do with PPA or install source unavailable at the time. Any chance you could post snippet of your juju unit logs?

Revision history for this message
Tom Haddon (mthaddon) wrote :

Indeed, I see the following in the charm logs:

2018-07-09 20:20:42 [ERROR] 2018-07-09 20:18:21 INFO juju-log maintenance: Updating apt cache
[...]
2018-07-09 20:20:21 DEBUG install Err:5 https://repos.influxdata.com/ubuntu bionic InRelease
2018-07-09 20:20:21 DEBUG install Connection timed out after 120001 milliseconds
2018-07-09 20:20:24 DEBUG install Reading package lists...
2018-07-09 20:20:24 DEBUG install W: Failed to fetch https://repos.influxdata.com/ubuntu/dists/bionic/InRelease Connection timed out after 120001 milliseconds
2018-07-09 20:20:24 DEBUG install W: Some index files failed to download. They have been ignored, or old ones used instead.

Jamon Camisso (jamon)
Changed in influxdb-charm:
status: Fix Released → Confirmed
Haw Loeung (hloeung)
Changed in influxdb-charm:
assignee: Haw Loeung (hloeung) → nobody
Revision history for this message
Tom Haddon (mthaddon) wrote :

I believe this is actually related to https://bugs.launchpad.net/influxdb-charm/+bug/1781177. Even with the above message fixed (which was due to environment restrictions on access to repos.influxdata.com) we're still seeing issues on install - setting a model to retry hooks will make it succeed, but that's obviously not ideal.

Revision history for this message
Tom Haddon (mthaddon) wrote :

This should now be fixed as part of lp#1781177. Will mark as fix released.

Changed in influxdb-charm:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.