]> git.proxmox.com Git - qemu-server.git/commit
qemuserver: migration: test_volid: change attr name and ref handling
authorAaron Lauterer <a.lauterer@proxmox.com>
Mon, 19 Jun 2023 09:29:31 +0000 (11:29 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Wed, 21 Jun 2023 10:48:11 +0000 (12:48 +0200)
commit6e9c4929be3c59de577bd22cee4ff7e06aef9416
tree239d833b48763fb2853df1b839fd11355c90dc46
parenta0dbed5a6de33ae328635454a6b3ebcbd1f8a0d6
qemuserver: migration: test_volid: change attr name and ref handling

Since we don't scan all storages for matching disk images anymore for a
migration we don't have any images found via storage alone. They will be
referenced in the config somewhere.

Therefore, there is no need for the 'storage' ref.
The 'referenced_in_config' is not really needed and can apply to both,
attached and unused disk images.

Therefore the QemuServer::foreach_volid() will change the
'referenced_in_config' attribute to an 'is_attached' one that only
applies to disk images that are in the _main_ config part and are not
unused.

In QemuMigrate::scan_local_volumes() we can then quite easily map the
refs to each state, attached, unused, referenced_in_{pending,snapshot}.

The refs are mostly used for informational use to print out in the logs
why a disk image is part of the migration. Except for the 'attached' case.

In the future the extra step of the refs in QemuMigrate could probably
be streamlined even more.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
PVE/QemuMigrate.pm
PVE/QemuServer.pm