Merge lp:~pwlars/phablet-tools/wait-for-dns into lp:phablet-tools

Proposed by Paul Larson
Status: Rejected
Rejected by: Sergio Schvezov
Proposed branch: lp:~pwlars/phablet-tools/wait-for-dns
Merge into: lp:phablet-tools
Diff against target: 21 lines (+10/-1)
1 file modified
phablet-network-setup (+10/-1)
To merge this branch: bzr merge lp:~pwlars/phablet-tools/wait-for-dns
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Sergio Schvezov Pending
Ubuntu Phablet Team Pending
Review via email: mp+168806@code.launchpad.net

Commit message

Wait for name resolution before downloading packages

Description of the change

I've been using this and it seems to work for me so far, to help prevent
the "something wicked happened" errors when we try to apt-get update
before name resolution is completly working.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:107
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~pwlars/phablet-tools/wait-for-dns/+merge/168806/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/phablet-tools-ci/65/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-tools-saucy-amd64-ci/8
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-tools-saucy-armhf-ci/8
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-tools-saucy-i386-ci/8

Click here to trigger a rebuild:
http://s-jenkins:8080/job/phablet-tools-ci/65/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Javier Collado (javier.collado) wrote :

The changes look good.

However, I've tried a few times to run:
phablet-network-setup -i -n <wifi-file>

and still I got errors like:
System error resolving 'ports.ubuntu.com:http' - getaddrinfo (111: Connection refused)

Hence, they don't seem to be effective. Please let me know if I am missing something.

Also, since flipped images are now the default, a couple of changes are needed:
chroot -> $CHROOTCMD
/data/ubuntu -> $CHROOTDIR

Revision history for this message
Paul Larson (pwlars) wrote :

> The changes look good.
>
> However, I've tried a few times to run:
> phablet-network-setup -i -n <wifi-file>
>
> and still I got errors like:
> System error resolving 'ports.ubuntu.com:http' - getaddrinfo (111: Connection
> refused)
Yes, I've seen this a few times too. It *could* be because I don't have it also trying to resolve ports.ubuntu.com, just ppa.launchpad.net. Seems strange that it times out (or something) on one but not the other though. It's really tough to say what the root cause of the problem is until some changes get in for apt that are currently in debian-unstable. This should make it give us reasonable errors.

> Hence, they don't seem to be effective. Please let me know if I am missing
> something.
We could try adding ports.ubuntu.com to the things it has to resolve, ultimately all of this is just a workaround though.

> Also, since flipped images are now the default, a couple of changes are
> needed:
> chroot -> $CHROOTCMD
> /data/ubuntu -> $CHROOTDIR
Right, those are things that have changed since I first submitted this. If there's still interest, I can clean that up though.

Unmerged revisions

107. By Paul Larson

Wait for name resolution before downloading packages

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phablet-network-setup'
2--- phablet-network-setup 2013-05-09 20:51:59 +0000
3+++ phablet-network-setup 2013-06-11 20:40:36 +0000
4@@ -137,7 +137,16 @@
5 iface=$($nmcli_cmd -t -f devices con status | tr -d '\r')
6 sleep $(( wait++ ))
7 done
8- if [ -z "$iface" ]; then
9+
10+ pingcmd="adb $ADBOPTS shell chroot /data/ubuntu /bin/ping -c1 ppa.launchpad.net |grep PING"
11+ pingrc=$($pingcmd)
12+ wait=0
13+ until [ -n "$pingrc" ] || [ $wait -eq 10 ]; do
14+ echo "waiting for name resolution, sleeping"
15+ pingrc=$($pingcmd)
16+ sleep $(( wait++ ))
17+ done
18+ if [ -z "$iface" ] || [ -z "$pingrc" ]; then
19 echo "Network setup timed out"
20 exit 1
21 fi

Subscribers

People subscribed via source and target branches