Commit Graph

241 Commits

Author SHA1 Message Date
Thomas Lamprecht
5eaa3ecffd bump version to 1.1.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-16 13:52:39 +02:00
Thomas Lamprecht
e273238b95 update proxmox and tokio dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-16 13:52:24 +02:00
Stefan Reiter
6eade0ebb7 access: use CachedChunkReader
Use the new CachedChunkReader with the shared_cache implementation to
provide a concurrency-safe async way of accessing data. This provides
two benefits:

* uses a shared LRU cache, which is very helpful for random-access like
  during a live-restore
* does away with the global Mutex in read_image_at, providing real
  concurrency without lock contention

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-06-08 09:46:01 +02:00
Stefan Reiter
ab3577e9d8 add shared_cache module
Provides a shared AsyncLruCache of 256MB (w/ 4MB chunks) that can be
used by multiple readers at the same time. It is dropped once no more
readers exist, so the memory gets freed if all QEMU block/pbs instances
disappear.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-06-08 09:45:59 +02:00
Thomas Lamprecht
8de935110e bump version to 1.0.3-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-12 12:37:35 +01:00
Thomas Lamprecht
5403a71b2f buildsys: patch out unused dependencies from library
mirrors the changes from proxmox-backup commit
198ebc6c86380351662b8b01537f449538ff1e6b [0]

[0]: https://git.proxmox.com/?p=proxmox-backup.git;a=commit;h=198ebc6c86380351662b8b01537f449538ff1e6b

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-12 12:37:35 +01:00
Thomas Lamprecht
67d03b6917 cargo: update once_cell and proxmox crates
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-12 11:50:51 +01:00
Thomas Lamprecht
af51823cc8 d/control: record breaks for older pve-qemu-kvm
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-12 11:50:45 +01:00
Thomas Lamprecht
99d016e4d8 d/symbols: reflect changes to proxmox_backup_new
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-12 11:50:45 +01:00
Fabian Grünbichler
d8aa155c6c api: add master key support
this is a breaking change/API extension.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-12 10:54:41 +01:00
Fabian Grünbichler
58f4a111bd build: track symbols
for easier auto-generation of versioned deps. when adding new symbols,
the build should display a warning + diff (in addition to our manual
tracking of the generated header file). changes in symbol signatures or
semantics are not caught automatically by the symbols file, but still
require bumping the minimum library version for that symbol accordingly.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-12 10:54:32 +01:00
Fabian Grünbichler
59971032ae build: switch back to latest proxmox-backup tag
instead of path dependency

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-10 11:50:09 +01:00
Fabian Grünbichler
0723f448fd use new HttpClientOptions constructors
and make password non-optional from the start.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 10:42:45 +01:00
Fabian Grünbichler
42b6fd5bee use UploadOptions for uploading Blobs
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-26 10:42:41 +01:00
Fabian Grünbichler
bc71e4e465 update Cargo.toml
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 15:58:02 +01:00
Fabian Grünbichler
6b54f9f05e update to tokio 1.0
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-11 15:10:41 +01:00
Fabian Grünbichler
bb9d46ae22 Cargo.toml: bump to tokio 1.0
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-11 15:02:12 +01:00
Fabian Grünbichler
447552da4a d/control: add cbindgen to build-deps
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-30 13:41:45 +01:00
Dietmar Maurer
18d5b98ab1 bump version to 1.0.2-1 2020-11-25 08:32:46 +01:00
Stefan Reiter
f93eb14256 return version via rust fn instead of header define
Otherwise the string gets included in the QEMU binary, not the library.

Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-11-25 08:27:29 +01:00
Fabian Grünbichler
da4058c9cf fingerprint: rename variables
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-25 08:22:18 +01:00
Fabian Grünbichler
8b74ed31c7 encryption key tracking: use fingerprint
but accept old variant as well for now, to not invalidate bitmaps for
freshly migrated VMs.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-25 08:22:18 +01:00
Dietmar Maurer
20ce68ffe7 depend on proxmox-backup v1.0.4 2020-11-25 08:22:18 +01:00
Dietmar Maurer
36d5c84ec4 bump version to 1.0.1-1 2020-11-24 09:09:24 +01:00
Dietmar Maurer
1e45883f00 depend on proxmox-backup v1.0.3 2020-11-24 09:07:02 +01:00
Fabian Grünbichler
435f6bd7a7 restore: improve error if key is missing
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-24 08:48:38 +01:00
Fabian Grünbichler
5325b94b39 adapt to proxmox-backup fingerprint changes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-24 08:48:08 +01:00
Fabian Grünbichler
98ecf27deb bump version to 1.0.0-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-11 15:22:39 +01:00
Stefan Reiter
2eb96573b8 include crate version and git rev in header file
...so we can get the library version a binary is currently running with.

Version information is retrieved from the build environment (set by
cargo/make) and appended using 'with_after_include' to appear within the
include guard.

The version string in current-api.h is inconsequential, so ignore it in
diff. This way we only have to re-commit that file whenever the *actual*
API changes, not the version.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>

modified to avoid spawning subcommands

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-11 15:22:35 +01:00
Fabian Grünbichler
dbb900ce4f update dependencies
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-11 14:27:36 +01:00
Fabian Grünbichler
296da58610 update to proxmox 0.6/proxmox-backup 0.9.4
and implement the switch to Authid, which means API token support for
free.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-10-30 15:17:53 +01:00
Thomas Lamprecht
d83cc3fe8d bump version to 0.7.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-28 22:12:47 +01:00
Thomas Lamprecht
ab388dc8f8 d/control: track some more build-dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-28 22:12:47 +01:00
Thomas Lamprecht
84641743c6 cargo: update proxmox dependencies to 0.9.0 and 0.5.0, respectively
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-28 22:10:14 +01:00
Stefan Reiter
c28f578e09 add state serializing and loading functions
For dirty-bitmap migration, QEMU also needs to move the static state of
the library to the target. proxmox_{import,export}_state provide a means
of accessing said data in a serialized fashion.

QEMU treats the state as some unknown quantity of bytes and the result
does not need to be human-readable, so we encode it with 'bincode',
which is based on serde.

Since the quantity is only known *after* serialization, we have to
allocate the buffer ourselves. This is handled by Box::leak-ing a Rust
allocated buffer and cleaning up via the explicit
proxmox_free_state_buf function.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-10-28 22:08:05 +01:00
Thomas Lamprecht
58437c69e4 cargo: update authors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-22 10:13:54 +02:00
Fabian Grünbichler
5a82749a29 invalidate bitmap when crypto key changes
by computing and remembering the ID digest of a static string, we can
detect when the passed in key has changed without keeping a copy of it
around inbetween backup jobs.

this is a follow-up/fixup for

104fae9111 fix #2866: invalidate bitmap on crypt_mode change

which implemented detection for crypt MODE changes.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-10-22 10:08:27 +02:00
Fabian Grünbichler
2a5e2623af update to proxmox-backup 0.9.1
and pass along any port set in the repository string

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-10-22 10:08:27 +02:00
Thomas Lamprecht
e410210409 update dependencies for proxmox and proxmox-backup
drop chrono depedency as proxmox-backup did

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-26 15:23:26 +02:00
Fabian Grünbichler
9de6d63356 update to new BackupDir constructor
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-09-11 16:15:06 +02:00
Thomas Lamprecht
304b75f554 bump version to 0.7.0-1
Supersedes bad 0.7.1-1 bump...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-10 10:48:38 +02:00
Thomas Lamprecht
935fe25beb bump version to 0.7.1-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-10 10:47:48 +02:00
Thomas Lamprecht
329596526f updated to BackupWriter::start signature change
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-10 10:47:11 +02:00
Thomas Lamprecht
6d9c765703 bump version to 0.7.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-10 10:37:21 +02:00
Thomas Lamprecht
0c9ad80b00 update proxmox* dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-10 10:35:03 +02:00
Thomas Lamprecht
a52765504d bump version to 0.6.4-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-19 16:44:30 +02:00
Wolfgang Bumiller
78552edbec deduplicate 'not connected' error cases
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-13 10:10:05 +02:00
Wolfgang Bumiller
bbb2d9774b clippy: allow mutex_atomic with condvar
clippy complains that a `Mutex<Bool>` could just as well be
an `AtomicBool`, but we also use a `Condvar`, so it cannot.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-13 10:07:08 +02:00
Wolfgang Bumiller
3ed30abe19 clippy: remove unnecessary mut
curiously this one is also not caught by rustc

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-13 10:03:46 +02:00
Wolfgang Bumiller
0e1ddb09b5 clippy: this case I disagree with
clippy suggests a way-too-long
for (i, index) in index.iter_mut().enumerate().take(index_count) {
    *index = ...
}

which is just massive in comparison, and not at all more
readable...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-13 09:54:00 +02:00