... | ... | ||
---|---|---|---|
4 | downstream that packages 4.0. | 4 | downstream that packages 4.0. |
5 | 5 | ||
6 | This patch is an attempt at a nearly full rewrite that revitalizes this | 6 | This patch is an attempt at a nearly full rewrite that revitalizes this |
7 | document to address frequent questions I encounter when discussing the | 7 | document to address frequent questions I encounter when discussing the |
8 | API. | 8 | API. |
9 | |||
10 | V3: | ||
11 | - Added -W flag to patch 1/2 | ||
12 | - Addressed comments from Vladimir on patch 2/2. | ||
9 | 13 | ||
10 | V2: | 14 | V2: |
11 | - Split off makefile change into its own little patch. | 15 | - Split off makefile change into its own little patch. |
12 | 16 | ||
13 | - Addressed (almost) all comments from Vladimir. | 17 | - Addressed (almost) all comments from Vladimir. |
... | ... | ||
35 | 39 | ||
36 | John Snow (2): | 40 | John Snow (2): |
37 | Makefile: add nit-picky mode to sphinx-build | 41 | Makefile: add nit-picky mode to sphinx-build |
38 | docs/interop/bitmaps: rewrite and modernize doc | 42 | docs/interop/bitmaps: rewrite and modernize doc |
39 | 43 | ||
40 | docs/interop/bitmaps.rst | 1600 ++++++++++++++++++++++++++++++-------- | 44 | docs/interop/bitmaps.rst | 1599 ++++++++++++++++++++++++++++++-------- |
41 | Makefile | 2 +- | 45 | Makefile | 2 +- |
42 | 2 files changed, 1266 insertions(+), 336 deletions(-) | 46 | 2 files changed, 1265 insertions(+), 336 deletions(-) |
43 | 47 | ||
44 | -- | 48 | -- |
45 | 2.20.1 | 49 | 2.20.1 |
46 | 50 | ||
47 | 51 | diff view generated by jsdifflib |
1 | If we add references that don't resolve (or accidentally remove them), | 1 | If we add references that don't resolve (or accidentally remove them), |
---|---|---|---|
2 | it will be helpful to have an error message alerting us to that. | 2 | it will be helpful to have an error message alerting us to that. |
3 | |||
4 | Turn warnings into errors so we can be alerted to problems in building | ||
5 | the documentation when they arise. | ||
3 | 6 | ||
4 | Signed-off-by: John Snow <jsnow@redhat.com> | 7 | Signed-off-by: John Snow <jsnow@redhat.com> |
5 | --- | 8 | --- |
6 | Makefile | 2 +- | 9 | Makefile | 2 +- |
7 | 1 file changed, 1 insertion(+), 1 deletion(-) | 10 | 1 file changed, 1 insertion(+), 1 deletion(-) |
... | ... | ||
13 | @@ -XXX,XX +XXX,XX @@ docs/version.texi: $(SRC_PATH)/VERSION | 16 | @@ -XXX,XX +XXX,XX @@ docs/version.texi: $(SRC_PATH)/VERSION |
14 | sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html $(MANUAL_BUILDDIR)/interop/index.html | 17 | sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html $(MANUAL_BUILDDIR)/interop/index.html |
15 | 18 | ||
16 | # Canned command to build a single manual | 19 | # Canned command to build a single manual |
17 | -build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") | 20 | -build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") |
18 | +build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -n -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") | 21 | +build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -W -n -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") |
19 | # We assume all RST files in the manual's directory are used in it | 22 | # We assume all RST files in the manual's directory are used in it |
20 | manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py | 23 | manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py |
21 | 24 | ||
22 | -- | 25 | -- |
23 | 2.20.1 | 26 | 2.20.1 |
24 | 27 | ||
25 | 28 | diff view generated by jsdifflib |
... | ... | ||
---|---|---|---|
16 | unmanagable. We did decide to convert it from Markdown to ReST, after | 16 | unmanagable. We did decide to convert it from Markdown to ReST, after |
17 | all, so I am going all-in on ReST.) | 17 | all, so I am going all-in on ReST.) |
18 | 18 | ||
19 | Signed-off-by: John Snow <jsnow@redhat.com> | 19 | Signed-off-by: John Snow <jsnow@redhat.com> |
20 | --- | 20 | --- |
21 | docs/interop/bitmaps.rst | 1600 ++++++++++++++++++++++++++++++-------- | 21 | docs/interop/bitmaps.rst | 1599 ++++++++++++++++++++++++++++++-------- |
22 | 1 file changed, 1265 insertions(+), 335 deletions(-) | 22 | 1 file changed, 1264 insertions(+), 335 deletions(-) |
23 | 23 | ||
24 | diff --git a/docs/interop/bitmaps.rst b/docs/interop/bitmaps.rst | 24 | diff --git a/docs/interop/bitmaps.rst b/docs/interop/bitmaps.rst |
25 | index XXXXXXX..XXXXXXX 100644 | 25 | index XXXXXXX..XXXXXXX 100644 |
26 | --- a/docs/interop/bitmaps.rst | 26 | --- a/docs/interop/bitmaps.rst |
27 | +++ b/docs/interop/bitmaps.rst | 27 | +++ b/docs/interop/bitmaps.rst |
... | ... | ||
171 | +commands documented below will refuse to work on such bitmaps. | 171 | +commands documented below will refuse to work on such bitmaps. |
172 | + | 172 | + |
173 | +The ``+inconsistent`` status similarly prohibits almost all operations, | 173 | +The ``+inconsistent`` status similarly prohibits almost all operations, |
174 | +notably allowing only the ``block-dirty-bitmap-remove`` operation. | 174 | +notably allowing only the ``block-dirty-bitmap-remove`` operation. |
175 | + | 175 | + |
176 | +There is also a deprecated "`DirtyBitmapStatus | 176 | +There is also a deprecated ``status`` field of type `DirtyBitmapStatus |
177 | +<qemu-qmp-ref.html#index-DirtyBitmapStatus>`_" field. a bitmap historically | 177 | +<qemu-qmp-ref.html#index-DirtyBitmapStatus>`_. A bitmap historically had |
178 | +had five visible states: | 178 | +five visible states: |
179 | + | 179 | + |
180 | + #. ``Frozen``: This bitmap is currently in-use by an operation and is | 180 | + #. ``Frozen``: This bitmap is currently in-use by an operation and is |
181 | + immutable. It can't be deleted, renamed, reset, etc. | 181 | + immutable. It can't be deleted, renamed, reset, etc. |
182 | + | 182 | + |
183 | + (This is now ``+busy``.) | 183 | + (This is now ``+busy``.) |
... | ... | ||
1044 | +backups in a chain available to link against. This is not a problem at backup | 1044 | +backups in a chain available to link against. This is not a problem at backup |
1045 | +time; we simply do not set the backing image when creating the destination | 1045 | +time; we simply do not set the backing image when creating the destination |
1046 | +image: | 1046 | +image: |
1047 | + | 1047 | + |
1048 | +#. Create a new destination image with no backing file set. We will need to | 1048 | +#. Create a new destination image with no backing file set. We will need to |
1049 | + specify the size of the base image this time, because it isn't available | 1049 | + specify the size of the base image, because the backing file isn't |
1050 | + for QEMU to use to guess: | 1050 | + available for QEMU to use to determine it. |
1051 | 1051 | ||
1052 | .. code:: bash | 1052 | .. code:: bash |
1053 | 1053 | ||
1054 | - $ qemu-img create -f qcow2 incremental.0.img -b full_backup.img -F qcow2 | 1054 | - $ qemu-img create -f qcow2 incremental.0.img -b full_backup.img -F qcow2 |
1055 | + $ qemu-img create -f qcow2 drive0.inc2.qcow2 64G | 1055 | + $ qemu-img create -f qcow2 drive0.inc2.qcow2 64G |
... | ... | ||
1309 | +same bitmap. | 1309 | +same bitmap. |
1310 | + | 1310 | + |
1311 | +Example: Individual Failures | 1311 | +Example: Individual Failures |
1312 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 1312 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
1313 | + | 1313 | + |
1314 | +Backup jobs that fail individually behave simply as described above. This | 1314 | +Incremental Push Backup jobs that fail individually behave simply as |
1315 | +example shows the simplest case: | 1315 | +described above. This example demonstrates the single-job failure case: |
1316 | + | 1316 | + |
1317 | +#. Create a target image: | 1317 | +#. Create a target image: |
1318 | + | 1318 | + |
1319 | + .. code:: bash | 1319 | + .. code:: bash |
1320 | + | 1320 | + |
... | ... | ||
1346 | + <- { | 1346 | + <- { |
1347 | + "timestamp": {...}, | 1347 | + "timestamp": {...}, |
1348 | + "data": { | 1348 | + "data": { |
1349 | + "device": "drive0", | 1349 | + "device": "drive0", |
1350 | + "action": "report", | 1350 | + "action": "report", |
1351 | + "operation": "read" | 1351 | + "operation": "write" |
1352 | + }, | 1352 | + }, |
1353 | + "event": "BLOCK_JOB_ERROR" | 1353 | + "event": "BLOCK_JOB_ERROR" |
1354 | + } | 1354 | + } |
1355 | + | 1355 | + |
1356 | + <- { | 1356 | + <- { |
... | ... | ||
1464 | +scenario, even though others failed. | 1464 | +scenario, even though others failed. |
1465 | + | 1465 | + |
1466 | +This example illustrates a transaction with two backup jobs, where one fails | 1466 | +This example illustrates a transaction with two backup jobs, where one fails |
1467 | +and one succeeds: | 1467 | +and one succeeds: |
1468 | + | 1468 | + |
1469 | +#. Issue the transaction to start a backup of both drives. Note that the | 1469 | +#. Issue the transaction to start a backup of both drives. |
1470 | + transaction is accepted, indicating that the jobs are started succesfully. | ||
1471 | 1470 | ||
1472 | .. code:: json | 1471 | .. code:: json |
1473 | 1472 | ||
1474 | - { "execute": "transaction", | 1473 | - { "execute": "transaction", |
1475 | + -> { | 1474 | + -> { |
... | ... | ||
1585 | 1584 | ||
1586 | - { "timestamp": { "seconds": 1447192399, "microseconds": 683015 }, | 1585 | - { "timestamp": { "seconds": 1447192399, "microseconds": 683015 }, |
1587 | - "data": { "device": "drive1", "action": "report", | 1586 | - "data": { "device": "drive1", "action": "report", |
1588 | - "operation": "read" }, | 1587 | - "operation": "read" }, |
1589 | - "event": "BLOCK_JOB_ERROR" } | 1588 | - "event": "BLOCK_JOB_ERROR" } |
1590 | +In other words, at the conclusion of the above example, we'd have made only an | 1589 | +For this example, an incremental backup for ``drive0`` was created, but not |
1591 | +incremental backup for drive0 but not drive1. The last VM-wide crash | 1590 | +for ``drive1``. The last VM-wide crash-consistent backup that is available in |
1592 | +consistent backup we have access to in this case is the anchor point. | 1591 | +this case is the full backup: |
1593 | 1592 | ||
1594 | - .. code:: json | 1593 | - .. code:: json |
1595 | +.. code:: text | 1594 | +.. code:: text |
1596 | 1595 | ||
1597 | - { "timestamp": { "seconds": 1447192399, "microseconds": | 1596 | - { "timestamp": { "seconds": 1447192399, "microseconds": |
... | ... | diff view generated by jsdifflib |