-
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
CentOS 6 init script errors #3463
Comments
@DeHackEd right so what should be happening is that we detect and use use the Fedora/Redhat wrappers. But it looks like you're CentOS 6.6 system has a |
# rpm -qif /lib/lsb/init-functions Name : redhat-lsb-core Relocations: (not relocatable) Version : 4.0 Vendor: CentOS Release : 7.el6.centos Build Date: Fri 22 Feb 2013 06:24:28 AM EST Install Date: Sun 02 Jun 2013 08:38:38 AM EDT Build Host: c6b9.bsys.dev.centos.org Group : System Environment/Base Source RPM: redhat-lsb-4.0-7.el6.centos.src.rpm Size : 22825 License: GPL Signature : RSA/SHA1, Sat 23 Feb 2013 12:38:49 PM EST, Key ID 0946fca2c105b9de Packager : CentOS BuildSystem URL : http://www.linuxfoundation.org/collaborate/workgroups/lsb Summary : LSB base libraries support for CentOS Description : The Linux Standard Base (LSB) Core Libraries Specifications define components that are required to be present on an LSB conforming system. Sounds important, but yum is allowing me to uninstall it with no significant collateral damage. |
Ok, so if CentOS have a (partial) |
Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes in dataset name in read_mtab(). Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463
I've pushed a fix for this, @DeHackEd could you take a look and test this? |
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes in dataset name in read_mtab(). * If find/awk doesn't exist but 'busybox' do, create a wrapper function. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * If find doesn't exist but 'busybox' do, create a wrapper function. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * Get rid of the 'find /dev/disk/by-*' (find is on /usr, which might not be availible). Instead use echo in a for loop. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * Get rid of the 'find /dev/disk/by-*' (find is on /usr, which might not be availible). Instead use echo in a for loop. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * Get rid of the 'find /dev/disk/by-*' (find is on /usr, which might not be availible). Instead use echo in a for loop. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * Get rid of the 'find /dev/disk/by-*' (find is on /usr, which might not be availible). Instead use echo in a for loop. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
You need to take 9012354 to heart. I applied the patch, rebuilt and reinstalled, but the scripts were not rebuilt and I ended up rebooting for nothing. I don't usually run Accounting for this, I did come across one more error. Sorry. /usr/local/etc/zfs/zfs-functions: line 378: export: `MTAB__home_dhe_.cache=atmaweapon/home/dhecache': not a valid identifier I put this on its own filesystem because this is where Firefox churns its cache and I don't want/need that snapshotted. |
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes and dots in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * Get rid of the 'find /dev/disk/by-*' (find is on /usr, which might not be availible). Instead use echo in a for loop. * Rebuild scripts if any of the *.in files changed. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
@DeHackEd Ok, new version for you to check. |
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes and dots in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * Get rid of the 'find /dev/disk/by-*' (find is on /usr, which might not be availible). Instead use echo in a for loop. * Rebuild scripts if any of the *.in files changed. * Move the sed part that filters out duplicates inside the check fo valid variable. Signed-off-by: Turbo Fredriksson [email protected] Closes openzfs#3463 Closes openzfs#3457
@DeHackEd I did merge 9012354 but it looked like we dropped that when these change were merged, and I see @FransUrbo has added it back in his patch. Interesting, I wish I'd known redhat-lsb-core existed perhaps we could have just relied on that. I haven't determine if it's related to this change but I'm encountering an odd permission denied error on boot under CentOS6.
|
* Change the order of the function library check/load. Redhat based system _can_ have a /lib/lsb/init-functions file (from the redhat-lsb-core package), but it's only partially what we can use. Instead, look for that file last, giving the script a chance to catch the 'real' distribution file. * Filter out dashes and dots in dataset name in read_mtab(). * Get rid of 'awk' entirely. This is usually in /usr, which might not be availible. * Get rid of the 'find /dev/disk/by-*' (find is on /usr, which might not be availible). Instead use echo in a for loop. * Rebuild scripts if any of the *.in files changed. * Move the sed part that filters out duplicates inside the check fo valid variable. Signed-off-by: Turbo Fredriksson [email protected] Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#3463 Closes openzfs#3457
TL;DR As a workaround for the I'm seeing this error as well. From
I'm not only getting it on boot, but also upon calling the init script:
When I call the start script specifying "sh" as the shell, it works for reasons I can't quite fathom yet:
(up to date CentOS release 6.7, zfs-0.6.5.3-1.el6.x86_64) Obviously, having to manually mount the filesystem is a show stopper for me. Never had this on Ubuntu. The So I thought, hmmm, redhatish OS, weird behavior, works on Ubuntu, sounds like SELinux. And lo and behold, If I ever find out how to solve this properly, I'll create a new issue with a pull request, but don't hold your breath for it to materialize. |
I'm experiencing the "permission denied" issue having just upgraded from ubuntu xenial to bionic (probably it was always an issue). I also upgraded from zfs-0.8.2 to 0.8.4. I guess it's due to security lable on the initscript: I'm not sure what it should be. I guess it's a nonissue on centos7 and other distros using systemd. |
For anyone else using c6, I confirmed this is fixed like so: |
So we have a bash function that doesn't exist (I couldn't find it anywhere in CentOS 6.6) and a failure when dataset names have hyphens in them.
For reference,
log_*_msg
functions are PARTIALLY defined in/lib/lsb/init-functions
on CentOS 6, but a reading ofzfs-functions
suggests that for redhat systems we actually want to use a different set of functions from/etc/[rc.d/]init.d/functions
The text was updated successfully, but these errors were encountered: