#18989 closed defect (fixed)

Remove broken country image for relays that don't have a "country" entry

Reported by: alenan Owned by: irl
Priority: Medium Milestone:
Component: Metrics/Relay Search Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


As it looks,
lativa has currently no image icon. See at: https://atlas.torproject.org/#details/7884A5CD96F3EBDDD56A5894D9563250103BB140

Child Tickets

Change History (12)

comment:1 Changed 23 months ago by arma

Component: User Experience/WebsiteMetrics/Atlas
Owner: changed from Sebastian to phw

In fact, it appears to be trying to embed an image with the url https://atlas.torproject.org/img/cc/.png

comment:2 Changed 23 months ago by karsten

Component: Metrics/AtlasMetrics/Onionoo

Actually, this is a bug/edge case in Onionoo. It reports "country":"" for that relay even though the Onionoo spec says "Omitted if the relay IP address could not be found in the GeoIP database." And while this relay's IP address is contained in the GeoIP file, it's not specified with a country:,6255148,458258,,0,0,,47.0000,8.0000

Onionoo should simply leave out the country field in this case, just like it doesn't include a country name, region name, or city name. I wrote a patch that I'm testing locally and that I'll apply as soon as it works as expected.

comment:3 Changed 23 months ago by karsten

Component: Metrics/OnionooMetrics/Atlas

Okay, the Onionoo bug is now fixed in the sense that there is no "country" field for this relay anymore. But Atlas still wants to display this flag as img/cc/.png which obviously doesn't exist. This needs fixing, too. Making this an Atlas ticket again.

comment:4 Changed 22 months ago by twim

Okay, the Onionoo bug is now fixed in the sense that there is no "country" field for this relay anymore.

How it had been fixed? There's also a relay without "country" somehow [1] (and ASN also) while others from the same AS do have this field [2]. It seems to be the same bug.

[1] https://onionoo.torproject.org/details?search=041DDC5D9760D2EFF0450B46FF030C3986D54493
[2] https://onionoo.torproject.org/details?search=9634197516DA0EA4ECB83E7DC4960D832039D209

comment:5 Changed 22 months ago by karsten

The first relay you mention above (041DDC5D) does not only lack a "country" field but also all other GeoIP-related fields. That looks like a bug. But I don't (yet) see how that's related to the earlier fix here, because that only affected the "country" field, not the others. I suggest we move the discussion of that new bug to #19154 and leave this ticket for the Atlas bug of wanting to display img/cc/.png.

comment:6 Changed 22 months ago by karsten

For the record, here are the two details documents which might not be available anymore in a week from now:

"relays_published":"2016-05-24 12:00:00",
{"nickname":"oleedrom","fingerprint":"041DDC5D9760D2EFF0450B46FF030C3986D54493","or_addresses":[""],"dir_address":"","last_seen":"2016-05-21 09:00:00","last_changed_address_or_port":"2016-05-18 14:00:00","first_seen":"2016-05-18 14:00:00","running":false,"flags":["Fast","Running","V2Dir","Valid"],"consensus_weight":260,"host_name":"","last_restarted":"2016-05-20 22:49:25","bandwidth_rate":1073741824,"bandwidth_burst":1073741824,"observed_bandwidth":2202971,"advertised_bandwidth":2202971,"exit_policy":["reject *:*"],"exit_policy_summary":{"reject":["1-65535"]},"platform":"Tor on OpenBSD","recommended_version":true,"measured":true}
"bridges_published":"2016-05-24 11:44:30",

"relays_published":"2016-05-24 12:00:00",
{"nickname":"sayonar","fingerprint":"9634197516DA0EA4ECB83E7DC4960D832039D209","or_addresses":[""],"last_seen":"2016-05-24 13:00:00","last_changed_address_or_port":"2016-05-20 00:00:00","first_seen":"2016-05-15 01:00:00","running":true,"flags":["Fast","Running","Valid"],"country":"ru","country_name":"Russia","latitude":55.75,"longitude":37.6166,"as_number":"AS35598","as_name":"INETCOM LLC","consensus_weight":390,"host_name":"","last_restarted":"2016-05-23 18:43:52","bandwidth_rate":1073741824,"bandwidth_burst":1073741824,"observed_bandwidth":742679,"advertised_bandwidth":742679,"exit_policy":["reject *:*"],"exit_policy_summary":{"reject":["1-65535"]},"platform":"Tor on Linux","consensus_weight_fraction":9.708045E-6,"guard_probability":0.0,"middle_probability":2.5208281E-5,"exit_probability":0.0,"recommended_version":true,"measured":true}
"bridges_published":"2016-05-24 11:44:30",

comment:7 Changed 15 months ago by karsten

I just looked at this ticket again and believe that the only bug that remains is that Atlas shouldn't display the non-existent image file "img/cc/.png" when a relay doesn't have a "country" field. Apparently, this already works in the results table which contains just <td></td> when there's no country flag to display. But the details page tries to put in <dd><img class="inline country" title="" src="img/cc/.png"></dd> which does not exist.

Here's how to reproduce this issue: Run this Onionoo query, scroll down to the first match that doesn't contain a "country" (most do contain one), search for that fingerprint into Atlas, observe how there's no country flag in the results table and broken image on the details page.

Once this Atlas bug is fixed, this ticket can be closed, TTBOMK.

comment:8 Changed 15 months ago by karsten

Summary: No Country image for LativaRemove broken country image for relays that don't have a "country" entry

comment:9 Changed 14 months ago by RaBe

Owner: changed from phw to RaBe
Status: newassigned

comment:11 Changed 14 months ago by RaBe

Status: assignedneeds_review

comment:12 Changed 14 months ago by irl

Resolution: fixed
Status: needs_reviewclosed

LGTM. Merged.

Note: See TracTickets for help on using tickets.