yank.json (9b112b1b79f0e93242a9ce9bffd1113458e93e03) yank.json (a937b6aa739f65f2cae2ad9a7eb65a309ad2a359)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4
5##
6# = Yank feature
7##
8
9##
10# @YankInstanceType:
11#
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4
5##
6# = Yank feature
7##
8
9##
10# @YankInstanceType:
11#
12# An enumeration of yank instance types. See @YankInstance for more
12# An enumeration of yank instance types. See @YankInstance for more
13# information.
14#
15# Since: 6.0
16##
17{ 'enum': 'YankInstanceType',
18 'data': [ 'block-node', 'chardev', 'migration' ] }
19
20##
21# @YankInstanceBlockNode:
22#
13# information.
14#
15# Since: 6.0
16##
17{ 'enum': 'YankInstanceType',
18 'data': [ 'block-node', 'chardev', 'migration' ] }
19
20##
21# @YankInstanceBlockNode:
22#
23# Specifies which block graph node to yank. See @YankInstance for more
24# information.
23# Specifies which block graph node to yank. See @YankInstance for
24# more information.
25#
26# @node-name: the name of the block graph node
27#
28# Since: 6.0
29##
30{ 'struct': 'YankInstanceBlockNode',
31 'data': { 'node-name': 'str' } }
32
33##
34# @YankInstanceChardev:
35#
25#
26# @node-name: the name of the block graph node
27#
28# Since: 6.0
29##
30{ 'struct': 'YankInstanceBlockNode',
31 'data': { 'node-name': 'str' } }
32
33##
34# @YankInstanceChardev:
35#
36# Specifies which character device to yank. See @YankInstance for more
37# information.
36# Specifies which character device to yank. See @YankInstance for
37# more information.
38#
39# @id: the chardev's ID
40#
41# Since: 6.0
42##
43{ 'struct': 'YankInstanceChardev',
44 'data': { 'id': 'str' } }
45
46##
47# @YankInstance:
48#
38#
39# @id: the chardev's ID
40#
41# Since: 6.0
42##
43{ 'struct': 'YankInstanceChardev',
44 'data': { 'id': 'str' } }
45
46##
47# @YankInstance:
48#
49# A yank instance can be yanked with the @yank qmp command to recover from a
50# hanging QEMU.
49# A yank instance can be yanked with the @yank qmp command to recover
50# from a hanging QEMU.
51#
52# Currently implemented yank instances:
53#
51#
52# Currently implemented yank instances:
53#
54# - nbd block device:
55# Yanking it will shut down the connection to the nbd server without
56# attempting to reconnect.
57# - socket chardev:
58# Yanking it will shut down the connected socket.
59# - migration:
60# Yanking it will shut down all migration connections. Unlike
61# @migrate_cancel, it will not notify the migration process, so migration
62# will go into @failed state, instead of @cancelled state. @yank should be
63# used to recover from hangs.
54# - nbd block device: Yanking it will shut down the connection to the
55# nbd server without attempting to reconnect.
56# - socket chardev: Yanking it will shut down the connected socket.
57# - migration: Yanking it will shut down all migration connections.
58# Unlike @migrate_cancel, it will not notify the migration process,
59# so migration will go into @failed state, instead of @cancelled
60# state. @yank should be used to recover from hangs.
64#
65# Since: 6.0
66##
67{ 'union': 'YankInstance',
68 'base': { 'type': 'YankInstanceType' },
69 'discriminator': 'type',
70 'data': {
71 'block-node': 'YankInstanceBlockNode',
72 'chardev': 'YankInstanceChardev' } }
73
74##
75# @yank:
76#
61#
62# Since: 6.0
63##
64{ 'union': 'YankInstance',
65 'base': { 'type': 'YankInstanceType' },
66 'discriminator': 'type',
67 'data': {
68 'block-node': 'YankInstanceBlockNode',
69 'chardev': 'YankInstanceChardev' } }
70
71##
72# @yank:
73#
77# Try to recover from hanging QEMU by yanking the specified instances. See
78# @YankInstance for more information.
74# Try to recover from hanging QEMU by yanking the specified instances.
75# See @YankInstance for more information.
79#
80# Takes a list of @YankInstance as argument.
81#
76#
77# Takes a list of @YankInstance as argument.
78#
82# Returns: - Nothing on success
83# - @DeviceNotFound error, if any of the YankInstances doesn't exist
79# Returns:
80# - Nothing on success
81# - @DeviceNotFound error, if any of the YankInstances doesn't exist
84#
85# Example:
86#
87# -> { "execute": "yank",
88# "arguments": {
89# "instances": [
90# { "type": "block-node",
91# "node-name": "nbd0" }

--- 4 unchanged lines hidden (view full) ---

96##
97{ 'command': 'yank',
98 'data': { 'instances': ['YankInstance'] },
99 'allow-oob': true }
100
101##
102# @query-yank:
103#
82#
83# Example:
84#
85# -> { "execute": "yank",
86# "arguments": {
87# "instances": [
88# { "type": "block-node",
89# "node-name": "nbd0" }

--- 4 unchanged lines hidden (view full) ---

94##
95{ 'command': 'yank',
96 'data': { 'instances': ['YankInstance'] },
97 'allow-oob': true }
98
99##
100# @query-yank:
101#
104# Query yank instances. See @YankInstance for more information.
102# Query yank instances. See @YankInstance for more information.
105#
106# Returns: list of @YankInstance
107#
108# Example:
109#
110# -> { "execute": "query-yank" }
111# <- { "return": [
112# { "type": "block-node",
113# "node-name": "nbd0" }
114# ] }
115#
116# Since: 6.0
117##
118{ 'command': 'query-yank',
119 'returns': ['YankInstance'],
120 'allow-oob': true }
103#
104# Returns: list of @YankInstance
105#
106# Example:
107#
108# -> { "execute": "query-yank" }
109# <- { "return": [
110# { "type": "block-node",
111# "node-name": "nbd0" }
112# ] }
113#
114# Since: 6.0
115##
116{ 'command': 'query-yank',
117 'returns': ['YankInstance'],
118 'allow-oob': true }