diff options
author | Jiri Denemark <jdenemar@redhat.com> | 2023-02-28 16:53:29 +0100 |
---|---|---|
committer | Jiri Denemark <jdenemar@redhat.com> | 2023-03-15 10:52:14 +0100 |
commit | b1b037fa5b4444243d72eadf0e31aa0f3e9389cb (patch) | |
tree | 4c93971c0264a0463a12b4d453ccd3b0a07fba14 /include | |
parent | 6414046e9ce609d316e12966d0bcafa3568599d6 (diff) | |
download | libvirt-b1b037fa5b4444243d72eadf0e31aa0f3e9389cb.tar.gz |
Introduce VIR_DOMAIN_PAUSED_API_ERROR
Some APIs (migration, save/restore, snapshot, ...) require a domain to
be suspended temporarily. In case resuming the domain fails, the domain
will be unexpectedly left paused when the API finishes. This situation
is reported via VIR_DOMAIN_EVENT_SUSPENDED event with
VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR detail. But we do not have a
corresponding reason for VIR_DOMAIN_PAUSED state and the reason would
remain set to the value used when the domain was paused. So the state
reason would suggest the operation is still running.
This patch changes the state reason to a new VIR_DOMAIN_PAUSED_API_ERROR
to make it clear the API that paused the domain already finished, but
failed to resume the domain.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libvirt/libvirt-domain.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 53cab6bd4c..3ebb2c6642 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -148,6 +148,7 @@ typedef enum { VIR_DOMAIN_PAUSED_STARTING_UP = 11, /* the domain is being started (Since: 1.2.14) */ VIR_DOMAIN_PAUSED_POSTCOPY = 12, /* paused for post-copy migration (Since: 1.3.3) */ VIR_DOMAIN_PAUSED_POSTCOPY_FAILED = 13, /* paused after failed post-copy (Since: 1.3.3) */ + VIR_DOMAIN_PAUSED_API_ERROR = 14, /* Some APIs (e.g., migration, snapshot) internally need to suspend a domain. This paused state reason is used when resume operation at the end of such API fails. (Since: 9.2.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_PAUSED_LAST /* (Since: 0.9.10) */ |