Merge lp:~qzhang/lava-dispatcher/bringup-network into lp:lava-dispatcher
Proposed by
Spring Zhang
Status: | Rejected |
---|---|
Rejected by: | Neil Williams |
Proposed branch: | lp:~qzhang/lava-dispatcher/bringup-network |
Merge into: | lp:lava-dispatcher |
Diff against target: |
43 lines (+28/-1) 1 file modified
lava/dispatcher/client.py (+28/-1) |
To merge this branch: | bzr merge lp:~qzhang/lava-dispatcher/bringup-network |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Larson (community) | Needs Fixing | ||
Review via email: mp+58278@code.launchpad.net |
Description of the change
Try to bring up the network if necessary:
1. meet a strange behavior of pexpect
2. I met timeout issue in pexpect
Will check if my pexpect library error.
Detecting if network is ok is already done by check_network_up.
To post a comment you must log in.
Unmerged revisions
- 46. By Spring Zhang
-
delete DHCP network probe up code, add a TODO for adding manual network probing up code
- 45. By Spring Zhang
-
match network interface ethX then usbX
- 44. By Spring Zhang
-
remove network checking for it can be done by caller
- 43. By Spring Zhang
-
remove simple test
- 42. By Spring Zhang
-
meet a strange behaviour of pexpect
- 41. By Spring Zhang
-
avoid private address iface like eth0:avahi after dhclient when no network
- 40. By Spring Zhang
-
add network bring up
15 + if self.board.type == "vexpress":
16 + iface_str = "usb"
vexpress is not the only board with a usb network interface. I think we can take a simpler approach to this. Search for ethX first, and use it if we find it. If not, search for usbX. Maybe do it in a bit cleaner way if possible too.
18 + self.proc.sendline( expect( ["1", "0"], timeout=5) expect( response_ str) "Ethernet interface not found") "Ethernet interfaces are not unique")
19 + "LC_ALL=C ifconfig -a | grep -i '^%s. ' | wc -l"
20 + % iface_str)
21 + id = self.proc.
22 + self.proc.
23 + # fix it, strange: id will be 1 when eth0 is found
24 + if id == 1:
25 + raise NetworkError(
26 + elif id > 1:
27 + raise NetworkError(
The 'id' returned matches which entry in the list it found, not the exact text that it found.
42 + #bring up ethernet shell_command( "ifconfig %s up" % iface, shell_command( "dhclient %s" % iface,
43 + self.run_
44 + response = response_str)
45 + self.run_
46 + response = response_str)
We don't want to bring up the network like this. DHCP is not going to be reliable for us in the long run, as we need a predictable ip address on the board. We don't even have a predictable mac address in all cases, so dhcp is not an option.