Summary: | sys-fs/ocfs2-tools-1.6.4 init scripts not working on kernel 3.X | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marek Królikowski <admin> |
Component: | New packages | Assignee: | Gentoo Cluster Team <cluster> |
Status: | RESOLVED WONTFIX | ||
Severity: | major | CC: | cluster, phattanon, treecleaner |
Priority: | Normal | Keywords: | PMASKED |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | Pending removal: 2018-02-04 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 538730 | ||
Attachments: | Strace from /etc/init.d/ocfs2 start |
Description
Marek Królikowski
2011-11-11 23:46:18 UTC
Created attachment 292239 [details]
Strace from /etc/init.d/ocfs2 start
I dont see any problems here. alexxy@c-3-7 ~ $ rc-status -a | grep ocfs2 ocfs2 [ started ] alexxy@c-3-7 ~ $ alexxy@c-3-7 ~ $ uname -a Linux c-3-7 3.1.0-gentoo-r1 #2 SMP Wed Nov 9 19:38:47 MSK 2011 x86_64 AMD Opteron(tm) Processor 6174 AuthenticAMD GNU/Linux alexxy@c-3-7 ~ $ mount | grep ocfs2 none on /sys/kernel/dlm type ocfs2_dlmfs (rw) /dev/sdb on /home type ocfs2 (rw,_netdev,heartbeat=local) That interesting how work for You... Look this is debug mode: POCZTA2 ~ # /etc/init.d/ocfs2 -d start + _conf_d=/etc/init.d/../conf.d [CUT] + return 1 + egrep -q '\s*ocfs2\s*$' /proc/filesystems + egrep -q '\s*ocfs2_dlmfs\s*$' /proc/filesystems + return 1 + return 1 + exit 1 * ERROR: ocfs2 failed to start Who ever write this init.d script do amazing bad work. Look at this: POCZTA2 ~ # /etc/init.d/ocfs2 -d stop [CUT] + local ret + ebegin 'Unmounting OCFS2 filesystems' * Unmounting OCFS2 filesystems ... ++ umount -art ocfs2 + '[' -z '' ']' + ret=0 + eend 0 'Failed to simply unmount filesystems' This is AMAZING epic i can`t STOP service because i don`t have mounted OCFS filesystem... With full respect but why this script don`t check cat /proc/mount |grep ocfs2 If YES umount & stop service If NO just stop service... sorry o don`t give everything: So: POCZTA2 ~ # /etc/init.d/ocfs2 stop * Unmounting OCFS2 filesystems [ ok ] POCZTA2 ~ # cat /sys/kernel/config/cluster/PLK/reconnect_delay_ms 2000 POCZTA2 ~ # /etc/init.d/ocfs2 stop * WARNING: ocfs2 is already stopped but ofc like You see still started - script say OK but it`s not OK because he can`t umount filesystem because i don`t mount any ocfs filesystems.... same issue with kernel 2.6.32 The failure is in the check_modules function of the /etc/init.d/ocfs2 script. The first line of code check_modules_config "ocfs2_dlmfs ocfs2 ocfs2_dlm ocfs2_nodemanager" "OCFS2_FS OCFS2_FS_O2CB" && check_modules_config configfs CONFIGFS_FS && return 0 is always failing, probably because the checked modules don't always exists, i suspect ocfs2_dlm (can find in 2.6.32 with lsmod) or in ls -l /sys/module then the grep check is sucessful, but as this is only a check to echo a "helpful" message the function fails silently and the init script breaks. just comment out the "check_modules" call in the init script and see the script start sucessfully (supossing it would have done it manually, if something else is broken then it will not start :) ) IMHO the check_module function must be debugged and rewritten, so that it works as it should. I just noticed, that the 1.4 init script uses "modprobe -l" to check if the module exists / is loaded, this is a working approach and does detect modules that are not detected with the current approach in check_modules_config (ls of sys/module and looking at the config.gz), the current approach doesn't work if the config.gz is not generated, or for modules that do not register in /sys/module (e.g ocfs2_dlm) Just for the doc this is the old check code (version 1.4) check_modules() { local MODULES="ocfs2_dlmfs ocfs2 ocfs2_dlm ocfs2_nodemanager configfs" local MODULE local MODPROBE="modprobe -l" local retval=0 for MODULE in ${MODULES}; do if [ -z "`${MODPROBE} ${MODULE}`" ] ; then retval=1 fi done if [ ${retval} -eq 1 ] ; then ewarn "One or more required modules are not loaded." ewarn "Make sure you have " ewarn " - placed ocfs, dlmfs and configfs into /etc/modules.autoload.d/kernel-2.6" ewarn "For a (in)complete documentation, read /usr/share/doc/ocfs-<version>/INSTALL.GENTOO.gz" fi return ${retval} } Removed from the tree |