Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4202 bacula start/stop/restart buttons do not work

1.620
open
Jamie Cameron
5
2013-02-18
2013-02-18
Bozonius
No

bacula 5.2.12 on Scientific Linux 6.3 and webmin 1.620.

Bacula webmin start, stop, and restart buttons do not work with webmin 1.620, 1.610, 1.600, 1.590 (and possibly others). These buttons have no effect on the actual status of any of the 3 bacula daemons (bacula-dir, bacula-sd, bacula-fd). It appears that webmin sets the init_mode to upstart because my platform has upstart services, but does not consider the init services also on my platform. bacula is a init service, not upstart.

I can confirm this by running debugging in webmin, as well as eyeballing the code. I tried a variety of different versions of webmin all the way back to 1.590, and this behavior persists in all of them. Strangely, webmin worked correctly for bacula 5.0.0, which is the officially-supported version of bacula on SL/RH/CentOS/etc but after upgrading to bacula 5.2.12, it is not working.

Admittedly, bacula 5.2.12 RPM packaging WAS built locally, not from an officially-supported SL repo. However, there were no bugs or errors during the rpmbuild process, which followed the instructions at http://scientificlinuxforum.org/index.php?showtopic=128 for building SL RPMs. It could be that the 5.0.0 version built for SL was configured or modified somehow for SL, but this is a guess.

I found one item related to this issue of upstart v. init/systemd at https://github.com/webmin/webmin/issues/43, although it is not the exact same problem. However, I think it can be said that this issue is generally an issue with webmin architecture, possibly localized to just the bacula module, but I have not investigated that far.

[One other note, and this may have nothing to do with webmin at all. While debugging for this problem, I noticed some files in /sbin called bacula, a perl script meant to launch all 3 daemons via bacula_ctl_{sd,fd,dir} scripts in the /etc/bacula directory, and binaries called for the names of the 3 daemons. However, an rpm -qf does not reveal where these came from. I have no idea how they got put there. I saved them aside, in case they turn out to be necessary. I do not believe these have any impact on the behavior described, but it is suspicious that they were there and apparently being called by webmin. Incidentally, those bacula_ctl_* scripts appear to be for debugging purposes, not a part of the standard bacula packaging. I do not recall instaling any bacula debugging packages, but perhaps this slips my mind at this time.]

The workaround, of course, is to use the command line. Either the service(1) or direct calls to /etc/init.d/bacula_* work correctly and without incident. System startup and shutdown invoke these properly as well.

This is a kind of hybrid bug/enhancement request because, in theory, platforms should be using one initialization system or another and not mixing them. But reality being what it is, and the long periods of time that *nix* migrations can take for back-support, this request is probably within reason.

Discussion

1 2 > >> (Page 1 of 2)
  • Bozonius
    Bozonius
    2013-02-18

    No other errant or unusual behavior re bacula webmin was observed. This is the only issue encountered.

     
  • Jamie Cameron
    Jamie Cameron
    2013-02-19

    Webmin 1.620 should have fixed this issue, by checking for each action if it is an init script, upstart service or whatever.

    The only case in which I can see this failing is if both upstart and init.d actions exist for Bacula. You can test for this by running :

    initctl list | grep bacula

     
  • Bozonius
    Bozonius
    2013-02-19

    I ran the test you suggested, and it returns nothing. Actually, "initctl list" shows a list of maybe 15 or 20 services, none of which are bacula or bacula-related.

     
  • Jamie Cameron
    Jamie Cameron
    2013-02-19

    One possible fix for this is to click on the Module Config link in the Bacula module, and set the commands to start and stop bacula to run the appropriate init scripts. If you make that change, does the module behave as expected?

    Also, did you install Bacula from packages provided by Scientific Linux, or from elsewhere?

     
  • Bozonius
    Bozonius
    2013-02-19

    I don't see settings for starting and stopping bacula in the module config link in the bacula module of webmin.

    I explained the installation in the original bug description above.

     
  • Jamie Cameron
    Jamie Cameron
    2013-02-19

    Sorry, my previous comment was incorrect.

    What Webmin will try to do when starting Bacula is to look in the "Bacula configuration directory" set on the Module Config page for the "bacula" script. It then runs that like :

    /etc/bacula/bacula start

    to start all the daemons. Does that script exist on your system, and if so does it work OK?

     
  • Bozonius
    Bozonius
    2013-02-21

    It looks like the specfile for at least 2 src rpms I looked at purposely removes the "bacula" script you refer to, along with some others. Therefore, I believe I am building bacula "correctly" in the sense that the bacula src rpm packager(s) intended. It is, of course, not compatible with webmin's needs.

    Incidentally, my module config for bacula shows "/etc/bacula" not "/etc/bacula/bacula" so I am guessing that the script name is hardcoded in webmin.

    Thank you for your continued interest.

     
  • Bozonius
    Bozonius
    2013-02-21

    I can now confirm that the orignial (supported) version of bacula (5.0.0) on SL 6.3 does, in fact, install that bacula script, but not in /etc/bacula. It installs the file to /usr/sbin.

     
  • Bozonius
    Bozonius
    2013-02-21

    Using the 5.0.0 version of bacula from the repos, I have tried to use the start/stop/restart mechanism in webmin but bacula does not start.

    I seem to recall having this problem way back when I first installed webmin for bacula, and I remember somehow coming across a fix for this. I think it might have been someone on the IRC channel or something like that. I /think/ I remember someone telling me I needed to install some package to make this work right.

     
  • Jamie Cameron
    Jamie Cameron
    2013-02-21

    So Webmin should try to use /usr/bin/bacula instead of /etc/bacula/bacula , if the latter doesn't exist.

    If you run /usr/bin/bacula start , does it start all the daemons?

     
1 2 > >> (Page 1 of 2)