qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 26de22: qga: add systemd socket activation su


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 26de22: qga: add systemd socket activation support
Date: Tue, 07 Mar 2017 01:15:11 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 26de229657b943b7a59ad79c387506f6f33ff963
      
https://github.com/qemu/qemu/commit/26de229657b943b7a59ad79c387506f6f33ff963
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-03-06 (Mon, 06 Mar 2017)

  Changed paths:
    M qga/channel-posix.c
    M qga/channel-win32.c
    M qga/channel.h
    M qga/main.c

  Log Message:
  -----------
  qga: add systemd socket activation support

AF_UNIX and AF_VSOCK listen sockets can be passed in by systemd on
startup.  This allows systemd to manage the listen socket until the
first client connects and between restarts.  Advantages of socket
activation are that parallel startup of network services becomes
possible and that unused daemons do not consume memory.

The key to achieving this is the LISTEN_FDS environment variable, which
is a stable ABI as shown here:
https://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/

We could link against libsystemd and use sd_listen_fds(3) but it's easy
to implement the tiny LISTEN_FDS ABI so that qemu-ga does not depend on
libsystemd.  Some systems may not have systemd installed and wish to
avoid the dependency.  Other init systems or socket activation servers
may implement the same ABI without systemd involvement.

Test as follows:

  $ cat ~/.config/systemd/user/qga.service
  [Unit]
  Description=qga

  [Service]
  WorkingDirectory=/tmp
  ExecStart=/path/to/qemu-ga --logfile=/tmp/qga.log --pidfile=/tmp/qga.pid 
--statedir=/tmp

  $ cat ~/.config/systemd/user/qga.socket
  [Socket]
  ListenStream=/tmp/qga.sock

  [Install]
  WantedBy=default.target

  $ systemctl --user daemon-reload
  $ systemctl --user start qga.socket
  $ nc -U /tmp/qga.sock

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: ce2eb6c4a044d809caf4dc4e08aed77678f9760e
      
https://github.com/qemu/qemu/commit/ce2eb6c4a044d809caf4dc4e08aed77678f9760e
  Author: Peter Lieven <address@hidden>
  Date:   2017-03-06 (Mon, 06 Mar 2017)

  Changed paths:
    M qga/commands-posix.c

  Log Message:
  -----------
  qga: ignore EBUSY when freezing a filesystem

the current implementation fails if we try to freeze an
already frozen filesystem. This can happen if a filesystem
is mounted more than once (e.g. with a bind mount).

Suggested-by: Christian Theune <address@hidden>
Cc: address@hidden
Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: ec72c0e271f2b13953079a4f4dadb49ac5910b54
      
https://github.com/qemu/qemu/commit/ec72c0e271f2b13953079a4f4dadb49ac5910b54
  Author: Bruce Rogers <address@hidden>
  Date:   2017-03-06 (Mon, 06 Mar 2017)

  Changed paths:
    M tests/test-qga.c

  Log Message:
  -----------
  tests: check path to avoid a failing qga/get-vcpus test

The qga/get-vcpus test fails in a simple chroot environment, as
used in an openSUSE Build Service local build, so first check
that the sysfs based path exists in order to avoid calling this
test in an environment where it won't work right.

Signed-off-by: Bruce Rogers <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: 7dc3bc7a043a0492d5a7ff9a88322ba733830337
      
https://github.com/qemu/qemu/commit/7dc3bc7a043a0492d5a7ff9a88322ba733830337
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-07 (Tue, 07 Mar 2017)

  Changed paths:
    M qga/channel-posix.c
    M qga/channel-win32.c
    M qga/channel.h
    M qga/commands-posix.c
    M qga/main.c
    M tests/test-qga.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2017-03-06-tag' 
into staging

qemu-ga patch queue for 2.9

* fix fsfreeze for filesystems mounted in multiple locations
* fix test failure when running in a chroot
* support for socket-based activation

# gpg: Signature made Mon 06 Mar 2017 07:54:17 GMT
# gpg:                using RSA key 0x3353C9CEF108B584
# gpg: Good signature from "Michael Roth <address@hidden>"
# gpg:                 aka "Michael Roth <address@hidden>"
# gpg:                 aka "Michael Roth <address@hidden>"
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2017-03-06-tag:
  tests: check path to avoid a failing qga/get-vcpus test
  qga: ignore EBUSY when freezing a filesystem
  qga: add systemd socket activation support

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/eba44e9339fc...7dc3bc7a043a

reply via email to

[Prev in Thread] Current Thread [Next in Thread]