Commit Graph

166 Commits

Author SHA1 Message Date
Stefan Reiter
3ff8500175 qmeventd: add handling for -no-shutdown QEMU instances
We take care of killing QEMU processes when a guest shuts down manually.
QEMU will not exit itself, if started with -no-shutdown, but it will
still emit a "SHUTDOWN" event, which we await and then send SIGTERM.

This additionally allows us to handle backups in such situations. A
vzdump instance will connect to our socket and identify itself as such
in the handshake, sending along a VMID which will be marked as backing
up until the file handle is closed.

When a SHUTDOWN event is received while the VM is backing up, we do not
kill the VM. And when the vzdump handle is closed, we check if the
guest has started up since, and only if it's determined to still be
turned off, we then finally kill QEMU.

We cannot wait for QEMU directly to finish the backup (i.e. with
query-backup), as that would kill the VM too fast for vzdump to send the
last 'query-backup' to mark the backup as successful and done.

For handling 'query-status' messages sent to QEMU, a state-machine-esque
protocol is implemented into the Client struct (ClientState). This is
necessary, since QMP works asynchronously, and results arrive on the
same channel as events and even the handshake.

For referencing QEMU Clients from vzdump messages, they are kept in a
hash table. This requires linking against glib.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-11-05 11:22:47 +01:00
Thomas Lamprecht
8c9021cd69 bump version to 6.2-18
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-29 18:23:23 +01:00
Thomas Lamprecht
31655cbb7f bump version to 6.2-17
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-22 16:09:03 +02:00
Thomas Lamprecht
75127d1996 bump version to 6.2-16
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-19 15:51:54 +02:00
Thomas Lamprecht
dbcc2dbb94 bump version to 6.2-15
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-29 17:44:31 +02:00
Thomas Lamprecht
460e50689f d/control: update
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-08 19:12:36 +02:00
Thomas Lamprecht
4a92ecd882 d/copyright: update
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-08 19:01:54 +02:00
Thomas Lamprecht
116df99cc6 bump version to 6.2-14
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-24 19:34:27 +02:00
Thomas Lamprecht
75f25f44bc bump version to 6.2-13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 11:42:53 +02:00
Thomas Lamprecht
db3272d084 bump version to 6.2-12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-19 19:46:28 +02:00
Fabian Grünbichler
2673ee0b16 d/control: bump versioned dep on pve-storage
needed for PBS plugin methods that are called in backup/restore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-06 09:49:20 +02:00
Fabian Grünbichler
bd9ab3664d bump version to 6.2-11
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-07-24 08:17:03 +02:00
Thomas Lamprecht
6b84c2d66a bump version to 6.2-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-13 13:38:42 +02:00
Thomas Lamprecht
871deaa557 d/control: update build-dependency of pve-doc-generator
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-13 12:25:33 +02:00
Wolfgang Bumiller
70d3ff79a8 bump version to 6.2-9
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 14:24:03 +02:00
Thomas Lamprecht
1e75990c43 bump version to 6.2-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 15:14:41 +02:00
Thomas Lamprecht
b54ba7a170 bump version to 6.2-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 13:51:25 +02:00
Fabian Grünbichler
b6f8076eb6 d/control: bump versioned dependency on pve-common
for PVE::JSONSchema with additional validator support

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-07-08 10:28:20 +02:00
Thomas Lamprecht
fd98147d6b bump version to 6.2-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-07 19:00:20 +02:00
Thomas Lamprecht
277cdcb072 bump version to 6.2-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-06 21:59:50 +02:00
Thomas Lamprecht
c8239a84dd bump version to 6.2-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-30 11:34:33 +02:00
Thomas Lamprecht
456071e59c bump version to 6.2-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-04 11:19:17 +02:00
Thomas Lamprecht
81c44b9b90 bump version to 6.2-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-08 13:00:26 +02:00
Thomas Lamprecht
ba76fc630b bump version to 6.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-07 21:51:05 +02:00
Thomas Lamprecht
19abcdd07e bump version to 6.1-20
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-06 17:17:03 +02:00
Fabian Grünbichler
7c54973e47 bump version to 6.1-18
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-05 11:42:41 +02:00
Fabian Grünbichler
946cb0fe9f d/control: depend on new libpve-guest-common-perl
with lock_config_shared

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-05 11:41:55 +02:00
Thomas Lamprecht
5a5ba29460 bump version to 6.1-18
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-04 17:36:49 +02:00
Fabian Grünbichler
fa38a81217 bump version to 6.1-17
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-04 14:12:21 +02:00
Fabian Grünbichler
1e68f42199 d/control: bump build-depend on pve-storage
with refactored archive/compressor info and RE

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-04 14:09:36 +02:00
Thomas Lamprecht
0433e98f23 bump version to 6.1-16
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-29 16:23:26 +02:00
Thomas Lamprecht
0091afc795 bump version to 6.1-15
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-29 13:37:40 +02:00
Fabian Grünbichler
89b0461af1 bump version to 6.1-14
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-04-09 09:36:41 +02:00
Fabian Grünbichler
4fcfd15d52 d/control: depend on updated guest-common/pve-storage
pve-storage: new storage_migrate with allow_rename
guest-common: update_volume_ids

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-04-09 09:36:41 +02:00
Thomas Lamprecht
e5118d9b91 bump version to 6.1-13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-08 17:44:38 +02:00
Thomas Lamprecht
da75afe5c0 d/control: bump versioned to libpve-common-perl
mainly for the new idmap and storage map format

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-08 17:13:18 +02:00
Fabian Grünbichler
20c1b5f0e5 bump version to 6.1-12
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-03-30 10:00:21 +02:00
Thomas Lamprecht
82a3904ed4 bump version to 6.1-11
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-26 09:00:48 +01:00
Thomas Lamprecht
404c90070d bump version to 6.1-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-25 15:16:29 +01:00
Thomas Lamprecht
a99b470e75 bump version to 6.1-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-25 10:07:23 +01:00
Thomas Lamprecht
03c8cbd1dc bump version to 6.1-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-20 11:12:26 +01:00
Thomas Lamprecht
7c4351f7d4 fix #2580: api/delete: drop VM from HA resources if purge is set
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-12 13:39:00 +01:00
Thomas Lamprecht
7ed8e940f1 d/control: bump versioned dependency for libpve-guest-common-perl (>= 3.0-5)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-12 11:11:58 +01:00
Thomas Lamprecht
37e9b2d031 d/control: bump versioned dependency for libpve-guest-common-perl (>= 3.0-4)
for the moved definedness-safe comparison methods

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-10 14:28:29 +01:00
Thomas Lamprecht
00d8327000 bump version to 6.1-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-09 19:37:05 +01:00
Thomas Lamprecht
8541f8cddb bump version to 6.1-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-10 06:40:45 +01:00
Thomas Lamprecht
2dbc9ca724 bump version to 6.1-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 10:30:22 +01:00
Thomas Lamprecht
9f4e1abf3b bump version to 6.1-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-16 16:03:30 +01:00
Thomas Lamprecht
ae200950d4 grammar fix: s/does not exists/does not exist/g
bump versioned build-dependency, as qemu-server has tests checking
for errors, and we fixed an grammar error in pve-storage, so we need
the newer version to ensure our test go through

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-13 12:20:56 +01:00
Thomas Lamprecht
00a2baa5f4 bump version to 6.1-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 11:44:40 +01:00