mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-03 09:54:33 +00:00
runtime-rs: Add idempotency to hotplug block device operations
Due to the lack of atomicity in the operation, a partial failure can lead to an inconsistent QEMU state, which pollutes subsequent operations. This can easily trigger a "Duplicate nodes" error. To prevent this, we should query the state before performing the operation. ee should ensure its validation and idempotency when making the function idempotent allows it to be safely retried. Fixes #11649 Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in: