Skip to content

v2.15.0

Latest

Choose a tag to compare

@bigbes bigbes released this 24 Sep 08:27
· 17 commits to master since this release

Overview

This release extends cluster backup and restore: tt backup-id generates backup identifiers, tt backup start and finalize gain --dir and iproto TLS flags, and tt restore can restore a subset of replicasets into separate snapshot, WAL and vinyl directories. It also parallelizes tt status and fixes duplicated lines and stalls in tt log -f after log rotation.

Added

  • tt backup-id: prints an identifier for a new backup, the current UTC time as 20060102T150405Z, to pass as --backup-id to tt backup start, upload and finalize. Identifiers sort in the order they are generated, and the command exits once the printed second is over, so two consecutive calls never print the same one.
  • status: added --instance-timeout flag to bound how long collecting a single instance's status may take.
  • tt restore apply: restore into the three data directories Tarantool configures separately. --snapshot-dir, --wal-dir and --vinyl-dir name one directory each, and -c/--config with --instance reads them out of a cluster configuration, resolving snapshot.dir, wal.dir, vinyl.dir, their var/lib/{{ instance_name }} defaults and process.work_dir the way Tarantool does. Each directory is decided on its own, taking the flag that names it, else the configuration, else --work-dir. The marker is written beside the snapshot directory as <absolute snapshot directory>.restore_state.json and records all three, resolved.
  • tt backup start / tt backup finalize: added --dir flag to choose the directory of the local archive and manifest fragment instead of $TMPDIR/tt-backup/<backup-id>.
  • tt backup start / tt backup finalize: added --sslkeyfile, --sslcertfile, --sslcafile and --sslciphers flags to connect to an instance with iproto TLS enabled.
  • tt restore plan: added --replicasets to restrict the restore to the named replicasets, by the names the cluster config gives them, which is why it requires -c. The cluster recovery point is then searched over those replicasets alone, and so are the downloads, the restore targets and the trim positions. The others -- a stateless router, say -- are not restored and are reported in the warnings.

Changed

  • status: status requests now have a default timeout of 5 seconds.
  • status: status requests were parallelized for faster collection.
  • tt restore apply: --work-dir is no longer required. It still puts every kind of file in one directory when used alone; with --config it is the directory the instance is launched from, which the configuration's relative paths resolve against. A call that does not add up to three directories is rejected with exit code 3 and touches nothing.
  • tt backup / tt restore apply: a memtx sort data file (<signature>.sortdata, Tarantool 3.8+) counts as a snapshot, so it is backed up against memtx_dir and restored beside the snapshot it belongs to. --target-point drops the sort data of a snapshot it drops, instead of leaving a file describing a snapshot that is no longer there.
  • tt log -f / tt tcm log --follow: only complete lines are printed. A half-written line stays buffered until its newline arrives instead of being split into two records.
  • Commands working with a Tarantool 3 application (tt start, tt status and others) read its cluster configuration once instead of once per instance, which was slow on applications with hundreds of instances.

Fixed

  • status: replication errors were ignored.
  • tt backup start: an archive entry is named against the data directory that holds files of its own kind, so an instance keeping one data directory inside another no longer names a vinyl run against wal_dir and has it restored a level too deep. tt restore apply normalizes the names older archives carry, so a backup already taken from such an instance restores correctly too.
  • tt cluster publish / tt cluster show: fix a connection timeout to an https:// Tarantool Config Storage or etcd endpoint with SSL enabled but no client certificate configured.
  • tt log -f / tt tcm log --follow: a line could be delivered twice right after a log rotation, and the follow could stall, never picking up the rotated file.
  • tt log -f: the message about an unavailable log file printed %!q(MISSING) instead of the file name.

Overview