Bug 257939 - databases/mariadb105-server: wsrep_sst_mariabackup broken since 10.5.11
Summary: databases/mariadb105-server: wsrep_sst_mariabackup broken since 10.5.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bernard Spil
URL: https://jira.mariadb.org/browse/MDEV-...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-19 09:31 UTC by Eirik Oeverby
Modified: 2023-04-10 12:17 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eirik Oeverby 2021-08-19 09:31:15 UTC
We are using MariaDB in a Galera Cluster setup, and the 10.5.10 to 
10.5.11 upgrade brought huge changes to the wsrep_sst_common and 
wsrep_sst_mariabackup scripts. These changes make them entirely 
FreeBSD-incompatible. The most important changes (to us) are
  - reliance on --tmpdir option to mktemp
  - is_local_ip always returns true in a jail

The former makes the SST script fail because of invalid option. 
This is easily (and probably compatible with Linux) fixed by removing 
the --tmpdir option and rather prefixing mktemp with 'TMPDIR=$tmpdir ;' 
inside the same $() around line 935 of wsrep_sst_mariabackup:
   < xtmpdir=$(mktemp '-d' --tmpdir "$tmpdir")
   > xtmpdir=$(TMPDIR="$tmpdir" ; mktemp '-d')

The latter I had to hack by removing the commonname option passed to 
socat on line 387 of the same file:
   < CN_option='localhost'
   > CN_option=''

This is obviously not a fix, as I don't fully understand what's going on 
- but I did not have more time to spend on this as our cluster was down :(

Anything you can do to help bring attention to this from upstream? It's 
really broken that they're making linux-ism assumptions all over the 
place.. And the change set between these two releases seems pretty big 
in these scripts.

Alternatively, patches need to be put in place in the port itself, though I imagine this is a less desirable option long-term.
Comment 1 Eirik Oeverby 2021-08-19 09:52:14 UTC
Raised upstream as
https://jira.mariadb.org/browse/MDEV-26441
but I'm not confident it'll get fixed any time soon.
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2023-04-10 12:17:13 UTC
Is this sufficiently addressed by https://jira.mariadb.org/browse/MDEV-26360?

Perhaps create another PR for the common-name issue?