Network connectivity check pings network location, not hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-center (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The Ubuntu Software Center attempts to ping the repository host on startup to check for internet connectivity (when NetworkManager is not present). However, the software-center uses the complete network location (urlparse's netloc) as the ping destination - which causes problems if the location contains a port component (or basic authentication).
For example, our repository url is http://
Log output:
INFO - Attempting one time ping of apt.mr.lan:3142 to test if internet connectivity exists.
The following patch uses urlparse's hostname instead of netloc (also attached):
--- netstatus.py.org 2012-08-03 05:27:37.913582505 +0000
+++ netstatus.py 2012-08-03 05:44:54.645406601 +0000
@@ -145,7 +145,7 @@
else:
# get a host to ping
- host = urlparse(
+ host = urlparse(
msg = ("Attempting one time ping of %s to test if internet "
After applying patch:
INFO - Attempting one time ping of apt.mr.lan to test if internet connectivity exists.
== OS and package versions ==
# lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04
# apt-cache policy software-center
software-center:
Installed: 5.2.4
Candidate: 5.2.4
The attachment "Substitute netloc with hostname" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]