Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

95resume: Do not resume on iSCSI #329

Merged
merged 1 commit into from Aug 4, 2020
Merged

Conversation

danimo
Copy link
Contributor

@danimo danimo commented Dec 15, 2017

The iSCSI configuration is started after dracut checks for resume,
so we run into a timeout here. Additionally it's questionable if
resume on iSCSI makes sense (or is even supported on the platform),
so disable it for now.

References: bsc#999663

Signed-off-by: Hannes Reinecke hare@suse.com

@centos-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@danimo
Copy link
Contributor Author

danimo commented Dec 17, 2017

@centos-ci ok to test

@danimo
Copy link
Contributor Author

danimo commented Dec 17, 2017

@haraldh Can you give me the magic power to trigger CI runs?

@haraldh
Copy link
Collaborator

haraldh commented Dec 18, 2017

@danimo you now have the power :) May the force be with you :)

@haraldh haraldh closed this Dec 18, 2017
@haraldh haraldh reopened this Dec 18, 2017
@haraldh
Copy link
Collaborator

haraldh commented Dec 18, 2017

@centos-ci ok to test

@haraldh
Copy link
Collaborator

haraldh commented Dec 18, 2017

What, if the swap partition is local?

@danimo
Copy link
Contributor Author

danimo commented Jan 8, 2018

Back from vacation.

Fair point. Is there a reliable way to tell if all swap storage is truly local?

@haraldh
Copy link
Collaborator

haraldh commented Jan 8, 2018

Wouldn't it be better to just tell the user not to place resume=<path to iSCSI partition> on the kernel command line?

@haraldh
Copy link
Collaborator

haraldh commented Jan 8, 2018

Ah, Suse is compiling that in the initramfs. So the resume dracut module should skip network block devices.

@danimo
Copy link
Contributor Author

danimo commented Jan 8, 2018

Does dracut already have a function to drill down && check for the type of the underlying block device?

@haraldh
Copy link
Collaborator

haraldh commented Jan 8, 2018

Nothing globally yet.

modules.d/95iscsi/module-setup.sh has for example:

    is_iscsi() {
        local _dev=$1

        [[ -L "/sys/dev/block/$_dev" ]] || return
        cd "$(readlink -f "/sys/dev/block/$_dev")"
        until [[ -d sys || -d iscsi_session ]]; do
            cd ..
        done
        [[ -d iscsi_session ]]
    }

modules.d/95nbd/module-setup.sh has:

   is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;}

@danimo
Copy link
Contributor Author

danimo commented Jan 9, 2018

Any suggestion on how to avoid code dupes? {iscsi,nbd}-lib.sh will not work, as they cannot be sourced from the module-setup.sh that installs them.

@haraldh
Copy link
Collaborator

haraldh commented Jan 9, 2018

well, put those functions in dracut-functions.sh, create a function block_is_netdevice(), which calls all tests for network devices and use that.

@haraldh
Copy link
Collaborator

haraldh commented Jul 5, 2018

will you or should I?

@dustymabe
Copy link
Contributor

this looks related to #480 - can someone confirm?

@haraldh
Copy link
Collaborator

haraldh commented Oct 21, 2019

@danimo ping

@haraldh
Copy link
Collaborator

haraldh commented Mar 6, 2020

please rebase

@danimo
Copy link
Contributor Author

danimo commented Mar 6, 2020

Done. But the swap_on_netdevice check should probably also be hostonly, right?

@haraldh
Copy link
Collaborator

haraldh commented Mar 9, 2020

Done. But the swap_on_netdevice check should probably also be hostonly, right?

correct

@danimo
Copy link
Contributor Author

danimo commented Mar 9, 2020

Done.

@Conan-Kudo
Copy link
Member

@danimo It looks good, but can you rebase on current master?

The iSCSI configuration is started after dracut checks for resume,
so we run into a timeout here. Additionally it's questionable if
resume on iSCSI makes sense (or is even supported on the platform).

Same holds true for Network Block Devices and FcOE, cover those as well

References: bsc#999663

Original-patch-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Daniel Molkentin <daniel.molkentin@suse.com>
@danimo
Copy link
Contributor Author

danimo commented Aug 4, 2020

@Conan-Kudo done.

@danimo danimo merged commit 480aa96 into dracutdevs:master Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants