[MDEV-12697] socat dependency for sst in 10.1+ Created: 2017-05-05  Updated: 2021-09-21  Resolved: 2021-08-30

Status: Closed
Project: MariaDB Server
Component/s: Galera SST
Affects Version/s: 10.1.23, 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Andrii Nikitin (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Not a Bug Votes: 1
Labels: None

Issue Links:
Relates
relates to MDEV-13993 Transition from 'net-tools' to 'iprou... Closed
relates to MDEV-7233 Fix issue with missing dependency soc... Closed
relates to MDEV-15638 galera package should contain depende... Closed

 Description   

The problem was fixed for pre-10.1 in MDEV-7233, but it re-appear after moving galera inside server.

So, here is typical the pattern:

  • rsync - sst method is used in Galera
  • Server is upgraded to new version with mariabackup
  • mariabackup (or xtrabackup) is evaluated and is confirmed to work properly for basic backup/restore operations on single node
  • sst configuration is changed to mariabackup (or xtrabackup-v2)
  • error is observed in logs during sst 'socat is not found in path' when new sst method is used

We shall break this pattern somehow if possible



 Comments   
Comment by Sergei Golubchik [ 2017-05-05 ]

What do you mean by "mariabackup is evaluated and is confirmed to work properly" and in particular by "sst configuration is changed to mariabackup". Changed how? By some automatic post-upgrade script?

Comment by Andrii Nikitin (Inactive) [ 2017-05-05 ]

"mariabackup is evaluated and is confirmed to work properly" :
DBA tries to run backup - restore with help of mariabackup command on single node and succeeds.
"sst configuration is changed to mariabackup" :
DBA manually changes value of wsrep-sst-method from 'rsync' or 'mysqldump' to 'mariabackup' .

After that - when SST is performed - xtrabackup succeeds on donor, but transfer of data to the other node fails because of missing socat command.

Comment by Sergei Golubchik [ 2017-05-05 ]

If DBA manually changes, then DBA should manually verify that all prerequisites are present on the system.

We can have a comment in my.cnf just above the wsrep-sst-method line, with "xtrabackup method needs socat".

Comment by Andrii Nikitin (Inactive) [ 2017-05-06 ]

From technical point of view: even if we can deploy that in new my.cnf - are we are capable of injecting that line into existing configuration files (which sometimes even may be generated by third party).

I am good with conclusion that we don't formally introduce new dependency, but still insist on documenting that dependency at https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_sst_method
We can even introduce one more line there named 'Additional Dependencies' (under 'Valid Values') to be able address similar issues in future (if any).

If you approve that - I will assign this to Ian. (But if we don't introduce dependency - it is not that urgent anymore).

Comment by Sergei Golubchik [ 2017-05-06 ]

From technical point of view: even if we can deploy that in new my.cnf - are we are capable of injecting that line into existing configuration files (which sometimes even may be generated by third party).

No, of course, not. What I mean is merely

--- a/support-files/wsrep.cnf.sh
+++ b/support-files/wsrep.cnf.sh
@@ -101,6 +101,8 @@ wsrep_notify_cmd=
 ##
 
 # State Snapshot Transfer method
+# Allowed values are rsync, xtrabackup-v2, mariabackup, mysqldump
+# when using mariabackup or xtrabackup-v2, make sure you have socat installed
 wsrep_sst_method=rsync
 
 # Address which donor should send State Snapshot to.

And, of course, I agree that this should be documented in KB.

Comment by Julius Goryavsky [ 2021-05-22 ]

jplindst I think we can just close this, because all the necessary checks and intelligible diagnostics have long been added to all versions.

Comment by Jan Lindström (Inactive) [ 2021-08-30 ]

We cannot add hard requirement of socat dependency on GA-releases. I do not exactly know but maybe you could add it as "suggest" on upgrade.

Comment by Sergei Golubchik [ 2021-08-30 ]

There is nothing in the server package that requires socat. The server doesn't, none of the tools does, none of the scripts does, even wsrep_sst_mariabackup doesn't, it can use nc.

Comment by Valerii Kravchuk [ 2021-08-30 ]

Doesn't this line (https://github.com/MariaDB/server/blob/3bf42eb21bb8744b12b2b5ddb4f87425e328c36f/scripts/wsrep_sst_mariabackup.sh#L481):

tfmt=$(parse_cnf sst transferfmt 'socat')

mean that socat is used by default (inherited from https://www.percona.com/doc/percona-xtradb-cluster/LATEST/manual/xtrabackup_sst.html#transferfmt)? DBA sets nothing explicit bug SST method and ends up with the need for socat

Also what about this KB article, https://mariadb.com/kb/en/mariabackup-sst-method/:

"Note that if you use the mariabackup SST method, then you also need to have socat installed on the server. This is needed to stream the backup from the donor node to the joiner node. This is a limitation that was inherited from the xtrabackup-v2 SST method."

So, unless we change default transer format to nc, socat is mandatory for mariabackup SST method (that itself is the de-facto default one for production use).

Generated at Thu Feb 08 07:59:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.