Closed
Bug 1289178
Opened 9 years ago
Closed 8 years ago
add update or insert to __heartbeat__ check for admin
Categories
(Release Engineering Graveyard :: Applications: Balrog (backend), defect)
Release Engineering Graveyard
Applications: Balrog (backend)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bhearsum, Assigned: jlorenzo, Mentored)
References
Details
(Whiteboard: [lang=python][good first bug])
Attachments
(1 file)
During a push to prod today, we hit an issue with the admin box where we got 502 gateway errors when trying to make changes. It turned out that the db credentials were read-only due to some human error. Benson suggested that we add an update or insert to the __heartbeat__ endpoint to make sure this type of error can be caught by monitoring systems.
Seems like it shouldn't be tough to do this. We'd either want some special rule or release that is reserved for this purpose, or perhaps a separate table that isn't part of normal operations.
Reporter | ||
Updated•8 years ago
|
Mentor: bhearsum
Reporter | ||
Updated•8 years ago
|
Whiteboard: [lang=python][good first bug]
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jlorenzo
Assignee | ||
Comment 1•8 years ago
|
||
Like discussed over IRC, no permission is checked for the dockerflow table. We actually either insert one (and only one) entry if the table is empty or update the entry.
Tests were added for the Dockerflow DAO class. Existing for the REST endpoints were updated.
The special case for read-only clients is done by giving a handler to create_docker_endpoints. I documented its API to explain the context a little bit more.
Attachment #8786323 -
Flags: review?(bhearsum)
Reporter | ||
Comment 2•8 years ago
|
||
Comment on attachment 8786323 [details] [review]
PR
r=me with the minor issue noted in the PR fixed.
Attachment #8786323 -
Flags: review?(bhearsum) → review+
Comment 3•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/balrog
https://github.com/mozilla/balrog/commit/6665c581392046c9cbcd452592bb282be5d5b3e7
Bug 1289178 - add update or insert to __heartbeat__ check for admin (#112)
* Make __heartbeat__ either update or insert the first entry of the Dockerflow table
* However, web keeps counting rule due to read-only access
Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 4•8 years ago
|
||
Johan, Benson suggested a small improvement to make it easier for us to verify that things are working:
(In reply to Benson Wong [:mostlygeek] from comment #2)
> The stage dockerflow table has the value: "19".
> I think it would be ok to have __heartbeat__ simply return the value it
> wrote to the database. We really only monitor on the HTTP response status
> code. Anything other than 200 results in an alert.
Do you want to do that?
Flags: needinfo?(jlorenzo)
Assignee | ||
Comment 5•8 years ago
|
||
Done in https://github.com/mozilla/balrog/pull/116. I'm not sure if it's worth to open a new bug for that.
Flags: needinfo?(jlorenzo)
Comment 6•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/balrog
https://github.com/mozilla/balrog/commit/a09fd8ebd1f9df402966682a634eb3c729a3c72a
bug 1289178: Make __heartbeat__ return the value fetched in database (#116). r=bhearsum
Updated•5 years ago
|
Product: Release Engineering → Release Engineering Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•