docker image relies on init.ok, that is deleted when SST is triggered

Bug #1632695 reported by Miguel Angel Nieto
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Released
Undecided
Unassigned

Bug Description

Cloned from Jira PXC-701:

Our docker images use pxc-entry.sh. The code shows that it relies on a file created manually on the datadir, with name init.ok. The problem is that xtrabackup SST removes that file, so in case a node leaves and then rejoins requesting a SST, init.ok will be removed and the service won't work anymore.
It is even easy to reproduce with a single-node cluster. Stop and start the docker container all the times you want, and it will work. Remove init.ok, and it won't start anymore.
Place init.ok somewhere else, or fix xtrabackup script so it doesn't delete that file.

Reported by a customer #142420

Tags: i142420
Changed in percona-xtradb-cluster:
status: New → Confirmed
tags: added: i142420
Revision history for this message
Kenn Takara (kenn-takara) wrote :

Fix committed for next versions of PXC 5.6/5.7

Changed in percona-xtradb-cluster:
status: Confirmed → Fix Committed
Revision history for this message
Travis Glenn Hansen (travisghansen) wrote :

Thanks! Can you shed some details on the solution or point to a patch? Was this a change to the docker images/entrypoint.sh or to how xtrabackup replicates etc?

Revision history for this message
Travis Glenn Hansen (travisghansen) wrote :

I've noticed the 5.6 image hasn't been updated. Anyway, an answer to the previous question would probably shed some light for me on how to proceed.

Revision history for this message
Kenn Takara (kenn-takara) wrote :

It was a patch to the wsrep_sst_xtrabackup-v2.sh script to exclude the init.ok file. It will be released with the next 5.6/5.7 release (I don't know the exact dates when it will be released though).

in the file in scripts/wsrep_sst_xtrabackup-v2.sh
(The change is to the line with cpat)

change the line from

cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*donor-keyring$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$')

to this

cpat=$(parse_cnf sst cpat '.*init\.ok$\|.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*donor-keyring$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$')

Prepend ".*init\.ok$\|" to the beginning of the string after "cpat". This causes the init.ok file to be ignored when copying the files over.

Changed in percona-xtradb-cluster:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1932

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.