[MDEV-3863] Upgrade from 5.5.27 to 5.5.28 breaking master binlogs Created: 2012-11-16  Updated: 2014-09-03

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.28
Fix Version/s: 5.5

Type: Bug Priority: Trivial
Reporter: Frank Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: binlog, replication
Environment:

Ubuntu 12.10 AMD64 Precise
MariaDB from PPA (precise)


Attachments: File confd-extra.cnf     File my.cnf    

 Description   

We're running a multi-master setup between 2 machines where they are both a master and a slave of the other master.

When we upgraded one of the servers from 5.5.27 to 5.5.28 the binlogs were all removed which broke the replication. The file and position had to be reset its slave.

We thought this was an unlucky anomaly, but when we upgraded the other server the same thing happened again.

I couldn't find anything in the Changelog for this version so this is probably a bug then?



 Comments   
Comment by Elena Stepanova [ 2012-11-16 ]

Hi Frank,

Please provide your cnf files from the server where the problem was observed, and describe step-by-step your upgrade process.

Thank you.

Comment by Frank [ 2012-11-16 ]

Hi Elena,

I believe our my.cnf is pretty much stock, the files have been attached.
The upgrade was done via apt: "apt-get upgrade".

The packages originate from your Ubuntu Repository.

Comment by Elena Stepanova [ 2012-11-17 ]

Hi Frank,

Thanks.

Most likely your binary logs have not been removed, but still exist in /var/log/mysql/mariadb-bin.* (unless you have some kind of a cleanup process).
However, after upgrade your server started placing binary logs in another location, /var/lib/mysql, and expects to find the old ones there too.

In the main cnf file (the standard configuration) you have:

log_bin = /var/log/mysql/mariadb-bin

But in the extra.cnf file you also have

log_bin

(without a value).

Before 5.5.28, the second log_bin was ignored, and your binary logs were located in /var/log/mysql/mariadb-bin.*

However, in 5.5.28 log_bin without a value is taken into account and resets the previously configured name and location, so new binary logs are written to the default folder (datadir, /var/lib/mysql) with a default basename.

I suppose it's a side-effect of one of small changes, probably from this revision http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3533.1.2, a part about log-bin.

Technically it is not wrong (the behavior is consistent with the description of the option). Unfortunately, there is also an old issue which exists both in MySQL and MariaDB: after a location of the binlog files changes, even although the index file contains full paths to the logs, no operations on the old logs is possible, the server throws "Could not find target log" error.

So, the combination of this old problem, your configuration and the recent change causes the compatibility issue that affects your installation.

As a workaround, if you haven't fixed the current situation yet, you can move all logs into the same folder (whichever your prefer, as long as you place the correct location in the cnf file and modify the index file accordingly).

For further upgrades, you can just remove log_bin from the extra.cnf.

Comment by Elena Stepanova [ 2012-11-17 ]

Hi Kristian,

Could you please take a look at the above comment to see whether the issue can be fixed somehow for future.

Generated at Thu Feb 08 06:51:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.