Merge lp://staging/~wesley-wiedenmeier/curtin/1562249 into lp://staging/~curtin-dev/curtin/trunk
- 1562249
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 406 |
Proposed branch: | lp://staging/~wesley-wiedenmeier/curtin/1562249 |
Merge into: | lp://staging/~curtin-dev/curtin/trunk |
Diff against target: |
702 lines (+398/-94) 7 files modified
curtin/block/__init__.py (+63/-15) curtin/commands/block_meta.py (+58/-76) examples/tests/basic.yaml (+1/-1) examples/tests/basic_scsi.yaml (+1/-1) tests/unittests/test_block.py (+73/-0) tests/unittests/test_make_dname.py (+200/-0) tests/vmtests/test_basic.py (+2/-1) |
To merge this branch: | bzr merge lp://staging/~wesley-wiedenmeier/curtin/1562249 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Ryan Harper (community) | Needs Fixing | ||
Review via email: mp+298482@code.staging.launchpad.net |
Commit message
Description of the change
In block_meta, always use block.sys_
Note that this has not been tested yet as the hardware required is not supported by qemu
Server Team CI bot (server-team-bot) wrote : | # |
Ryan Harper (raharper) wrote : | # |
- cciss devices have a path at /dev/cciss!c0d0 as well as /dev/cciss/c0d0
Is this true for precise -> yakkety?
Otherwise, it looks good. Thanks for the unittest. Can you add a unittest for the
/dev/cciss/c0d0 case as well? What I mean is will get_blk return value
always be a cciss!c0d0 ? or would it ever return cciss/c0d0 ?
Wesley Wiedenmeier (wesley-wiedenmeier) wrote : | # |
I believe that the 'proper' address for cciss devices is in /dev/cciss/ but the /dev/cciss!c0d0 path may exist as a link created by udev rules, although I think there is a chance it may not exist on some systems. From the curtin config provided in the bug report though, it looks like MAAS is doing the right thing and giving curtin the /dev/cciss/c0d0 path instead of the /dev/cciss!c0d0 path, so it will work fine even if the /dev/cciss!c0d0 path does not exist.
The code as it stands will return the same /sys/class/block/ path whether given /dev/cciss/c0d0 or /dev/cciss!c0d0.
The unittest for cciss tests for both the /dev/cciss!c0d0 and /dev/cciss/c0d0 cases. However, some of the assumptions about device kname made elsewhere may be incorrect (block.dev_short() will not work right on /dev/cciss/c0d0) I'll go through and fix everywhere we get a disk kname
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:406
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Wesley Wiedenmeier (wesley-wiedenmeier) wrote : | # |
I fixed the issue with cciss partition knames and added a unittest. There is a new version of curtin building in my ppa right now, and I will have that copied over into trusty/
Ryan Harper (raharper) wrote : | # |
Let's see if this fixes the bug and if so, I'll pull and merge.
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:407
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Wesley Wiedenmeier (wesley-wiedenmeier) wrote : | # |
I updated the cciss fix based on the cloud-init-output log here:
http://
I believe I can write a vmtest for this by slightly modifying the environment curtin is running under, I am going to attempt that before merging, but I want to see if this passes vmtests first so I'm marking it ready for review again
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:414
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 415. By Wesley Wiedenmeier
-
For make_dname, use rule file name based on rule name not id
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:415
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 416. By Wesley Wiedenmeier
-
In block_meta.
make_dname, sanitize dname input, replacing all special chars
with a '-', so that the system does not attempt to create a link in
/dev/disk/by-dname with a special character - 417. By Wesley Wiedenmeier
-
Also allow underscore in dname
- 418. By Wesley Wiedenmeier
-
Add verification to vmtests that dnames with special chars will be sanitized
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:418
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 419. By Wesley Wiedenmeier
-
In block_meta.
make_dname, use LOG.warning instead of depricated LOG.warn, and
raise a ValueError if instructed to run on a storage config entry with a type
not supported by make_dname - 420. By Wesley Wiedenmeier
-
Added make_dname unittests
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:420
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Ryan Harper (raharper) wrote : | # |
Looks mostly good. I think we should remove a lot of the background comments in those functions, there're useful in the merge but new readers of the code wouldn't know if dev_short was used before or not.
Some more comments inline
- 421. By Wesley Wiedenmeier
-
cleaned up fixes to block and block_meta
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:421
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:421
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Wesley Wiedenmeier (wesley-wiedenmeier) wrote : | # |
Replied to some of the diff comments (forgot to save them earlier)
- 422. By Wesley Wiedenmeier
-
Merge from trunk
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:422
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:422
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Christian Ehrhardt (paelzer) wrote : | # |
Hi,
a few inline comments from reading the MP for further review.
- 423. By Wesley Wiedenmeier
-
Removed unneeded and unused call to os.path.normpath in
get_blockdev_for_partition( ) - 424. By Wesley Wiedenmeier
-
Multipath devices with partitions on them that have paths in the form
/dev/mapper/mpathX have a 'p' before their partitions. Raw dm devices that have
partitions on them must also have a 'p' before the partition number or the
naming scheme would not work, so add both to block.partition_kname - 425. By Wesley Wiedenmeier
-
Added test cases for mpath and dm devices in block.partition
_kname
Wesley Wiedenmeier (wesley-wiedenmeier) wrote : | # |
Hi,
Thanks for reviewing, I updated the mp to include the fixes you suggested.
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:425
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:425
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Ryan Harper (raharper) wrote : | # |
One failure to look at.
=======
FAIL: test_dname (vmtests.
-------
Traceback (most recent call last):
File "/home/
self.
AssertionError: 'main_disk_
-------
Ran 653 tests in 10257.701s
FAILED (failures=1)
- 426. By Wesley Wiedenmeier
-
Update name for main disk in basic_scsi.yaml to match that in basic.yaml so
that cls.disks_to_check is same between them
Wesley Wiedenmeier (wesley-wiedenmeier) wrote : | # |
I just updated the scsi test file with the modified name for the main disk, so that should pass now
Ryan Harper (raharper) wrote : | # |
Excellent! All else passed, so merging.
On Sat, Jul 30, 2016 at 5:57 PM, Wesley Wiedenmeier <
<email address hidden>> wrote:
> I just updated the scsi test file with the modified name for the main
> disk, so that should pass now
> --
> https:/
> You are reviewing the proposed merge of
> lp:~wesley-wiedenmeier/curtin/1562249 into lp:curtin.
>
PASSED: Continuous integration, rev:403 /server- team-jenkins. canonical. com/job/ curtin- ci/285/ /server- team-jenkins. canonical. com/job/ generic- update- mp/282/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /server- team-jenkins. canonical. com/job/ curtin- ci/285/ rebuild
https:/