Skip to content

Conversation

@fmoessbauer
Copy link
Member

@fmoessbauer fmoessbauer commented Jan 8, 2026

The bug arises from inconsistent semantics of the storage backends (usbf and qemu) regarding if a CoW device is needed when calling CoW operations or not. We now align these so that the caller does not need to care.

closes: #560

To distinguish which CoW operation failed due to a missing CoW device,
we introduce a dedicated exception. As these exceptions cannot easily be
thrown across the RPC boundary, we catch them in the exposed interface
and re-throw as standard library exceptions.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
When closing the image, we currently only check if the rollback feature
is implemented, but not if it is configured. On QEMU this is fine, as
the rollback implementation itself unconditionally can be executed (if
not configured, the call is a noop). However, on usbf the call checks if
a CoW device is configured and raises otherwise.

As we cannot check if a device is configured at the callsite in image,
we introduce a parameter to the rollback method to ignore missing
devices. For the sake of completeness, we implement the same also for
the commit method.

Closes: siemens#560
Fixes: 02dd6b0 ("feat(storage): add initial support for commit/rollback")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
We currently silently ignore CoW operations with the QEMU backend in
case the CoW device is not configured. This is different from the usbf
backend, which raises in this case.

To keep both implementations in sync, we now also raise in QEMU if a CoW
operation shall be performed without having a device (and this case is
not explicitly ignored via ignore_missing).

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
@chombourger chombourger changed the base branch from master to next January 9, 2026 10:22
@fmoessbauer fmoessbauer merged commit 6acc2f1 into siemens:next Jan 12, 2026
5 checks passed
@fmoessbauer fmoessbauer deleted the fm/fix-no-cow branch January 12, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

storage (usbf): cow config option is not optional

2 participants