[Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel'
When you cancel an in-progress live block operation with QMP `block-job-cancel`, it emits the event: BLOCK_JOB_CANCELLED. However, when `block-job-cancel` is issued after `drive-mirror` has indicated (by emitting the event BLOCK_JOB_READY) that the source and destination remain synchronized: [...] # Snip `drive-mirror` invocation & outputs { "execute":"block-job-cancel", "arguments":{ "device":"virtio0" } } {"return": {}} It (`block-job-cancel`) will counterintuitively emit the event 'BLOCK_JOB_COMPLETED': { "timestamp":{ "seconds":1510678024, "microseconds":526240 }, "event":"BLOCK_JOB_COMPLETED", "data":{ "device":"virtio0", "len":41126400, "offset":41126400, "speed":0, "type":"mirror" } } But this is expected behaviour, where the _COMPLETED event indicates that synchronization has successfully ended (and the destination has a point-in-time copy, which is at the time of cancel). So add a small note to this effect. (Thanks: Max Reitz for reminding me of this on IRC.) --- qapi/block-core.json | 8 1 file changed, 8 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index ab96e348e6317bb42769ae20f4a4519bac02e93a..e43a7eaeb22b92c613edcb4219ed4f0e928577b6 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2065,6 +2065,14 @@ # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when # enumerated using query-block-jobs. # +# Note: The 'block-job-cancel' command will emit the event BLOCK_JOB_COMPLETED +# if you issue it ('block-job-cancel') after 'drive-mirror' has +# indicated (by emitting the event BLOCK_JOB_READY) that the source and +# destination remain synchronized. In this case, the BLOCK_JOB_COMPLETED event +# indicates that synchronization (from `drive-mirror`) has successfully ended +# and the destination now has a point-in-time copy, which is at the time of +# cancel. +# # For streaming, the image file retains its backing file unless the streaming # operation happens to complete just as it is being cancelled. A new streaming # operation can be started at a later time to finish copying all data from the -- 2.9.5
Re: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel'
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel' Type: series Message-id: 20171114191605.22349-1-kcham...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash set -e git submodule update --init dtc # Let docker tests dump environment info export SHOW_ENV=1 export J=8 time make docker-test-quick@centos6 time make docker-test-build@min-glib time make docker-test-mingw@fedora time make docker-test-block@fedora === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 375c460e8a qapi: block-core: Clarify events emitted by 'block-job-cancel' === OUTPUT BEGIN === Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc' Cloning into '/var/tmp/patchew-tester-tmp-q1izxxh8/src/dtc'... Submodule path 'dtc': checked out '558cd81bdd432769b59bff01240c44f82cfb1a9d' BUILD centos6 make[1]: Entering directory '/var/tmp/patchew-tester-tmp-q1izxxh8/src' GEN /var/tmp/patchew-tester-tmp-q1izxxh8/src/docker-src.2017-11-14-14.25.09.27009/qemu.tar Cloning into '/var/tmp/patchew-tester-tmp-q1izxxh8/src/docker-src.2017-11-14-14.25.09.27009/qemu.tar.vroot'... done. Checking out files: 27% (1530/5654) Checking out files: 28% (1584/5654) Checking out files: 29% (1640/5654) Checking out files: 30% (1697/5654) Checking out files: 31% (1753/5654) Checking out files: 32% (1810/5654) Checking out files: 33% (1866/5654) Checking out files: 34% (1923/5654) Checking out files: 35% (1979/5654) Checking out files: 36% (2036/5654) Checking out files: 37% (2092/5654) Checking out files: 38% (2149/5654) Checking out files: 39% (2206/5654) Checking out files: 40% (2262/5654) Checking out files: 40% (2278/5654) Checking out files: 41% (2319/5654) Checking out files: 42% (2375/5654) Checking out files: 43% (2432/5654) Checking out files: 44% (2488/5654) Checking out files: 45% (2545/5654) Checking out files: 46% (2601/5654) Checking out files: 47% (2658/5654) Checking out files: 48% (2714/5654) Checking out files: 49% (2771/5654) Checking out files: 50% (2827/5654) Checking out files: 51% (2884/5654) Checking out files: 52% (2941/5654) Checking out files: 53% (2997/5654) Checking out files: 54% (3054/5654) Checking out files: 55% (3110/5654) Checking out files: 56% (3167/5654) Checking out files: 57% (3223/5654) Checking out files: 58% (3280/5654) Checking out files: 59% (3336/5654) Checking out files: 60% (3393/5654) Checking out files: 61% (3449/5654) Checking out files: 62% (3506/5654) Checking out files: 63% (3563/5654) Checking out files: 64% (3619/5654) Checking out files: 65% (3676/5654) Checking out files: 66% (3732/5654) Checking out files: 67% (3789/5654) Checking out files: 68% (3845/5654) Checking out files: 69% (3902/5654) Checking out files: 70% (3958/5654) Checking out files: 71% (4015/5654) Checking out files: 72% (4071/5654) Checking out files: 73% (4128/5654) Checking out files: 74% (4184/5654) Checking out files: 75% (4241/5654) Checking out files: 76% (4298/5654) Checking out files: 77% (4354/5654) Checking out files: 78% (4411/5654) Checking out files: 79% (4467/5654) Checking out files: 80% (4524/5654) Checking out files: 81% (4580/5654) Checking out files: 82% (4637/5654) Checking out files: 83% (4693/5654) Checking out files: 84% (4750/5654) Checking out files: 85% (4806/5654) Checking out files: 86% (4863/5654) Checking out files: 87% (4919/5654) Checking out files: 88% (4976/5654) Checking out files: 89% (5033/5654) Checking out files: 90% (5089/5654) Checking out files: 91% (5146/5654) Checking out files: 92% (5202/5654) Checking out files: 93% (5259/5654) Checking out files: 94% (5315/5654) Checking out files: 95% (5372/5654) Checking out files: 96% (5428/5654) Checking out files: 97% (5485/5654) Checking out files: 98% (5541/5654) Checking out files: 99% (5598/5654) Checking out files: 100% (5654/5654) Checking out files: 100% (5654/5654), done. Your branch is up-to-date with 'origin/test'. Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc' Cloning into '/var/tmp/patchew-tester-tmp-q1izxxh8/src/docker-src.2017-11-14-14.25.09.27009/qemu.tar.vroot/dtc'... Submodule path 'dtc': checked out '558cd81bdd432769b59bff01240c44f82cfb1a9d' Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered for path 'ui/keycodemapdb
Re: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel'
Hi, This series failed build test on s390x host. Please find the details below. Type: series Subject: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel' Message-id: 20171114191605.22349-1-kcham...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base" # branch set -e echo "=== ENV ===" env echo "=== PACKAGES ===" rpm -qa echo "=== TEST BEGIN ===" CC=$HOME/bin/cc INSTALL=$PWD/install BUILD=$PWD/build echo -n "Using CC: " realpath $CC mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --cc=$CC --prefix=$INSTALL make -j4 # XXX: we need reliable clean up # make check -j4 V=1 make install === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20171114191605.22349-1-kcham...@redhat.com -> patchew/20171114191605.22349-1-kcham...@redhat.com Switched to a new branch 'test' 375c460 qapi: block-core: Clarify events emitted by 'block-job-cancel' === OUTPUT BEGIN === === ENV === XDG_SESSION_ID=91315 SHELL=/bin/sh USER=fam PATCHEW=/home/fam/patchew/patchew-cli -s http://patchew.org --nodebug PATH=/usr/bin:/bin PWD=/var/tmp/patchew-tester-tmp-ki994nis/src LANG=en_US.UTF-8 HOME=/home/fam SHLVL=2 LOGNAME=fam DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1012/bus XDG_RUNTIME_DIR=/run/user/1012 _=/usr/bin/env === PACKAGES === gpg-pubkey-873529b8-54e386ff xz-libs-5.2.2-2.fc24.s390x libxshmfence-1.2-3.fc24.s390x giflib-4.1.6-15.fc24.s390x trousers-lib-0.3.13-6.fc24.s390x ncurses-base-6.0-6.20160709.fc25.noarch gmp-6.1.1-1.fc25.s390x libidn-1.33-1.fc25.s390x slang-2.3.0-7.fc25.s390x pkgconfig-0.29.1-1.fc25.s390x alsa-lib-1.1.1-2.fc25.s390x yum-metadata-parser-1.1.4-17.fc25.s390x python3-slip-dbus-0.6.4-4.fc25.noarch python2-cssselect-0.9.2-1.fc25.noarch createrepo_c-libs-0.10.0-6.fc25.s390x initscripts-9.69-1.fc25.s390x parted-3.2-21.fc25.s390x flex-2.6.0-3.fc25.s390x colord-libs-1.3.4-1.fc25.s390x python-osbs-client-0.33-3.fc25.noarch perl-Pod-Simple-3.35-1.fc25.noarch python2-simplejson-3.10.0-1.fc25.s390x brltty-5.4-2.fc25.s390x librados2-10.2.4-2.fc25.s390x tcp_wrappers-7.6-83.fc25.s390x libcephfs_jni1-10.2.4-2.fc25.s390x nettle-devel-3.3-1.fc25.s390x bzip2-devel-1.0.6-21.fc25.s390x libuuid-2.28.2-2.fc25.s390x python3-dnf-1.1.10-6.fc25.noarch texlive-kpathsea-doc-svn41139-33.fc25.1.noarch openssh-7.4p1-4.fc25.s390x texlive-kpathsea-bin-svn40473-33.20160520.fc25.1.s390x texlive-graphics-svn41015-33.fc25.1.noarch texlive-dvipdfmx-def-svn40328-33.fc25.1.noarch texlive-mfware-svn40768-33.fc25.1.noarch texlive-texlive-scripts-svn41433-33.fc25.1.noarch texlive-euro-svn22191.1.1-33.fc25.1.noarch texlive-etex-svn37057.0-33.fc25.1.noarch texlive-iftex-svn29654.0.2-33.fc25.1.noarch texlive-palatino-svn31835.0-33.fc25.1.noarch texlive-texlive-docindex-svn41430-33.fc25.1.noarch texlive-xunicode-svn30466.0.981-33.fc25.1.noarch texlive-koma-script-svn41508-33.fc25.1.noarch texlive-pst-grad-svn15878.1.06-33.fc25.1.noarch texlive-pst-blur-svn15878.2.0-33.fc25.1.noarch texlive-jknapltx-svn19440.0-33.fc25.1.noarch texinfo-6.1-4.fc25.s390x openssl-devel-1.0.2k-1.fc25.s390x jansson-2.10-2.fc25.s390x fedora-repos-25-4.noarch perl-Errno-1.25-387.fc25.s390x acl-2.2.52-13.fc25.s390x systemd-pam-231-17.fc25.s390x NetworkManager-libnm-1.4.4-5.fc25.s390x poppler-0.45.0-5.fc25.s390x ccache-3.3.4-1.fc25.s390x valgrind-3.12.0-9.fc25.s390x perl-open-1.10-387.fc25.noarch libgcc-6.4.1-1.fc25.s390x libsoup-2.56.1-1.fc25.s390x libstdc++-devel-6.4.1-1.fc25.s390x libobjc-6.4.1-1.fc25.s390x python2-rpm-4.13.0.1-2.fc25.s390x python2-gluster-3.10.5-1.fc25.s390x rpm-build-4.13.0.1-2.fc25.s390x glibc-static-2.24-10.fc25.s390x lz4-1.8.0-1.fc25.s390x xapian-core-libs-1.2.24-1.fc25.s390x elfutils-libelf-devel-0.169-1.fc25.s390x nss-softokn-3.32.0-1.2.fc25.s390x pango-1.40.9-1.fc25.s390x glibc-debuginfo-common-2.24-10.fc25.s390x libaio-0.3.110-6.fc24.s390x libfontenc-1.1.3-3.fc24.s390x lzo-2.08-8.fc24.s390x isl-0.14-5.fc24.s390x libXau-1.0.8-6.fc24.s390x linux-atm-libs-2.5.1-14.fc24.s390x libXext-1.3.3-4.fc24.s390x libXxf86vm-1.1.4-3.fc24.s390x bison-3.0.4-4.fc24.s390x perl-srpm-macros-1-20.fc25.noarch gawk-4.1.3-8.fc25.s390x libwayland-client-1.12.0-1.fc25.s390x perl-Exporter-5.72-366.fc25.noarch perl-version-0.99.17-1.fc25.s390x fftw-libs-double-3.3.5-3.fc25.s390x libssh2-1.8.0-1.fc25.s390x ModemManager-glib-1.6.4-1.fc25.s390x newt-python3-0.52.19-2.fc25.s390x python-munch-2.0.4-3.fc25.noarch python-bugzilla-1.2.2-4.fc25.noarch libedit-3.1-16.20160618cvs.fc25.s390x createrepo_c-0.10.0-6.fc25.s390x device-mapper-multipath-libs-0.4.9-83.fc25.s390x yum-3.4.3-510.fc25.noarch mozjs17-17.0.0-16.fc25.s390x libselinux-2.5-13.fc25.s390x python2-pyparsing-2.1.10-1.fc25.noarch cairo-gobject-1.14.8-1.fc25.s390x xorg-x11-proto-de
Re: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel'
Hi, This series failed build test on ppc host. Please find the details below. Type: series Subject: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel' Message-id: 20171114191605.22349-1-kcham...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base" # branch set -e echo "=== ENV ===" env echo "=== PACKAGES ===" rpm -qa echo "=== TEST BEGIN ===" INSTALL=$PWD/install BUILD=$PWD/build mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --prefix=$INSTALL make -j100 # XXX: we need reliable clean up # make check -j100 V=1 make install === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20171114191605.22349-1-kcham...@redhat.com -> patchew/20171114191605.22349-1-kcham...@redhat.com Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc' Submodule 'pixman' (git://anongit.freedesktop.org/pixman) registered for path 'pixman' Submodule 'roms/SLOF' (git://git.qemu-project.org/SLOF.git) registered for path 'roms/SLOF' Submodule 'roms/ipxe' (git://git.qemu-project.org/ipxe.git) registered for path 'roms/ipxe' Submodule 'roms/openbios' (git://git.qemu-project.org/openbios.git) registered for path 'roms/openbios' Submodule 'roms/openhackware' (git://git.qemu-project.org/openhackware.git) registered for path 'roms/openhackware' Submodule 'roms/qemu-palcode' (git://github.com/rth7680/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (git://git.qemu-project.org/seabios.git/) registered for path 'roms/seabios' Submodule 'roms/sgabios' (git://git.qemu-project.org/sgabios.git) registered for path 'roms/sgabios' Submodule 'roms/u-boot' (git://git.qemu-project.org/u-boot.git) registered for path 'roms/u-boot' Submodule 'roms/vgabios' (git://git.qemu-project.org/vgabios.git/) registered for path 'roms/vgabios' Cloning into 'dtc'... Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf' Cloning into 'pixman'... Submodule path 'pixman': checked out '87eea99e443b389c978cf37efc52788bf03a0ee0' Cloning into 'roms/SLOF'... Submodule path 'roms/SLOF': checked out 'e3d05727a074619fc12d0a67f05cf2c42c875cce' Cloning into 'roms/ipxe'... Submodule path 'roms/ipxe': checked out '04186319181298083ef28695a8309028b26fe83c' Cloning into 'roms/openbios'... Submodule path 'roms/openbios': checked out 'e79bca64838c96ec44fd7acd508879c5284233dd' Cloning into 'roms/openhackware'... Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5' Cloning into 'roms/qemu-palcode'... Submodule path 'roms/qemu-palcode': checked out 'c87a92639b28ac42bc8f6c67443543b405dc479b' Cloning into 'roms/seabios'... Submodule path 'roms/seabios': checked out 'e2fc41e24ee0ada60fc511d60b15a41b294538be' Cloning into 'roms/sgabios'... Submodule path 'roms/sgabios': checked out '23d474943dcd55d0550a3d20b3d30e9040a4f15b' Cloning into 'roms/u-boot'... Submodule path 'roms/u-boot': checked out '2072e7262965bb48d7fffb1e283101e6ed8b21a8' Cloning into 'roms/vgabios'... Submodule path 'roms/vgabios': checked out '19ea12c230ded95928ecaef0db47a82231c2e485' warning: unable to rmdir pixman: Directory not empty Switched to a new branch 'test' M dtc M roms/SLOF M roms/ipxe M roms/openbios M roms/qemu-palcode M roms/seabios M roms/sgabios M roms/u-boot 375c460 qapi: block-core: Clarify events emitted by 'block-job-cancel' === OUTPUT BEGIN === === ENV === XDG_SESSION_ID=31750 SHELL=/bin/sh USER=patchew PATCHEW=/home/patchew/patchew/patchew-cli -s http://patchew.org --nodebug PATH=/usr/bin:/bin PWD=/var/tmp/patchew-tester-tmp-x1o6jiab/src LANG=en_US.UTF-8 HOME=/home/patchew SHLVL=2 LOGNAME=patchew XDG_RUNTIME_DIR=/run/user/1000 _=/usr/bin/env === PACKAGES === plymouth-core-libs-0.8.9-0.28.20140113.el7.centos.ppc64le vim-common-7.4.160-2.el7.ppc64le perl-Test-Simple-0.98-243.el7.noarch hplip-common-3.15.9-3.el7.ppc64le valgrind-3.12.0-8.el7.ppc64le gamin-0.1.10-16.el7.ppc64le libpeas-loader-python-1.20.0-1.el7.ppc64le telepathy-filesystem-0.0.2-6.el7.noarch colord-libs-1.3.4-1.el7.ppc64le kbd-legacy-1.15.5-13.el7.noarch perl-CPAN-Meta-YAML-0.
Re: [Qemu-devel] [PATCH] qapi: block-core: Clarify events emitted by 'block-job-cancel'
On Tue, Nov 14, 2017 at 11:26:59AM -0800, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. [...] > In file included from /tmp/qemu-test/src/qapi-schema.json:85: > In file included from /tmp/qemu-test/src/qapi/block.json:7: > /tmp/qemu-test/src/qapi/block-core.json:2081:1: '@device:' can't follow > 'Note' section Hmm, I don't know the syntax enough to see why the 'Note' section is not allowed. But it's not strictly needed at all. So I'll just do: s/Note:/It is worth noting/ > make: *** [qapi-visit.h] Error 1 > make: *** Deleting file `qapi-visit.h' > make: *** Waiting for unfinished jobs [...] -- /kashyap