Page MenuHomePhabricator

wmfdata.mariadb relies on analytics-mysql being available
Open, LowPublic

Description

mariadb.connect relies on analytics-mysql to identify the database host and port number to connect to, ref mariadb.py lines 30 through 45.

By default, cron jobs on stat100* servers do not have the PATH set to include the location of analytics-mysql, and thus throw an error when trying to query the MariaDB servers. Setting the path of course solves this problem, but there might be preferable long-term solutions that take of this seamlessly.

In addition, analytics-mysql is not available on an-test-client1001, which complicates the process of testing Wmfdata.

Event Timeline

odimitrijevic moved this task from Incoming to Operational Excellence on the Analytics board.

I think I can handle this just by using an absolute reference to the file in refinery in wmfdata-python.

Otherwise, it's standard for cron jobs to run with a very limited environment that doesn't even include the defaults specified in /etc/profile (which in our case puts analytics-mysql on the PATH). I'm not sure if that can or should be changed. I suppose that's a question for Analytics 😊

nshahquinn-wmf lowered the priority of this task from High to Medium.Oct 18 2021, 8:32 PM
nshahquinn-wmf added a subscriber: odimitrijevic.

It seems like the priority isn't that high since there's a pretty easy workaround (setting the PATH in the cron job, which is a pretty normal thing to do). @odimitrijevic feel free to change it back if you disagree.

One idea is to move the logic that finds the host/port to wmfdata, and then to make refinery depend on wmfdata. Pro: it makes sense for this to belong in wmfdata, as the central place that deals with abstracting connection information from users. Con: adds dependencies to refinery.

nshahquinn-wmf lowered the priority of this task from Medium to Low.Mar 23 2022, 6:42 PM

Unclear whether or not we want this logic to live in Wmfdata-Python; it makes sense there, but that might cause problems making it widely available as a command-line tool.

Updated the description to note:

In addition, analytics-mysql is not available on an-test-client1001, which complicates the process of testing Wmfdata.

This shouldn't be assigned to me; I've never had a concrete plan to work on it.

LSobanski subscribed.

I don't believe there are any specific actions for SRE here, untagging.