Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Bacula fails after F17 upgrade if using MySql for catalog|
|Product:||[Fedora] Fedora||Reporter:||Martin <msmith999999>|
|Component:||bacula||Assignee:||Andreas Thienemann <andreas>|
|Status:||CLOSED NOTABUG||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||17||CC:||andreas, fschwarz, hhorak, limburgher, lnykryn, negativo17, paul, vanmeeuwen+fedora|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2012-06-03 11:05:31 EDT||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Martin 2012-06-03 09:49:34 EDT
Description of problem: Bacula director seems to fail to start on F17 if it was configured to use MySql on F16. It appears to be trying to connect to Postgres though the bacula configuration file has not changed. Version-Release number of selected component (if applicable): bacula 5.2.6-2.fc17 How reproducible: Only tried it on my bacula host Steps to Reproduce: 1. Configure bacula on F16 using mysql 2. Upgrade to F17 Actual results: Bacula director exits logging messages that it could not open the catalog database, referencing line dird.c:959 postgresql.c:248 unable to connect to postgres server. Example: Jun 3 14:39:20 zen systemd: Unit bacula-dir.service entered failed state. Jun 3 14:39:50 zen bacula-dir: bacula-dir: dird.c:954 Could not open Catalog "MyCatalog", database "bacula". Jun 3 14:39:50 zen bacula-dir: bacula-dir: dird.c:959 postgresql.c:248 Unable to connect to PostgreSQL server. Database=bacula User=bacula Jun 3 14:39:50 zen bacula-dir: Possible causes: SQL server not running; password incorrect; max_connections exceeded. Jun 3 14:39:50 zen bacula-dir: 03-Jun 14:39 bacula-dir ERROR TERMINATION Jun 3 14:39:50 zen bacula-dir: Please correct configuration file: /etc/bacula/bacula-dir.conf Jun 3 14:39:50 zen systemd: bacula-dir.service: main process exited, code=exited, status=1 Expected results: Director to start correctly using its configured mysql server as it always has. Postgres is not running on this machine and never has been. Backups were running correctly immediately before the F17 upgrade. Additional Info: Specifying the mysql driver explicitly in the config file with dbdriver="dbi:mysql"; ..... does not help.
Comment 1 Paul Howarth 2012-06-03 10:25:54 EDT
Are your "alternatives" settings right? # alternatives --display bacula-dir
Comment 2 Martin 2012-06-03 10:34:39 EDT
Hmmm. That doesn't display anything. Does bacula use alternatives? I can't see evidence of this in the systemd unit. It just execs /usr/sbin/bacula-dir The packaging has definitely changed from F16 though so you could be right. What would I configure?
Comment 3 Paul Howarth 2012-06-03 10:39:41 EDT
Ah yes, I seem to remember the packaging may have changed for F-17 and it's just the backend library that needs handling now (see README.Fedora from the bacula-common docs area): # alternatives --display libbaccats.so
Comment 4 Simone Caronni 2012-06-03 10:47:07 EDT
Hello, Bacula has changed drastically regarding backend and libraries from 5.0x (f16) to 5.2.x (f17). Database backends are now handled by a single library and that is what is needed to manage the catalog. Just type: # alternatives --config libbaccats.so and choose your library backends; no changes are required in the config files. Regards, --Simone
Comment 5 Martin 2012-06-03 10:48:16 EDT
Ok, that appears to be it. It seems to pick postgres regardless of which director rpm was installed in f16. I also had to run the db upgrade script from v12 to 14 manually after setting the alternative. The director is now up. Thanks for the help!
Comment 6 Simone Caronni 2012-06-08 04:22:55 EDT
I'm building now the package in Koji for 5.2.7, when it is available in updates-testing please bear the following: The symlink library name has changed because we discovered a bug during version upgrades. Please issue the following before upgrading: alternatives --remove /usr/lib64/libbaccats-mysql-5.2.6.so alternatives --remove /usr/lib64/libbaccats-sqlite3-5.2.6.so alternatives --remove /usr/lib64/libbaccats-postgresql-5.2.6.so And then set again your preference database with: # alternatives --config libbaccats.so There are 3 programs which provide 'libbaccats.so'. Selection Command ----------------------------------------------- 1 /usr/lib64/libbaccats-mysql.so + 2 /usr/lib64/libbaccats-sqlite3.so * 3 /usr/lib64/libbaccats-postgresql.so Enter to keep the current selection[+], or type selection number: