[Qemu-devel] [PATCH 0/6] qga: add support for re-opening channel on error

Michael Roth posted 6 patches 8 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171026233054.21133-1-mdroth@linux.vnet.ibm.com
Test checkpatch failed
Test docker passed
Test ppc passed
Test s390x passed
There is a newer version of this series
qga/channel-win32.c       |   3 +-
qga/installer/qemu-ga.wxs |   2 +-
qga/main.c                | 205 ++++++++++++++++++++++++++++++++++++++++++++++++------------------------
3 files changed, 141 insertions(+), 69 deletions(-)
[Qemu-devel] [PATCH 0/6] qga: add support for re-opening channel on error
Posted by Michael Roth 8 years ago
The following patches are also available at:
  https://github.com/mdroth/qemu/commits/qga-retry-path

This series adds a --retry-path option to qemu-ga to allow the agent
to periodically re-attempt opening a channel if the channel is not
yet present (e.g. qemu-ga is installed before virtio-serial drivers)
or if the channel encounters an error that might be recoverable (e.g.
the channel is hot unplugged/plugged).

This functionality is already possible via init systems like systemd (and
is already set up that way on Fedora), but we implement this option
to handle other OSs like Windows (where this was originally reported as
a problem).

PATCH 1-3 implement various refactorings that more clearly encapsulate
the agent's lifecycle into:

 a) config parsing (via main())
 b) initializing the agent (via initialize_agent())
 c) starting the agent (via run_agent())
 d) stopping the agent (via stop_agent())
 e) cleaning up the agent (via cleanup_agent())
 f) cleaning up the config (via main())

PATCH 4 implements the actual --retry-path option, which simply wraps
run_agent() in a continuous loop until the agent is explicitly told
to exit.

 qga/channel-win32.c       |   3 +-
 qga/installer/qemu-ga.wxs |   2 +-
 qga/main.c                | 205 ++++++++++++++++++++++++++++++++++++++++++++++++------------------------
 3 files changed, 141 insertions(+), 69 deletions(-)


Re: [Qemu-devel] [PATCH 0/6] qga: add support for re-opening channel on error
Posted by no-reply@patchew.org 8 years ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH 0/6] qga: add support for re-opening channel on error
Type: series
Message-id: 20171026233054.21133-1-mdroth@linux.vnet.ibm.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20171026233054.21133-1-mdroth@linux.vnet.ibm.com -> patchew/20171026233054.21133-1-mdroth@linux.vnet.ibm.com
Switched to a new branch 'test'
2c0ad7d947 qga-win: report specific error when failing to open channel
0201eef61d qga-win: install service with --retry-path set by default
432d6851ff qga: add --retry-path option for re-initializing channel on failure
d242b19057 qga: move w32 service handling out of run_agent()
522ea4562e qga: hang GAConfig/socket_activation off of GAState global
615c58083f qga: group agent init/cleanup init separate routines

=== OUTPUT BEGIN ===
Checking PATCH 1/6: qga: group agent init/cleanup init separate routines...
ERROR: Use g_assert or g_assert_not_reached
#29: FILE: qga/main.c:1257:
+    g_assert_null(ga_state);

total: 1 errors, 0 warnings, 143 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 2/6: qga: hang GAConfig/socket_activation off of GAState global...
Checking PATCH 3/6: qga: move w32 service handling out of run_agent()...
Checking PATCH 4/6: qga: add --retry-path option for re-initializing channel on failure...
Checking PATCH 5/6: qga-win: install service with --retry-path set by default...
Checking PATCH 6/6: qga-win: report specific error when failing to open channel...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org