Proto commits in canonical/lxd

These 59 commits are when the Protocol Buffers files have changed:

Commit:e634957
Author:tugbataluy
Committer:tugbataluy

lxd/migration: Add the metadata-only flag to the migration header A standby replica on a mirrored Ceph pool already holds the data by the time the replicator pushes an instance, so only the records should travel. The sink is the side that knows it is such a standby, so it tells the source through the response header, the way it already does for a refresh. A bool on the header rather than a new MigrationFSType because the type describes the transfer format and every driver advertises which formats it supports. A synthetic format would ripple through the type negotiation for a mode that has no transfer at all. Field 6 is a gap left by a removed field, so the new field takes 14 rather than reuse it. Signed-off-by: tugbataluy <tugba.taluy@canonical.com>

Commit:4cb90da
Author:Julian Pelizäus
Committer:Thomas Parrott

lxd/migration/protobuf: Add RBD_AND_RSYNC migration type Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>

The documentation is generated from this commit.

Commit:44887c2
Author:Julian Pelizäus
Committer:Julian Pelizäus

lxd/migration/protobuf: Add RBD_AND_RSYNC migration type Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>

The documentation is generated from this commit.

Commit:0aa3b35
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration: Adds CRIUType_VM_QEMU protobuf type Although CRIUType prefix here is a misnomer, it aligns with the repurposing of the criu socket for all instance type state transfers, not just containers (using CRIU). Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:875a7f3
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration: Adds CRIUType_VM_QEMU protobuf type Although CRIUType prefix here is a misnomer, it aligns with the repurposing of the criu socket for all instance type state transfers, not just containers (using CRIU). Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:70dd4ae
Author:Thomas Hipp
Committer:Stéphane Graber

lxc/migration: Update protobuf with zfs zvol support Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>

Commit:9b41dd5
Author:Thomas Hipp
Committer:Thomas Hipp

lxc/migration: Update protobuf with zfs zvol support Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>

Commit:9e1cbf6
Author:Prajwal S N
Committer:Stéphane Graber

lxd/migration: remove stats protobuf definitions The protobuf definitions for CRIU stats is provided by the go-criu package in `crit/images/stats.proto`. The duplicate definitions in `migration.proto` have been removed and `migration.pb.go` updated. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>

Commit:521209a
Author:Prajwal S N
Committer:Prajwal S N

lxd/migration: remove stats protobuf definitions The protobuf definitions for CRIU stats is provided by the go-criu package in `crit/images/stats.proto`. The duplicate definitions in `migration.proto` have been removed and `migration.pb.go` updated. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>

Commit:8f196b1
Author:Thomas Parrott
Committer:Stéphane Graber

lxd/migration/utils: Adds IndexHeaderVersion to migration header This supports indicating which version (if any) of the index migration header will be sent/recv. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:55636ad
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration/utils: Adds IndexHeaderVersion to migration header This supports indicating which version (if any) of the index migration header will be sent/recv. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:7bae6cb
Author:Thomas Hipp
Committer:Thomas Hipp

lxd/migration: Add header_subvolume_uuids to protobuf Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>

Commit:8638a1d
Author:Thomas Hipp
Committer:Thomas Hipp

lxd/migration: Add new zfs feature to protobuf This adds the `migration_header` zfs feature to protobuf. Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>

Commit:ef2f77b
Author:Stéphane Graber
Committer:Stéphane Graber

lxd/migration: Update protobuf config Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:d57ae4d
Author:Stéphane Graber
Committer:Stéphane Graber

lxd/migration: Update protobuf config Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:3a7dfd6
Author:Thomas Parrott
Committer:Stéphane Graber

lxd/migration: Adds expiry_date field to snapshots protobuf Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:2cd5b8f
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration: Adds expiry_date field to snapshots protobuf Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:c8798bc
Author:Thomas Parrott
Committer:Stéphane Graber

lxd/migration/migrate/proto: Adds BTRFS Features to offer header Adds following features: migration_header - indicates a migration header will be sent/recv in data channel first. header_subvolumes - indicates migration can send/recv subvolumes. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:73698e3
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration/migrate/proto: Adds BTRFS Features to offer header Adds following features: migration_header - indicates a migration header will be sent/recv in data channel first. header_subvolumes - indicates migration can send/recv subvolumes. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:da955ef
Author:Thomas Parrott
Committer:Stéphane Graber

lxd/migration: Adds volumeSize field to MigrationHeader Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:b14ace4
Author:Thomas Parrott
Committer:Stéphane Graber

lxd/migration/migrate/proto: Fix alignment Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:1b02d01
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration: Adds volumeSize field to MigrationHeader Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:566ce23
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration/migrate/proto: Fix alignment Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:ea0248c
Author:Thomas Parrott
Committer:Thomas Parrott

lxd/migration: Adds BLOCK_AND_RSYNC migration transport type Will be used for migrating VMs as they have both config volumes (that will use RSYNC) and block volumes. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

Commit:7fc6fe9
Author:Free Ekanayaka
Committer:Free Ekanayaka

Drop vendor directory Signed-off-by: Free Ekanayaka <free.ekanayaka@canonical.com>

Commit:153f552
Author:Stéphane Graber
Committer:Stéphane Graber

vendor: Temporary Raft vendoring Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:196b526
Author:Stéphane Graber
Committer:Stéphane Graber

vendor: Temporary Raft vendoring Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:45a90c7
Author:Stéphane Graber
Committer:Stéphane Graber

lxd/migration: Negotiate ZFS compression Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:a720525
Author:Stéphane Graber
Committer:Stéphane Graber

lxd/migration: Bi-directional rsync negotiation Closes #5270 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:e619802
Author:Stéphane Graber

lxd/migration: Negotiate ZFS compression Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:aca0151
Author:Stéphane Graber
Committer:Stéphane Graber

lxd/migration: Bi-directional rsync negotiation Closes #5270 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:1a6406c
Author:Stéphane Graber
Committer:Stéphane Graber

rsync: Tweak transfer options (delete & compress) LXD when interacting with recent clients will now support: - --delete (to avoid random conflicts) - --compress --compress-level=2 (to reduce bandwidth usage) The level 2 compress appears to be the best CPU/bandwidth tradeoff for most common images and shouldn't cause slowdowns in most cases. Closes #5215 Closes #5212 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:91bcb66
Author:Thomas Hipp
Committer:Stéphane Graber

lxd: Add support for incremental container copy Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>

Commit:03ecaf4
Author:Stéphane Graber
Committer:Stéphane Graber

rsync: Tweak transfer options (delete & compress) LXD when interacting with recent clients will now support: - --delete (to avoid random conflicts) - --compress --compress-level=2 (to reduce bandwidth usage) The level 2 compress appears to be the best CPU/bandwidth tradeoff for most common images and shouldn't cause slowdowns in most cases. Closes #5215 Closes #5212 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:c48fd4f
Author:Stéphane Graber
Committer:Stéphane Graber

global: Advertise rsync features Closes #4962 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:7dfc293
Author:Stéphane Graber
Committer:Stéphane Graber

global: Advertise rsync features Closes #4962 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:4c64ff4
Author:Christian Brauner
Committer:Stéphane Graber

migration: fix cross version migrations New fields that are added to the protobuf definitions need to be optional so to not break migration between different LXD versions. Closes #4780. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:1c93d2c
Author:Christian Brauner
Committer:Christian Brauner

migration: fix cross version migrations New fields that are added to the protobuf definitions need to be optional so to not break migration between different LXD versions. Closes #4780. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:92a4fdc
Author:Stéphane Graber

lxd/migration: Update protocol Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:05211aa
Author:Stéphane Graber
Committer:Stéphane Graber

migration: Keep snapshot timestamps in migration Closes #4362 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:0b2b89a
Author:Stéphane Graber
Committer:Stéphane Graber

lxd: Move migration code to own package Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:4de1243
Author:Stéphane Graber
Committer:Stéphane Graber

lxd: Move migration code to own package Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:2fe8e8d
Author:Adrian Reber
Committer:Stéphane Graber

migrate.proto: silence protobuf compiler warning The protobuf compiler complains that it defaults to 'proto2': [libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: lxd/migrate.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) This just explicitly sets the default. Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:5d443c7
Author:Adrian Reber
Committer:Christian Brauner

migrate: finish pre-dumping if threshold reached This adds support to stop the pre-dumping if a certain threshold has been reached. Instead of blindly relying on the 'max' iterations this commit makes it possible to finish the pre-dumping if enough memory has already been migrated using the pre-copy migration optimization. The configuration option is: migration.incremental.memory.goal (default to 70%) If the current pre-dump more pages (%) migrated using pre-dumping than defined in above variable the pre-copy migration is finished even if the 'max' iterations has not been reached. The lower the number the sooner the pre-copy migration will finish, but the container downtime during migration will be longer as a result of the time required to transfer the memory pages. The higher the number is, the shorter the container downtime during migration. Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:939a888
Author:Adrian Reber
Committer:Christian Brauner

migrate.proto: silence protobuf compiler warning The protobuf compiler complains that it defaults to 'proto2': [libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: lxd/migrate.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.) This just explicitly sets the default. Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:6af26af
Author:Adrian Reber
Committer:Christian Brauner

migrate: prepare for pre-copy migration (part 3) This introduces a protocol for the rsync transfers to support a variable number of pre-dumps. The number of pre-dumps depends on the workload, the threshold and the number of pre-dumps. Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:faafedf
Author:Adrian Reber
Committer:Christian Brauner

migration: prepare for pre-copy migration (part 2) In addition to the previous pre-copy migration prepare commit which changed the parameters of the Migrate() function this extends the protocol between migration source and destination to detect if pre-copy migration should be used. Currently pre-copy migration defaults to off and can be enabled by setting 'migration.incremental.memory' to true. If it is 'true' and the migration destination side also acknowledges that it supports pre-copy migration the variable 'use_pre_dumps' is set to 'true' and the following commits can use this variable to use pre-copy migration or not in the upcoming patches. Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:7fe4c63
Author:Christian Brauner
Committer:Christian Brauner

migration: stateless incremental containers This adds a new criu migration type "NONE" which can be used to perform mock live migration. Any step but actually calling criu will be performed. Closes #3798. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:90f62db
Author:Christian Brauner
Committer:Christian Brauner

ceph: add storage_ceph_migration.go Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

Commit:71446a2
Author:Tycho Andersen
Committer:Stéphane Graber

Add architecture, stateful, prefix config/devices with local Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:f1e0411
Author:Tycho Andersen
Committer:Stéphane Graber

container copy: preserve snapshot configuration Previously, we weren't preserving snapshot configuration (as noted in the TODO). Let's do that. Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:f267806
Author:Tycho Andersen

Add architecture, stateful, prefix config/devices with local Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:81cf9bb
Author:Tycho Andersen
Committer:Tycho Andersen

container copy: preserve snapshot configuration Previously, we weren't preserving snapshot configuration (as noted in the TODO). Let's do that. Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:5de5bd6
Author:Tycho Andersen
Committer:Tycho Andersen

migration: migrate snapshots too This commit also moves snapshots when copying containers. Note that it is pretty dumb: it also copies snapshots in the hot path of migraiton, which is a bad deal. Further, it will only copy things between directory storage backends; this adds the framework necessary for fs specific backend send/receive, to be used in later patches. Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:e63e9cd
Author:Tycho Andersen

get rid of migration subpackage We'll need this to fix migration, since we need to call the apparmor/seccomp primitives, and those live in lxd/, and we can't do circular imports. (Moving the security stuff to a security/ package is also nontrivial, since that depends on containerLXD, which itself should be in a separate package, etc. etc.) Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:1879f26
Author:Stéphane Graber
Committer:Stéphane Graber

Send the host uid/gid map over the migration socket Closes #838 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

Commit:d2b7e94
Author:Tycho Andersen
Committer:Tycho Andersen

implement support for non-live container moves Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:837a7a5
Author:Tycho Andersen
Committer:Tycho Andersen

s/FilesystemType/MigrationFSType/g Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Commit:ff99cfc
Author:Tycho Andersen
Committer:Tycho Andersen

use protobufs over migration control socket This fixes one of the TODOs described in the first migration commit. Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>