Opened 19 months ago

Last modified 4 weeks ago

#9814 reopened defect

Atlas should make clear when relay details come from outdated consensus

Reported by: wfn Owned by: phw
Priority: normal Milestone:
Component: Atlas Version:
Keywords: Cc: karsten, rndm, phw, arma, nusenu@…
Actual Points: Parent ID:
Points:

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 19 months 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 19 months 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 12 months ago.
Example of an outdated relay on the results page

Download all attachments as: .zip

Change History (20)

Changed 19 months ago by wfn

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

comment:1 Changed 19 months ago by wfn

  • Owner changed from hellais to karsten
  • Status changed from new to assigned

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

comment:2 Changed 19 months ago by wfn

  • Status changed from assigned to new

comment:3 Changed 19 months ago by wfn

  • Owner changed from karsten to wfn
  • Status changed from new to assigned

comment:4 Changed 19 months 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 follow-up: Changed 19 months ago by phw

  • Status changed from assigned to needs_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 ; follow-up: Changed 19 months 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 ; follow-up: Changed 19 months 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 19 months 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 19 months ago by rndm

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

comment:9 follow-up: Changed 19 months 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 19 months 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 follow-up: Changed 19 months 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 19 months ago by phw

  • Resolution set to fixed
  • Status changed from needs_review to closed

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 12 months ago by wfn

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 12 months ago by wfn (previous) (diff)

Changed 12 months ago by wfn

Example of an outdated relay on the results page

comment:14 Changed 12 months 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 12 months ago by karsten

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

comment:16 Changed 12 months ago by phw

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

comment:17 Changed 4 weeks ago by tyseom

  • Cc nusenu@… added
Note: See TracTickets for help on using tickets.