Skip to content

multipath module assumes host and target multipath are the same #2767

Description

@airtower-luna

In its install function the module calls multipath -t, with the clear assumption that the result describes the version to be installed into the initrd:

local k v
while read -r k v; do
if [[ $k == "config_dir" ]]; then
v="${v#\"}"
config_dir="${v%\"}"
break
fi
done < <(multipath -t 2> /dev/null)
[[ -d $config_dir ]] || config_dir=/etc/multipath/conf.d

This does not work with --sysroot: The multipath binary in the sysroot may be different from the one in PATH, and in case of a cross-compiled sysroot it may not be executable at all while building the initrd.

The result is used to determine the config directory, with a fallback to /etc/multipath/conf.d if unsuccessful, so it may not be critical (I'm not familiar with the module or multipath).

If possible the location should be determined without calling the binary, if this is not possible the binary in the sysroot (if any) needs to be called, with an override for cross-sysroot where that cannot work (see the busybox module for an example).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions