-
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
dracut cannot handle whitespace in a pool name #439
Comments
Now this is a bug, the pool name should not be allowed to contain white space. How this is slipping through isn't immediately obvious because there is code to detect this sort of thing. See zpool_name_valid()->pool_namecheck()->valid_char() in the source. Allowed characters are |
Pool names cannot contain spaces? Still, it'd be a good idea to quote variables in the dracut shell scripts. Better safe than sorry. Dajhorn, can you submit a fix in the form of a pull request to either my tree or Brian's? |
I confirmed that a pool with whitespace in the name can be created on both Fedora 16, Ubuntu 11.10, and OpenIndiana 151a. If this is a bug, then it is in OpenSolaris/Illumos too. |
Interesting, well it certainly still seems like a bug to me even if it is allowed by the other platforms. How do you guys want to handle this, fix the code to prevent the creation of pools with white space in their names. Or update all of the scripts/utilities to quote everything. Preventing this entirely and pushing the fix back to Illumos seems like the best fix to me. There must be a ton of 3rd party scripts which also make this assumption. |
I think the solution with the most closure is to quote all variables in On Mon, 2011-11-14 at 12:51 -0800, Brian Behlendorf wrote:
|
I agree with Rudd-O. I don't see a reason to disallow same character set for zpool names and zfs filesystem names. Not allowing space character might actually cause problems with some potential use cases. Also looking at the code, i do see where its allowing the space character: zfs_namecheck.c:valid_char() line #55. Its the last character comparison. |
In the same source file, the comment for snapshot_namecheck() gives a regex example that includes the space character, so it is probably intentional. |
OK, you've convinced me. It's intentional. If someone can provide a patch which adds the needed quoting to the relevant scripts I'm happy to pull it in. |
For consistency and safety, quote all variables in the zpool_id script. This accomodates a `-c CONFIG` parameter value with whitespace in the path name. Also fix a typo in the usage synopsis for `-h`. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#439
For consistency and safety, quote all variables in the zfs.lsb script. This protects in the unlikely case that any of the file names contain whitespace. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#439
For consistency and safety, quote all variables in the zpool_id script. This accomodates a `-c CONFIG` parameter value with whitespace in the path name. Also fix a typo in the usage synopsis for `-h`. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#439
For consistency and safety, quote all variables in the zfs.lsb script. This protects in the unlikely case that any of the file names contain whitespace. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#439
This looks stale, and it should have been fixed by 660cbad. Closing issue. |
Also add support for the "name" parameter in mutex_init(). The name allows for better diagnostics, namely in /proc/lock_stats when lock debugging is enabled. Nested mutexes are necessary to support CONFIG_PROVE_LOCKING. ZoL can use mutex_enter_nested()'s "class" argument to to convey the locking hierarchy. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Closes openzfs#439
Space is a allowed character in zfs names accoring to openzfs/zfs#439.
Space is a allowed character in zfs names accoring to openzfs/zfs#439.
…zfs#439) Add "heal" flag to "read block" request. If this flag is set, read from cache and object store. If in cache, compare contents with what's in object store, if differ then heal (overwrite) cache contents. return contents from object store. If present, replace the entry in the object cache with the data newly retrieved from S3.
…o work with Azure-Blob (openzfs#439)
A literal space character is permitted in a zpool name. For example:
Unquoted variables near
dracut/90zfs/mount-zfs.sh.in:64
like this:Get a command substitution like this:
The text was updated successfully, but these errors were encountered: