Uploaded image for project: 'Percona XtraDB Cluster'
  1. Percona XtraDB Cluster
  2. PXC-2994

8.0 clone plugin doesn't work for cloning remote data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 8.0.18-internal
    • Fix Version/s: 8.0.18-4.1-RC
    • Component/s: PXC-8.0
    • Labels:
      None
    • Needs Review:
      Yes

      Description

      So I'm aware that we cannot use the clone plugin for SST, but I wanted to see how it works unrelated to SST.

      What I found that works is that I can do a clone into some local directory.
      steps:

      INSTALL PLUGIN clone SONAME 'mysql_clone.so';
      CLONE LOCAL DATA DIRECTORY = '/path/to/clone_dir';
      

      and I was able to start separate instance on that cloned data directory.

      But what doesn't work for me if I try to do a clone from one running instance to another (unrelated instances, tried with two bare instances running even without wsrep initiated, so basically just like PS)
      steps:

      # On donor
      CREATE USER 'donor_clone_user'@'%' IDENTIFIED BY 'Tomi1234#';
      GRANT BACKUP_ADMIN on *.* to 'donor_clone_user'@'%';
      INSTALL PLUGIN clone SONAME 'mysql_clone.so';
      
      # On recipient
      CREATE USER 'recipient_clone_user'@'%' IDENTIFIED BY 'Tomi1234#';
      GRANT CLONE_ADMIN on *.* to 'recipient_clone_user'@'%';
      INSTALL PLUGIN clone SONAME 'mysql_clone.so';
      SET GLOBAL clone_valid_donor_list = 'bender:12659';
      
      # Logon to recipient with recipient_clone_user user and issue following
      CLONE INSTANCE FROM 'donor_clone_user'@'bender':12659 IDENTIFIED BY 'Tomi1234#';
      

      result:

      mysql> CLONE INSTANCE FROM 'donor_clone_user'@'bender':12659 IDENTIFIED BY 'Tomi1234#';
      ERROR 1158 (08S01): Got an error reading communication packets
      
      RECIPIENT:
      2020-02-17T12:29:07.216054Z 11 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Task Connect.'
      2020-02-17T12:29:07.218820Z 11 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Master ACK Connect.'
      2020-02-17T12:29:07.218845Z 11 [Note] [MY-013457] [InnoDB] Clone Apply Begin Master Version Check
      2020-02-17T12:29:07.219047Z 11 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Command COM_INIT: error: 1158: Got an error reading communication packets.'
      2020-02-17T12:29:07.219191Z 11 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Master ACK COM_EXIT: error: 1156: Got an error reading communication packets.'
      2020-02-17T12:29:08.219619Z 11 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Master ACK Disconnect : abort: true.'
      2020-02-17T12:29:08.219717Z 11 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Task skip COM_EXIT: error: 1158: Got an error reading communication packets.'
      2020-02-17T12:29:09.220051Z 11 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Task Disconnect : abort: true.'
      2020-02-17T12:29:09.220117Z 11 [Note] [MY-013458] [InnoDB] Clone Set Error code: 1158 Saved Error code: 0
      2020-02-17T12:29:09.220155Z 11 [Note] [MY-013457] [InnoDB] Clone Apply Version End Master Task ID: 0 Failed, code: 1158: Got an error reading communication packets
      
      DONOR:
      2020-02-17T12:29:07.219254Z 11 [Note] [MY-010914] [Server] Aborted connection 11 to db: 'unconnected' user: 'donor_clone_user' host: 'localhost' (Got an error reading communication packets).
      

      but I have tried the same steps with PS on the same host and it worked fine, so not sure what is wrong.

        Smart Checklist

          Attachments

          1. donor.err
            18 kB
          2. recipient.err
            19 kB

            Issue Links

              Activity

                People

                Assignee:
                zsolt.parragi Zsolt Parragi
                Reporter:
                tomislav.plavcic@percona.com Tomislav Plavcic
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1 day, 1 hour, 30 minutes
                    1d 1h 30m