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

zfs-import-cache.service fails to start (zpool import with "too many arguments") #12309

Closed
sledz opened this issue Jul 1, 2021 · 3 comments
Closed
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@sledz
Copy link

sledz commented Jul 1, 2021

System information

Type Version/Name
Distribution Name openSUSE
Distribution Version Leap 15.2
Linux Kernel 5.3.18-lp152.78-preempt
Architecture x86_64
ZFS Version 2.1.0-rc7
SPL Version 2.1.0-rc7

Describe the problem you're observing

After upgrading from 2.1.0-rc6 to 2.1.0-rc the zfs-import-cache.service fails to start because of error with zpool import.

2021-07-01T11:47:59.730330+02:00 bfg11k systemd[1]: Starting Import ZFS pools by cache file...
2021-07-01T11:47:59.739282+02:00 bfg11k zpool[24770]: too many arguments
2021-07-01T11:47:59.739665+02:00 bfg11k zpool[24770]: usage:
2021-07-01T11:47:59.739946+02:00 bfg11k zpool[24770]: #011import [-d dir] [-D]
2021-07-01T11:47:59.740299+02:00 bfg11k zpool[24770]: #011import [-o mntopts] [-o property=value] ...
2021-07-01T11:47:59.740614+02:00 bfg11k zpool[24770]: #011    [-d dir | -c cachefile] [-D] [-l] [-f] [-m] [-N] [-R root] [-F [-n]] -a
2021-07-01T11:47:59.740802+02:00 bfg11k zpool[24770]: #011import [-o mntopts] [-o property=value] ...
2021-07-01T11:47:59.740962+02:00 bfg11k zpool[24770]: #011    [-d dir | -c cachefile] [-D] [-l] [-f] [-m] [-N] [-R root] [-F [-n]]
2021-07-01T11:47:59.741167+02:00 bfg11k zpool[24770]: #011    [--rewind-to-checkpoint] <pool | id> [newpool]
2021-07-01T11:47:59.741434+02:00 bfg11k systemd[1]: zfs-import-cache.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

Describe how to reproduce the problem

Just reboot.

Include any warning/errors/backtraces from the system logs

First analysis

The update changed a code line from

ExecStart=/usr/sbin/zpool import -c /etc/zfs/zpool.cache -aN

to

ExecStart=/usr/sbin/zpool import -c /etc/zfs/zpool.cache -aN ${ZPOOL_IMPORT_OPTS}

If the ZPOOL_IMPORT_OPTS is empty the trailing space seems to lead to the mentioned problem.

So it seems to be a problem in the zpool command line parameter parsing.

@sledz sledz added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Jul 1, 2021
@sledz
Copy link
Author

sledz commented Jul 1, 2021

Seems to be cause by #12195

@nabijaczleweli
Copy link
Contributor

Fixed in 83ba91a

@sledz
Copy link
Author

sledz commented Jul 1, 2021

Great. Thanx!

@sledz sledz closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants