Page MenuHomePhabricator

[nix] add logs to console while waiting for MariaDB to come up

Authored by ginsu on Mon, Sep 18, 2:00 PM.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
rCOMM0bdf8c8da1a4: [nix] add logs to console while waiting for MariaDB to come up

My nix environment got messed up when my laptop updated MacOS. @atul and I spent pretty much all day troubleshooting and at different points of the investigation were led astray since this sleep in this while loop hangs w/o giving any info to the dev. The actual issue was related to a DB corruption issue which required me to nuke my db and start from scratch. While this diff does not solve the underlying issue we hope that at the very least these logs might give any future devs who run into this issue a better idea of where to look.

In this Linear comment, @ashoat @atul and I discuss adding this log

Only in the case that issues are occurring. There's a sleep in a while loop when things are in the broken state, so it just hangs without giving the developer any useful information. If instead we did something loosely like echo "waiting for MariaDB Socket" && sleep 1 it might give the developer an idea of where to look.

Linear issue:

Test Plan


Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Mon, Sep 18, 2:00 PM
ginsu added reviewers: atul, varun, bartek.
ginsu requested review of this revision.Mon, Sep 18, 2:20 PM
82–83 ↗(On Diff #31232)

I think we should either flip these two, or drop line 80

(Avoids saying the same thing at the same time twice)

address comments. (changed log to say "Still waiting for MariaDB socket" in hopes that this is more clear/explicit)

Looks good, left comments but they're purely personal preference so feel free to land as is

80 ↗(On Diff #31239)

I would maybe cut this line altogether

82 ↗(On Diff #31239)

Maybe make this sleep 3 or sleep 5?

83 ↗(On Diff #31239)
This revision is now accepted and ready to land.Wed, Sep 20, 1:52 PM
ashoat requested changes to this revision.Wed, Sep 20, 2:30 PM

What is the point of the outer if here...?

Also I think the sleep should come after the echo

This revision now requires changes to proceed.Wed, Sep 20, 2:30 PM

simplify/address comments

This revision is now accepted and ready to land.Thu, Sep 21, 1:01 PM