Multipath curthook can't be disabled

Bug #2037123 reported by Matthew Steele
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

Taken from detect_and_handle_multipath in

/snap/subiquity/5097/lib/python3.10/site-packages/curtin/commands/curthooks.py:

-------

def detect_and_handle_multipath(cfg, target, osfamily=DISTROS.debian):
    DEFAULT_MULTIPATH_PACKAGES = {
        DISTROS.debian: ['multipath-tools-boot'],
        DISTROS.redhat: ['device-mapper-multipath'],
        DISTROS.suse: ['multipath-tools'],
    }
    if osfamily not in DEFAULT_MULTIPATH_PACKAGES:
        raise ValueError(
                'No multipath package mapping for distro: %s' % osfamily)

    mpcfg = cfg.get('multipath', {})
    mpmode = mpcfg.get('mode', 'auto') <-------------I
    mppkgs = mpcfg.get('packages',
                       DEFAULT_MULTIPATH_PACKAGES.get(osfamily))
    mpbindings = mpcfg.get('overwrite_bindings', True)

    if isinstance(mppkgs, str):
        mppkgs = [mppkgs]

    if mpmode == 'disabled': <--------------
        return

    mp_device = block.detect_multipath(target)
    LOG.info('Multipath detection found: %s', mp_device)
    if mpmode == 'auto' and not mp_device:
        return

--------

As I read this, it means that the hook will terminate if the value of multipath/mode is 'disabled', and will assign that value to 'auto' if the setting isn't detected.

Multipath appears as a top-level config key in the Curtin documentation, but I am not able to get it to be read into /var/log/installer/curtin-install/subiquity-curthooks.conf (where I assume it is being loaded), no matter where I put it in my user-data file.

Is it intended to be able to disable multipath in this fashion for autoinstall?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

It has generally not been a goal so far to allow customization of all aspects of the curtin config subiquity creates. Perhaps there should be...

Revision history for this message
Matthew Steele (msteele68) wrote :

If the hook was a curtin addition or just future-proofing, that would be understandable. I just wanted to make sure that I wasn't missing the way to do it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.