← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~raharper/curtin:fix/device-mapper-mpath-is-not-symlink into curtin:master

 

Review: Approve

A couple of inline improvements requested, but those can follow after the RC change lands.

Diff comments:

> diff --git a/curtin/commands/block_meta.py b/curtin/commands/block_meta.py
> index 7fbd89f..5849e3d 100644
> --- a/curtin/commands/block_meta.py
> +++ b/curtin/commands/block_meta.py
> @@ -910,8 +910,12 @@ def partition_handler(info, storage_config):
>          if multipath.is_mpath_device(disk):
>              udevadm_settle()  # allow partition creation to happen
>              # update device mapper table mapping to mpathX-partN
> -            util.subp(['kpartx', '-v', '-a', '-s', '-p', '-part', disk])
>              part_path = disk + "-part%s" % partnumber
> +            # sometimes multipath lib creates a block device instead of

I'd like to see "sometimes" expanded to concrete cases where this happens.

> +            # a udev symlink, remove this and allow kpartx to create it
> +            if os.path.exists(part_path) and not os.path.islink(part_path):
> +                util.del_file(part_path)
> +            util.subp(['kpartx', '-v', '-a', '-s', '-p', '-part', disk])

Should we check that part_path has been created by this call, and warn (or fail?) if not?

>          else:
>              part_path = block.dev_path(block.partition_kname(disk_kname,
>                                                               partnumber))


-- 
https://code.launchpad.net/~raharper/curtin/+git/curtin/+merge/382776
Your team curtin developers is subscribed to branch curtin:master.


References