Opened 4 years ago

Closed 6 weeks ago

#9814 closed defect (fixed)

Atlas should make clear when relay details come from outdated consensus

Reported by: wfn Owned by: metrics-team
Priority: High Milestone:
Component: Metrics/Atlas Version:
Severity: Normal Keywords:
Cc: karsten, rndm, phw, arma, nusenu@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

This is relevant to both Atlas and Globe, as far as I gather. Wasn't entirely sure whom to CC, sorry if too many recipients.

Two very much related things:

  1. Onionoo-using tools should make clear to the user when relay flags come from an outdated consensus.
  1. Onionoo-using tools should be careful using the keyword uptime, especially when relay is not running (not present in the last consensus).

Example: relay 0FB356FB... on Atlas (if the relay gets included in the newest consensus, see attached image (atlas_details_relay_running.png)). Here the problem is that Atlas (and Globe as well) may show the Running flag to be present, but show the overall relay as not running (running: false).

The latter is because the relay wasn't featured in the last consensus (as reported by Onionoo); the former is because Onionoo is returning the last known flags (from the last consensus where the relay was featured in) for this relay, among which the Running flag is present.

As Karsten said,

The flags thing is a presentation problem, not a data problem.
Onionoo should include the latest flags, but Atlas (and Globe?) should
present them in a non-confusing way. Atlas (and Globe) can learn from
last_seen when these flags were contained in a consensus.

Flags could either get some simple indication of being old / 'not fresh' (simply when running: false), and/or there could be a small field indicating where these flags are coming from ("reported by last available consensus" in green, vs. "reported by authorities at <Onionoo:last_seen> (outdated by <in_hours(Onionoo:relays_published - Onionoo:last_seen)> hours)", or somesuch.)

Likewise with the uptime keyword: I suppose that either the name for that field (which is derived from Onionoo's last_restarted) should be changed (I guess last restarted doesn't sound intuitive? It would actually make sense to me at least / would be more honest), or it should be removed when running: false.

Re: fixing this:

  • re: 1., depends on decision, but should be similarly simple.
  • haven't looked at Globe's code

Child Tickets

Attachments (3)

atlas_details_relay_running.png (71.6 KB) - added by wfn 4 years ago.
Example when Running flag present but relay not actually running; information not clear to the user / ambiguous
0001-9814-added-downtime-if-the-relay-isnt-running.patch (1.9 KB) - added by rndm 4 years ago.
Patch to display the downtime if a relay isn't running
Screenshot from 2014-04-19 00:34:27.png (36.9 KB) - added by wfn 4 years ago.
Example of an outdated relay on the results page

Download all attachments as: .zip

Change History (25)

Changed 4 years ago by wfn

Example when Running flag present but relay not actually running; information not clear to the user / ambiguous

comment:1 Changed 4 years ago by wfn

Owner: changed from hellais to karsten
Status: newassigned

Uh, not sure why hellais was made owner - sorry for any mess instantiated. :)

comment:2 Changed 4 years ago by wfn

Status: assignednew

comment:3 Changed 4 years ago by wfn

Owner: changed from karsten to wfn
Status: newassigned

comment:4 Changed 4 years ago by karsten

Owner: changed from wfn to phw

Assigned this Atlas ticket to phw and opened a Globe ticket on Globe's GitHub page. Thanks for creating this ticket!

comment:5 Changed 4 years ago by phw

Status: assignedneeds_review

These are good points. Thanks for reporting this, wfn!

I implemented fixes in the following branch:
https://gitweb.torproject.org/user/phw/atlas.git/shortlog/refs/heads/bug_9814

  1. I renamed 'Status' to 'Current Status' to make it clear that this is the information to trust.
  2. I renamed 'Uptime' to 'Last Restarted'. It certainly makes more sense than 'Uptime'. It might be better to display it unconditionally because people could be interested in it even though the relay is offline.
  3. If the relay is currently offline, 'Last Known Properties' is shown instead of 'Properties'. In that case an additional field, 'Last Seen', is shown.

What do you think?

comment:6 in reply to:  5 ; Changed 4 years ago by karsten

Replying to phw:

  1. I renamed 'Status' to 'Current Status' to make it clear that this is the information to trust.

Sounds good.

  1. I renamed 'Uptime' to 'Last Restarted'. It certainly makes more sense than 'Uptime'. It might be better to display it unconditionally because people could be interested in it even though the relay is offline.

Hmm. To me, 'last restarted' means the date and time when the relay or bridge has last been restarted, not the time that has elapsed since then.

Here's an alternative: if a relay or bridge is not running, display its 'Downtime' by subtracting last_seen from the current system time. That information might be more interesting to users than the previous uptime anyway.

  1. If the relay is currently offline, 'Last Known Properties' is shown instead of 'Properties'. In that case an additional field, 'Last Seen', is shown.

Makes sense.

Also, here's a minor remark on Git commit messages: http://git-scm.com/book/ch5-2.html#Commit-Guidelines

comment:7 in reply to:  6 ; Changed 4 years ago by phw

Replying to karsten:

Here's an alternative: if a relay or bridge is not running, display its 'Downtime' by subtracting last_seen from the current system time. That information might be more interesting to users than the previous uptime anyway.

I am unable to come up with reasonable JavaScript code to do this subtraction. If anyone with actual JavaScript knowledge can provide such code, I will finish the ticket.

Also, here's a minor remark on Git commit messages: http://git-scm.com/book/ch5-2.html#Commit-Guidelines

I reckon, you are referring to the lack of 50-character summary lines. I will keep it in mind.

comment:8 in reply to:  7 Changed 4 years ago by karsten

Replying to phw:

Replying to karsten:

Here's an alternative: if a relay or bridge is not running, display its 'Downtime' by subtracting last_seen from the current system time. That information might be more interesting to users than the previous uptime anyway.

I am unable to come up with reasonable JavaScript code to do this subtraction. If anyone with actual JavaScript knowledge can provide such code, I will finish the ticket.

I don't know enough JavaScript to write this patch either, or at least not enough to write it well. Regarding the subtraction, here's some Atlas code which looks related: https://gitweb.torproject.org/atlas.git/blob/HEAD:/js/models/relay.js#l64. Not saying that waiting for somebody who really knows JavaScript is a bad plan.

Changed 4 years ago by rndm

Patch to display the downtime if a relay isn't running

comment:9 Changed 4 years ago by rndm

Here's a patch that enables displaying the downtime if a relay isn't running. This patch is based on karsten's feedback.

If there's something wrong or missing I could try to fix that.

comment:10 in reply to:  9 Changed 4 years ago by phw

Replying to rndm:

Here's a patch that enables displaying the downtime if a relay isn't running. This patch is based on karsten's feedback.

If there's something wrong or missing I could try to fix that.

Thanks for the patch. I modified it slightly to no longer display the uptime. I pushed the newest changes to the branch bug_9814-2: https://gitweb.torproject.org/user/phw/atlas.git/shortlog/refs/heads/bug_9814-2

comment:11 Changed 4 years ago by karsten

Why did you take out the uptime of running relays/bridges? That information is still useful, isn't it?

Otherwise looks good. Want to push to master and deploy?

comment:12 in reply to:  11 Changed 4 years ago by phw

Resolution: fixed
Status: needs_reviewclosed

Replying to karsten:

Why did you take out the uptime of running relays/bridges? That information is still useful, isn't it?

It's now back in.

Otherwise looks good. Want to push to master and deploy?

Done. Thanks everyone.

comment:13 Changed 4 years ago by wfn

Resolution: fixed
Status: closedreopened

luketheduke made a good catch:

In Atlas, if the relay (or one of the relays) is not running (not in the latest consensus), it still says 'Uptime' in the relay *search results / summary* page, not 'Downtime' (as it now does in the relay *details* page.)

Example as of now: https://atlas.torproject.org/#search/00E84637B5CA2DCF847154637688E1C4693C1BDA

I guess this is trickier, since the column names are common to every row, due to the nature of a table being a table.

It did confuse at least one person, though. Should this be changed, maybe? If not, feel free to just re-close the ticket outright, of course.

If one were to change the column name to 'Last restarted' (next best thing?), note that the 82px column width will make it span too lines, which may not look so elegant, if we were to care about these things. Changing it to 85px (the margin-left of .offset1 in bootstrap css, it seems) seems to do the trick, but not sure if this does not break any other things/alignments, so didn't rush with a patch.

Last edited 4 years ago by wfn (previous) (diff)

Changed 4 years ago by wfn

Example of an outdated relay on the results page

comment:14 Changed 4 years ago by wfn

(12:39:30 AM) luketheduke: It could just gray out the uptime of a relay that isn't up?
(12:40:00 AM) luketheduke: that would be a fine indication that something is iffy

comment:15 Changed 4 years ago by karsten

For reference, here's how rndm solved this problem for Globe: #11411.

comment:16 Changed 3 years ago by phw

For the record, a duplicate of this ticket with a suggested patch was reported here: #11576.

comment:17 Changed 3 years ago by tyseom

Cc: nusenu@… added

comment:18 Changed 9 months ago by irl

Priority: MediumHigh
Severity: Normal

We need to review which parts of this still need to be fixed, but it is important to mitigate misinterpretation of the data, setting priority to High.

comment:19 Changed 6 months ago by cypherpunks

The uptime column on the search page is confusing. For both running and non-running relays the uptime is shown which makes no sense for the later. IMO the strike through isn't enough to clear up that confusion. Furthermore, the uptime of non-running relays is only shown on the search page (with the strike through) while the details page shows the downtime (which is better IMO). Finally, the online/offline dot in the first column better communicates the status of the relays than the strike through. Because of these reasons i think the uptime column should be removed from the search page.

Now on to the details pages. When a relay is running it shows the uptime which is based on the last_restarted field from Onionoo according to js/models/relay.js:180. The last_restarted field is also shown in its unparsed state further down the properties column. This is duplicate information (relative versus absolute) so i'm in favor of removing the Last Restarted field on the details page.

When a relay is non-running it shows the downtime and the last seen timestamp. The downtime is based on the last_seen field from Onionoo according to js/models/relay.js:187. This is duplicate information (relative versus absolute) so i'm in favor of removing the Last Seen field on the details page.

I'd be happy to create a patch for these changes if they are approved.

comment:20 Changed 6 months ago by cypherpunks

Owner: changed from phw to metrics-team
Status: reopenedassigned

phw is not the maintainer of atlas anymore, irl is.

comment:21 Changed 6 months ago by cypherpunks

I don't think the entire column should be removed, just remove the value for relays that are not running (instead of displaying a stricked through uptime).

comment:22 Changed 6 weeks ago by irl

Resolution: fixed
Status: assignedclosed

I believe we have actually fixed this. We have "Last Known" inserted when it's not running and we have the red/green indicators. Feel free to re-open if you disagree.

Note: See TracTickets for help on using tickets.