Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411319 - app-backup/bacula init scripts does not kills bacula-fd and bacula-sd
Summary: app-backup/bacula init scripts does not kills bacula-fd and bacula-sd
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Beierlein
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 04:57 UTC by blackst0ne.ru
Modified: 2012-04-12 05:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description blackst0ne.ru 2012-04-09 04:57:22 UTC
'/etc/init.d/bacula-fd stop' does not kill bacula-fd.
'/etc/init.d/bacula-sd stop' does not kill bacula-sd either.

However '/etc/init.d/bacula-dir stop' does it.

The problem is in the pid files of bacula-fd and bacula-sd. They are located in /var/run/bacula/, but /etc/init.d/bacula-fd and /etc/init.d/bacula-sd look them up in /var/run directory.
The same time bacula-dir.9101.pid file is stored in /var/run directory.

If I create a symbolic link for that pids, the problem is gone:
# ln -s /var/run/bacula/bacula-fd.9102.pid /var/run/bacula-fd.9102.pid
# ln -s /var/run/bacula/bacula-sd.9102.pid /var/run/bacula-sd.9102.pid
Comment 1 Thomas Beierlein gentoo-dev 2012-04-10 10:08:31 UTC
(In reply to comment #0)
> '/etc/init.d/bacula-fd stop' does not kill bacula-fd.
> '/etc/init.d/bacula-sd stop' does not kill bacula-sd either.
> 
> However '/etc/init.d/bacula-dir stop' does it.
> 
> The problem is in the pid files of bacula-fd and bacula-sd. They are located
> in /var/run/bacula/, but /etc/init.d/bacula-fd and /etc/init.d/bacula-sd
> look them up in /var/run directory.
> The same time bacula-dir.9101.pid file is stored in /var/run directory.
> 
> If I create a symbolic link for that pids, the problem is gone:
> # ln -s /var/run/bacula/bacula-fd.9102.pid /var/run/bacula-fd.9102.pid
> # ln -s /var/run/bacula/bacula-sd.9102.pid /var/run/bacula-sd.9102.pid
Comment 2 Thomas Beierlein gentoo-dev 2012-04-10 10:08:54 UTC
Which version we are talking about?
Comment 3 blackst0ne.ru 2012-04-10 22:38:02 UTC
(In reply to comment #2)
> Which version we are talking about?

I noticed this bug on 5.2.5.
A few days ago I updated to 5.2.6.
Nothing changed.
Comment 4 Thomas Beierlein gentoo-dev 2012-04-11 06:01:27 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Which version we are talking about?
> 
> I noticed this bug on 5.2.5.
> A few days ago I updated to 5.2.6.
> Nothing changed.

I double checked the behaviour on a fresh clean install. I can not reproduce the problem. All pid files for all daemons are located in '/var/run'. Starting and stopping of each dameon works without problems.

Please check your '/etc/bacula/bacula-{sd,fd,dir}.conf files. There is a 'PidDirectory' directive in it, which points to '/var/run' after install.
Comment 5 blackst0ne.ru 2012-04-11 22:36:38 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Which version we are talking about?
> > 
> > I noticed this bug on 5.2.5.
> > A few days ago I updated to 5.2.6.
> > Nothing changed.
> 
> I double checked the behaviour on a fresh clean install. I can not reproduce
> the problem. All pid files for all daemons are located in '/var/run'.
> Starting and stopping of each dameon works without problems.
> 
> Please check your '/etc/bacula/bacula-{sd,fd,dir}.conf files. There is a
> 'PidDirectory' directive in it, which points to '/var/run' after install.


Yes, the mistake was in there. 
I had 'PidDirective' in bacula-dir.conf and 'Pid Directive' in bacula-{fd,sd}.conf
That's why I didn't find this mistake by grep 'PidDirectory'.

There is no any bug here. 
Thank you.
Comment 6 Thomas Beierlein gentoo-dev 2012-04-12 04:11:27 UTC
(In reply to comment #5)
> 
> Yes, the mistake was in there. 
> I had 'PidDirective' in bacula-dir.conf and 'Pid Directive' in
> bacula-{fd,sd}.conf
> That's why I didn't find this mistake by grep 'PidDirectory'.
> 
Ok. That is what I thought. Glad to help.
Comment 7 blackst0ne.ru 2012-04-12 04:36:25 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > 
> > Yes, the mistake was in there. 
> > I had 'PidDirective' in bacula-dir.conf and 'Pid Directive' in
> > bacula-{fd,sd}.conf
> > That's why I didn't find this mistake by grep 'PidDirectory'.
> > 
> Ok. That is what I thought. Glad to help.

What if I want to change the destination of pid file?

If I edit bacula-*.conf file, I will get an error trying to stop/restart bacula by /etc/init.d/bacula*

Why not to read the 'PidDirectory' directive before start-stop-daemon runs?
Comment 8 Thomas Beierlein gentoo-dev 2012-04-12 05:02:07 UTC
(In reply to comment #7)
> (In reply to comment #6)
> 
> What if I want to change the destination of pid file?
> 
> If I edit bacula-*.conf file, I will get an error trying to stop/restart
> bacula by /etc/init.d/bacula*
> 

If you want to differ from the normal ebuild settings, than just adapt the path where the init-scripts are looking for the pid files too. But I see no reason to support this from our side.