Merge lp:~asac/phablet-tools/improve-network-bringup-console-output into lp:phablet-tools

Proposed by Alexander Sack
Status: Rejected
Rejected by: Sergio Schvezov
Proposed branch: lp:~asac/phablet-tools/improve-network-bringup-console-output
Merge into: lp:phablet-tools
Prerequisite: lp:~asac/phablet-tools/check-device-and-ip-state-after-sleep
Diff against target: 43 lines (+9/-5)
1 file modified
phablet-network-setup (+9/-5)
To merge this branch: bzr merge lp:~asac/phablet-tools/improve-network-bringup-console-output
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Sergio Schvezov Pending
Review via email: mp+176144@code.launchpad.net

This proposal supersedes a proposal from 2013-07-15.

Description of the change

Code to improve what we echo on console in network bringup code; this will also help to better parse jenkins output in the utah lab...

using my other merge for: lp:~asac/phablet-tools/check-device-ip-state-after-sleep as a base:
 + https://code.launchpad.net/~asac/phablet-tools/check-device-ip-state-after-sleep/+merge/174879

Note: inspirational code landing as I have no way to test here; feel free to redo if this fails to run etc...

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

FAILED: Continuous integration, rev:130
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/~asac/phablet-tools/improve-network-bringup-console-output/+merge/176144/+edit-commit-message

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

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

review: Needs Fixing (continuous-integration)

Unmerged revisions

130. By Alexander Sack

improve debugging output of network device and IP bringup code in phablet-network-setup

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'phablet-network-setup'
--- phablet-network-setup 2013-07-22 08:47:27 +0000
+++ phablet-network-setup 2013-07-22 08:47:27 +0000
@@ -145,30 +145,34 @@
145apt-get install --yes --quiet openssh-server iw145apt-get install --yes --quiet openssh-server iw
146EOF146EOF
147147
148 echo Installing ssh148 echo Bringing up Network device...
149 nmcli_cmd="adb $ADBOPTS shell $CHROOTCMD $CHROOTDIR/usr/bin/nmcli"149 nmcli_cmd="adb $ADBOPTS shell $CHROOTCMD $CHROOTDIR/usr/bin/nmcli"
150 wait=0150 wait=0
151 iface=$($nmcli_cmd -t -f devices con status | tr -d '\r')151 iface=$($nmcli_cmd -t -f devices con status | tr -d '\r')
152 until [ -n "$iface" ] || [ $wait -eq 10 ]; do152 until [ -n "$iface" ] || [ $wait -eq 10 ]; do
153 echo "Network not ready, sleeping"153 echo "Network device ready yet:"
154 $nmcli_cmd c list
154 sleep $(( wait++ ))155 sleep $(( wait++ ))
155 iface=$($nmcli_cmd -t -f devices con status | tr -d '\r')156 iface=$($nmcli_cmd -t -f devices con status | tr -d '\r')
156 done157 done
157 if [ -z "$iface" ]; then158 if [ -z "$iface" ]; then
158 echo "Network setup timed out"159 echo "Network device setup timed out. Bailing out!"
159 exit 1160 exit 1
160 fi161 fi
161 wait=0162 wait=0
163 echo Bringing up Network IP for \"$iface\" ...
162 ip_data=$($nmcli_cmd -t dev list iface $iface | grep ADDRESS)164 ip_data=$($nmcli_cmd -t dev list iface $iface | grep ADDRESS)
163 until [ -n "$ip_data" ] || [ $wait -eq 10 ]; do165 until [ -n "$ip_data" ] || [ $wait -eq 10 ]; do
164 echo "Network not ready, sleeping"166 echo "Network device \"$iface\" has no IP yet:"
165 sleep $(( wait++ ))167 sleep $(( wait++ ))
166 ip_data=$($nmcli_cmd -t dev list iface $iface | grep ADDRESS)168 ip_data=$($nmcli_cmd -t dev list iface $iface | grep ADDRESS)
167 done169 done
168 if [ -z "$ip_data" ]; then170 if [ -z "$ip_data" ]; then
169 echo "Network setup timed out"171 echo "Network IP setup \"$iface\" timed out. Bailing out!"
170 exit 1172 exit 1
171 fi173 fi
174
175 echo Installing ssh
172 adb $ADBOPTS push $TMP_FILE $CHROOTDIR/$TMP_FILE176 adb $ADBOPTS push $TMP_FILE $CHROOTDIR/$TMP_FILE
173 adb $ADBOPTS shell chmod 755 $CHROOTDIR/$TMP_FILE177 adb $ADBOPTS shell chmod 755 $CHROOTDIR/$TMP_FILE
174 adb $ADBOPTS shell $CHROOTCMD $CHROOTDIR/$TMP_FILE178 adb $ADBOPTS shell $CHROOTCMD $CHROOTDIR/$TMP_FILE

Subscribers

People subscribed via source and target branches