On Thu, Jul 31, 2008 at 11:41 AM, Schmidt, Florian <[EMAIL PROTECTED]> wrote: >> -----Ursprüngliche Nachricht----- >> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> ha.org] Im Auftrag von Serge Dubrouski >> Gesendet: Donnerstag, 31. Juli 2008 18:55 >> An: General Linux-HA mailing list >> Betreff: Re: [Linux-HA] samba lsb script >> >> On Thu, Jul 31, 2008 at 10:48 AM, Serge Dubrouski <[EMAIL PROTECTED]> wrote: >> > On Thu, Jul 31, 2008 at 10:43 AM, Schmidt, Florian >> > <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >>> -----Ursprüngliche Nachricht----- >> >>> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> >>> ha.org] Im Auftrag von Serge Dubrouski >> >>> Gesendet: Donnerstag, 31. Juli 2008 16:21 >> >>> An: General Linux-HA mailing list >> >>> Betreff: Re: [Linux-HA] samba lsb script >> >>> >> >>> On Thu, Jul 31, 2008 at 7:24 AM, Schmidt, Florian >> >>> <[EMAIL PROTECTED]> wrote: >> >>> > Hi list, >> >>> > >> >>> > Samba is part of my linux-ha and drbd setup. >> >>> > >> >>> > Because I want to store the config files at a central place, I put >> >>> > them onto a >> >>> DRBD-device. >> >>> > >> >>> > Problem is: when heartbeat starts it first triggers a monitor >> >>> > operation of all >> >>> resources. >> >>> > Because samba cannot find its config files (they are on the >> >>> > drbd-device, that >> is >> >>> not mounted yet, with a symlink from /etc/samba to /configs/samba) it >> >>> returns >> 4. >> >>> >> >>> Is Samba a part of your HA cluster? If so why do you start your >> >>> resources in that order? I'd try to make a group of IP, DRBD, >> >>> Filesystem and Samba resources in which Samba would be the last one to >> >>> start. >> >> >> >> Cause the setup is a little more complicated ;) Samba is only a minor >> >> service, >> that needs to run. >> >> >> >> I do have these constraints: >> >> <rsc_colocation id="Run_samba_only_on_Group_configs_started" >> from="samba" to="Group_configs" to_role="started" score="INFINITY"/> >> >> <rsc_order id="Start_samba_after_Group_configs" action="start" >> from="samba" type="after" to="Group_configs" to_action="start"/> >> >> <rsc_order id="Start_samba_after_Group_ftpdata" action="start" >> from="samba" type="after" to="Group_ftpdata" to_action="start"/> >> > >> > Ahhh! The problem is that Pacemaker needs to check that resource isn't >> > already up before starting it. That's where it fails. So I think that >> > your only option is a custom samba script that will return a proper >> > exit code (resource is down) if config directory isn't mounted. > > Exactely. :) > Well, uncommenting made it work and I got no further errors until now :) > > >> Could you post your log files? Still I don't get why it tries to >> start/monitor samba before Group_configs and Group_ftpdata are up. > > It does not try to start samba before they are up. It only wants to do one > monitor-action to be sure it's not started yet. I think normally the > init-script status action should not check if config-files are available but > only check if there's a pidfile and smbd/nmbd-process etc. > My log file is attached to the first mail. Around line 500 it's interesting :)
One more thing to learn about Pacemaker :-) It looks like it runs monitor/status action for all configured resources before trying to start any of those resources. Then modifying that init script is your the only option. > > Have a nice evening. You too. > Florian > > >> >> > >> >> >> >> which, in my opinion, means: wait until both Filesystems are mounted (each >> group contains on drbddisk and one Filesystem-RA) and start on that node, >> where >> the configs-filesystem is mounted, because your config-files are located >> there. >> >> >> >> But this doesn't avoid heartbeat from triggering a samba-monitoring >> >> action at >> startup, which should return, that the resource isn't running yet. Because >> the smb- >> init-script looks for its config-files and doesn't find them yet, it fails >> and return a >> wrong code. >> >> >> >> I simply commented out the 2 lines, where it checks if its config-file is >> >> at its place >> and now it is running as expected. >> >> >> >> >> >> Thanks for your advice >> >> Florian >> >> >> >> >> >>> >So heartbeat does not know how to handle this and does not start the >> resource. >> >>> > >> >>> > Does anyone have a script that handles this fine or do I have to make >> >>> > the >> init- >> >>> script more lsb-compatible? >> >>> > >> >>> > >> >>> > Regards >> >>> > Florian >> >>> > >> >>> > PS: The startup log and /etc/init.d/smb are attached. >> >>> > >> >>> > _______________________________________________ >> >>> > Linux-HA mailing list >> >>> > [email protected] >> >>> > http://lists.linux-ha.org/mailman/listinfo/linux-ha >> >>> > See also: http://linux-ha.org/ReportingProblems >> >>> > >> >>> >> >>> >> >>> >> >>> -- >> >>> Serge Dubrouski. >> >>> _______________________________________________ >> >>> Linux-HA mailing list >> >>> [email protected] >> >>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> >>> See also: http://linux-ha.org/ReportingProblems >> >> _______________________________________________ >> >> Linux-HA mailing list >> >> [email protected] >> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> >> See also: http://linux-ha.org/ReportingProblems >> >> >> > >> > >> > >> > -- >> > Serge Dubrouski. >> > >> >> >> >> -- >> Serge Dubrouski. >> _______________________________________________ >> Linux-HA mailing list >> [email protected] >> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> See also: http://linux-ha.org/ReportingProblems > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems > -- Serge Dubrouski. _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
