Merge lp:~blake-rouse/maas/fix-1584211-1.9 into lp:maas/1.9
- fix-1584211-1.9
- Merge into 1.9
Status: | Merged |
---|---|
Approved by: | Blake Rouse |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4580 |
Proposed branch: | lp:~blake-rouse/maas/fix-1584211-1.9 |
Merge into: | lp:maas/1.9 |
Diff against target: |
57 lines (+14/-7) 2 files modified
src/metadataserver/models/commissioningscript.py (+5/-3) src/metadataserver/models/tests/test_commissioningscript.py (+9/-4) |
To merge this branch: | bzr merge lp:~blake-rouse/maas/fix-1584211-1.9 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Review via email: mp+295722@code.launchpad.net |
Commit message
Exclude RAM, floppy, and loopback devices from lsblk during commissioning.
Description of the change
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~blake-rouse/maas/fix-1584211-1.9 into lp:maas/1.9 failed. Below is the output from the failed tests.
Hit http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~blake-rouse/maas/fix-1584211-1.9 into lp:maas/1.9 failed. Below is the output from the failed tests.
Hit http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~blake-rouse/maas/fix-1584211-1.9 into lp:maas/1.9 failed. Below is the output from the failed tests.
Hit http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Reading package lists...
sudo DEBIAN_
--
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~blake-rouse/maas/fix-1584211-1.9 into lp:maas/1.9 failed. Below is the output from the failed tests.
Ign http://
Get:1 http://
Hit http://
Hit http://
Hit http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Fetched 2,493 kB in 5s (466 kB/s)
Reading package lists...
sudo DEBIAN_
--...
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~blake-rouse/maas/fix-1584211-1.9 into lp:maas/1.9 failed. Below is the output from the failed tests.
Get:1 http://
Ign http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Fetched 2,493 kB in 1s (1,608 kB/s)
Reading package lists...
sudo DEBIAN_
...
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~blake-rouse/maas/fix-1584211-1.9 into lp:maas/1.9 failed. Below is the output from the failed tests.
Ign http://
Get:1 http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Fetched 2,492 kB in 1s (1,757 kB/s)
Reading package lists...
sudo DEBIAN_
...
Preview Diff
1 | === modified file 'src/metadataserver/models/commissioningscript.py' |
2 | --- src/metadataserver/models/commissioningscript.py 2016-05-10 21:35:14 +0000 |
3 | +++ src/metadataserver/models/commissioningscript.py 2016-05-25 14:33:49 +0000 |
4 | @@ -457,10 +457,12 @@ |
5 | return os.path.join(dev_disk_byid, link) |
6 | return None |
7 | |
8 | - # Grab the block devices from lsblk. |
9 | + # Grab the block devices from lsblk. Excludes RAM devices |
10 | + # (default for lsblk), floppy disks, and loopback devices. |
11 | blockdevs = [] |
12 | - block_list = check_output( |
13 | - ("lsblk", "-d", "-P", "-o", "NAME,RO,RM,MODEL,ROTA")) |
14 | + block_list = check_output(( |
15 | + "lsblk", "--exclude", "1,2,7", "-d", "-P", |
16 | + "-o", "NAME,RO,RM,MODEL,ROTA")) |
17 | for blockdev in block_list.splitlines(): |
18 | tokens = shlex.split(blockdev) |
19 | current_block = {} |
20 | |
21 | === modified file 'src/metadataserver/models/tests/test_commissioningscript.py' |
22 | --- src/metadataserver/models/tests/test_commissioningscript.py 2016-05-10 21:35:14 +0000 |
23 | +++ src/metadataserver/models/tests/test_commissioningscript.py 2016-05-25 14:33:49 +0000 |
24 | @@ -684,8 +684,9 @@ |
25 | check_output = self.patch(subprocess, "check_output") |
26 | check_output.return_value = "" |
27 | self.call_gather_physical_block_devices() |
28 | - self.assertThat(check_output, MockCalledOnceWith( |
29 | - ("lsblk", "-d", "-P", "-o", "NAME,RO,RM,MODEL,ROTA"))) |
30 | + self.assertThat(check_output, MockCalledOnceWith(( |
31 | + "lsblk", "--exclude", "1,2,7", "-d", "-P", |
32 | + "-o", "NAME,RO,RM,MODEL,ROTA"))) |
33 | |
34 | def test__returns_empty_list_when_no_disks(self): |
35 | check_output = self.patch(subprocess, "check_output") |
36 | @@ -703,7 +704,9 @@ |
37 | ] |
38 | self.call_gather_physical_block_devices() |
39 | self.assertThat(check_output, MockCallsMatch( |
40 | - call(("lsblk", "-d", "-P", "-o", "NAME,RO,RM,MODEL,ROTA")), |
41 | + call(( |
42 | + "lsblk", "--exclude", "1,2,7", "-d", "-P", |
43 | + "-o", "NAME,RO,RM,MODEL,ROTA")), |
44 | call(("udevadm", "info", "-q", "all", "-n", name)))) |
45 | |
46 | def test__returns_empty_list_when_cdrom_only(self): |
47 | @@ -733,7 +736,9 @@ |
48 | ] |
49 | self.call_gather_physical_block_devices() |
50 | self.assertThat(check_output, MockCallsMatch( |
51 | - call(("lsblk", "-d", "-P", "-o", "NAME,RO,RM,MODEL,ROTA")), |
52 | + call(( |
53 | + "lsblk", "--exclude", "1,2,7", "-d", "-P", |
54 | + "-o", "NAME,RO,RM,MODEL,ROTA")), |
55 | call(("udevadm", "info", "-q", "all", "-n", name)), |
56 | call(("blockdev", "--getsize64", "/dev/%s" % name)), |
57 | call(("blockdev", "--getbsz", "/dev/%s" % name)))) |
Self-approving backport.