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

dracut: 90zfs: respect zfs_force=1 on systemd systems #12195

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

nabijaczleweli
Copy link
Contributor

Motivation and Context

Poetterung again! Also #11403

Description

Currently on top of (old version of) #12108

How Has This Been Tested?

Excruciatingly in #11403

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the OpenZFS code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes. – none apply
  • I have run the ZFS Test Suite with this change applied. – likewise
  • All commit messages are properly formatted and contain Signed-off-by.

@nabijaczleweli nabijaczleweli changed the title dracut: 90zfs: module-setup: try /lib*/libgcc_s.so*, relax /u/l/gcc path dracut: 90zfs: respect zfs_force=1 on systemd systems Jun 4, 2021
@nabijaczleweli nabijaczleweli changed the title dracut: 90zfs: respect zfs_force=1 on systemd systems dracut: 90zfs: respect zfs_force=1 on systemd systems Jun 4, 2021
@nabijaczleweli nabijaczleweli force-pushed the suseł-but-stronger-v2 branch from b431928 to 5a9bbd5 Compare June 4, 2021 21:13
@nabijaczleweli nabijaczleweli marked this pull request as ready for review June 4, 2021 21:13
@nabijaczleweli
Copy link
Contributor Author

Rebased, g2g

@tonynguien tonynguien added the Status: Code Review Needed Ready for review and testing label Jun 7, 2021
@tonynguien tonynguien requested a review from behlendorf June 7, 2021 02:52
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11403
@nabijaczleweli nabijaczleweli force-pushed the suseł-but-stronger-v2 branch from dbdcdae to 30fd07e Compare June 9, 2021 09:29
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jun 10, 2021
@behlendorf behlendorf merged commit eec5ba1 into openzfs:master Jun 10, 2021
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 10, 2021
On systemd systems provide an environment generator in order
to respect the zfs_force=1 kernel command line option.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11403
Closes openzfs#12195
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 10, 2021
On systemd systems provide an environment generator in order
to respect the zfs_force=1 kernel command line option.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11403
Closes openzfs#12195
@mattvperry
Copy link

mattvperry commented Jun 11, 2021

I believe the addition of ${ZFS_IMPORT_OPTS} in the zfs-import-cache.service file is causing the following regression when that environment variable is empty:

Jun 11 17:23:09 carbon zpool[28085]: too many arguments
Jun 11 17:23:09 carbon zpool[28085]: usage:
Jun 11 17:23:09 carbon zpool[28085]:         import [-d dir] [-D]
Jun 11 17:23:09 carbon zpool[28085]:         import [-o mntopts] [-o property=value] ...
Jun 11 17:23:09 carbon zpool[28085]:             [-d dir | -c cachefile] [-D] [-l] [-f] [-m] [-N] [-R root] [-F [-n]] -a
Jun 11 17:23:09 carbon zpool[28085]:         import [-o mntopts] [-o property=value] ...
Jun 11 17:23:09 carbon zpool[28085]:             [-d dir | -c cachefile] [-D] [-l] [-f] [-m] [-N] [-R root] [-F [-n]]
Jun 11 17:23:09 carbon zpool[28085]:             [--rewind-to-checkpoint] <pool | id> [newpool]
Jun 11 17:23:09 carbon systemd[1]: zfs-import-cache.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

I am able to workaround this by removing ${ZFS_IMPORT_OPTS} from my unit file manually

@nabijaczleweli
Copy link
Contributor Author

Blergh, you're right. How about if you replace ${ZFS_IMPORT_OPTS} with just $ZFS_IMPORT_OPTS? I tested with the latter and mindlessly expanded to the former, but, retesting now, the former does

'import'
'-aN'
'-o'
'cachefile=none'

while the latter does

'import'
'-aN'
'-o'
'cachefile=none'
''

which is why you see it failing.

@Evernow
Copy link

Evernow commented Jun 17, 2021

This seems to have also broken zfs-import-cache for some on Fedora. Changing that alone did not help @nabijaczleweli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants