-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
"mount -l -a" Will prompt for multiple passphrases at once #8762
Comments
Not that this is really anything major, but just to follow up: This issue exists in the final (non-RC) 0.8.0 release as well. |
ill take a look at this tomorrow. |
I had some time and looked into this a bit further. This appears to be happening because A simple fix would be to assume that, if the zfs_foreach_mountpoint(g_zfs, cb.cb_handles, cb.cb_used,
- share_mount_one_cb, &share_mount_state, op == OP_MOUNT);
+ share_mount_one_cb, &share_mount_state, op == OP_MOUNT && !(flags & MS_CRYPT)); |
@Rain Yeah, I agree this is the problem and that might be the best solution. However, if you have a system that only has Update: I just spoke to @behlendorf and we agreed to go with your solution. If people wish to get the full mounting performance they can use |
Currently, 'zfs mount -a' will always attempt to parallelize work related to mounting as best it can. Unforunately, when the user passes the '-l' option to load keys, this causes all threads to prompt the user for their keys at once, resulting in a confusing and racy user experience. This patch simply disables parallel mounting when using the '-l' flag. Fixes: openzfs#8762 Signed-off-by: Tom Caputi <tcaputi@datto.com>
@tcaputi No need to attribute me; thanks though! |
Currently, 'zfs mount -a' will always attempt to parallelize work related to mounting as best it can. Unfortunately, when the user passes the '-l' option to load keys, this causes all threads to prompt the user for their keys at once, resulting in a confusing and racy user experience. This patch simply disables parallel mounting when using the '-l' flag. Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #8762 Closes #8811
Currently, 'zfs mount -a' will always attempt to parallelize work related to mounting as best it can. Unfortunately, when the user passes the '-l' option to load keys, this causes all threads to prompt the user for their keys at once, resulting in a confusing and racy user experience. This patch simply disables parallel mounting when using the '-l' flag. Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#8762 Closes openzfs#8811
Currently, 'zfs mount -a' will always attempt to parallelize work related to mounting as best it can. Unfortunately, when the user passes the '-l' option to load keys, this causes all threads to prompt the user for their keys at once, resulting in a confusing and racy user experience. This patch simply disables parallel mounting when using the '-l' flag. Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#8762 Closes openzfs#8811
System information
Describe the problem you're observing
zfs mount -l -a
will prompt for the passphrase of multiple encrypted filesystems at the same time. This seems to be a bug; it's confusing and can lead to passphrases being printed on the terminal while being typed.When there are multiple encrypted filesystems with passphrase prompts,
zfs mount -l -a
should prompt for the passphrase for each filesystem separately and one-after-another.zfs load-key -a
functions this way and prompts for the passphrases individually.Describe how to reproduce the problem
Note the two "Enter passphrase for..." messages printed on top of one another. If the passphrase for
tank/fs2
is entered correctly (followed by pressing Enter), everything seems to hang.tank/fs2
was actually unlocked and the process is actually waiting for the passphrase fortank/fs1
. If the passphrase fortank/fs1
is then entered it will be displayed as typed in theterminal.
This also occurs if there are multiple zpools that have encrypted root filesystems.
Include any warning/errors/backtraces from the system logs
(Not applicable)
The text was updated successfully, but these errors were encountered: