1. 19 8月, 2011 16 次提交
  2. 18 8月, 2011 4 次提交
    • E
      build: fix virnetsocket on mingw · 310b09ec
      Eric Blake 提交于
      Regression introduced in commit 5d30db09.
      
      * src/rpc/virnetsocket.c (virNetSocketNewListenUNIX) [WIN32]: Use
      correct signature.
      310b09ec
    • E
      build: fix virpidfile on mingw · c811de8f
      Eric Blake 提交于
      Regression introduced in commit b7e5ca48.
      
      Mingw lacks kill(), but we were only using it for a sanity check;
      so we can go with one less check.
      
      Also, on OOM error, this function should outright fail rather than
      claim that the pid file was successfully read.
      
      * src/util/virpidfile.c (virPidFileReadPathIfAlive): Skip kill
      call where unsupported, and report error on OOM.
      c811de8f
    • D
      Ensure async packets never get marked for sync replies · 984840a2
      Daniel P. Berrange 提交于
      If a client had initiated a stream abort, it will have a call
      waiting for a reply in the queue. If more data continues to
      arrive on the stream, the abort command could mistakenly get
      signalled as complete. Remove the code from async data processing
      that looked for waiting calls. Add a sanity check to ensure no
      async call can ever be marked as needing a reply
      
      * src/rpc/virnetclient.c: Ensure async data packets can't
        trigger a reply
      984840a2
    • D
      Don't attempt to read from a stream if it is closed · dbf04dac
      Daniel P. Berrange 提交于
      The I/O event callback processes incoming packets first, and then
      does outgoing packets. If the incoming packet caused the stream to
      close, then the attempt to process outgoing data resulted in an
      error. This caused libvirt to then send an error back to the client,
      but the stream had already been stopped. This confused the client
      since it sees 2 error events.
      
      * daemon/stream.c: Don't attempt read if stream is closed
      dbf04dac
  3. 17 8月, 2011 12 次提交
    • T
      qemu: disk migration verbose progress · 108ca333
      Tom Vijlbrief 提交于
      A virsh command like:
      
      migrate --live --copy-storage-all Guest qemu+ssh://user@host/system
      --persistent --verbose
      
      shows
      
      Migration: [  0 %]
      
      during the storage copy and does not start counting
      until the ram transfer starts
      
      Fix this by scraping optional disk transfer status, and adding it
      into the progress meter.
      108ca333
    • E
      virsh: concatenate qemu-monitor-command arguments · 531c8581
      Eric Blake 提交于
      Call me lazy, but:
      
      virsh qemu-monitor-command dom --hmp info status
      
      is nicer than:
      
      virsh qemu-monitor-command dom --hmp 'info status'
      
      * tools/virsh.c (cmdQemuMonitorCommand): Allow multiple arguments,
      for convenience.
      531c8581
    • O
      qemu: Init reattaching related members of pciDevice before reattach · 2ce90ea2
      Osier Yang 提交于
      Otherwise the device will still be bound to pci-stub driver even
      it's set as "managed=yes" when do detaching. Of course, it won't
      triger any driver reprobing too.
      2ce90ea2
    • E
      virsh: tweak misleading wording · cfbccb38
      Eric Blake 提交于
      Fixes confusing docs introduced in commit 98369d31.
      
      * tools/virsh.c (cmdSnapshotParent): Operates on named snapshot,
      not current.
      cfbccb38
    • D
      Tweak debugging message in RPC client code · d48a0597
      Daniel P. Berrange 提交于
      Make it clearer that a log message is for an outgoing message
      d48a0597
    • D
      Fix race condition in abort of stream · b4633113
      Daniel P. Berrange 提交于
      If a stream gets a server initiated abort, the client may still
      send an abort request before it receives the server side abort.
      This causes the server to send back another abort for the
      stream. Since the protocol defines that abort is the last thing
      to be sent, the client gets confused by this second abort from
      the server. If the stream is already shutdown, just drop any
      client requested abort, rather than sending back another message.
      This fixes the regression from previous versions.
      
      Tested as follows
      
      In one virsh session
      
        virsh # start foo
        virsh # console foo
      
      In other virsh session
      
        virsh # destroy foo
      
      The first virsh session should be able to continue issuing
      commands without error. Prior to this patch it saw
      
        virsh # list
        error: Failed to list active domains
        error: An error occurred, but the cause is unknown
      
        virsh # list
        error: Failed to list active domains
        error: no call waiting for reply with prog 536903814 vers 1 serial 9
      
      * src/rpc/virnetserverprogram.c: Drop abort requests
        for streams which no longer exist
      b4633113
    • D
      Ensure client streams are closed when marking a client for close · f682c253
      Daniel P. Berrange 提交于
      Every active stream results in a reference being held on the
      virNetServerClientPtr object. This meant that if a client quit
      with any streams active, although all I/O was stopped the
      virNetServerClientPtr object would leak. This causes libvirtd
      to leak any file handles associated with open streams when a
      client quit
      
      To fix this, when we call virNetServerClientClose there is a
      callback invoked which lets the daemon release the streams
      and thus the extra references
      
      * daemon/remote.c: Add a hook to close all streams
      * daemon/stream.c, daemon/stream.h: Add API for releasing
        all streams
      * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h:
        Allow registration of a hook to trigger when closing client
      f682c253
    • D
      Ensure stream is aborted when exiting console · 3cf37700
      Daniel P. Berrange 提交于
      After running 'virsh console' in interactive mode, there was a
      missing call to virStreamAbort, which meant the server kept the
      stream resources open
      
      * tools/console.c: Abort stream when exiting
      3cf37700
    • S
      maint: fix some compilation issues on non-linux platforms (part 2) · 57c7b40b
      Stefan Berger 提交于
      Get rid of the #if __linux__ check in virPidFileReadPathIfAlive that
      was preventing a check of a symbolic link in /proc/<pid>/exe on
      non-linux platforms against an expected executable. Replace
      this with a run-time check testing whether the /proc/<pid>/exe is a
      symbolic link and if so call the function doing the comparison
      against the expected file the link is supposed to point to.
      57c7b40b
    • S
      maint: fix some compilation issues on non-linux platforms · f4765b69
      Stefan Berger 提交于
      This patch fixes *some* compilation issues on non-Linux platforms (cygwin).
      f4765b69
    • P
      daemon: Add early libvirtd start verbose errors. · 6452b1eb
      Peter Krempa 提交于
      Early errors during start of libvirtd didn't have
      an error reporting mechanism and caused libvirtd
      to exit silently (only the return value indicated
      an error).
      
      Libvirt logging is initialized very early using
      enviroment variables and the internal error reporting
      API is used to report early errors.
      
       v2 changes:
       - print errors unconditionaly before logging starts
       - fix message to US spelling
       v2.5 changes:
       - initialize logging from enviroment
       - log all early errors using VIR_ERROR
       v3 changes:
       - move virSetLogFromEnv() after virInitialize()
      
      fixes: https://bugzilla.redhat.com/show_bug.cgi?id=728654
      6452b1eb
    • S
      maint: add missing symbols · 34a01fc4
      Stefan Berger 提交于
      Add missing symbols to libvirt_private.syms.
      34a01fc4
  4. 16 8月, 2011 5 次提交
  5. 15 8月, 2011 3 次提交
    • L
      qemu: support event_idx parameter for virtio disk and net devices · 73c0a148
      Laine Stump 提交于
      In some versions of qemu, both virtio-blk-pci and virtio-net-pci
      devices can have an event_idx setting that determines some details of
      event processing. When it is enabled, it "reduces the number of
      interrupts and exits for the guest". qemu will automatically enable
      this feature when it is available, but there may be cases where this
      new feature could actually make performance worse (NB: no such case
      has been found so far).
      
      As a safety switch in case such a situation is encountered in the
      field, this patch adds a new attribute "event_idx" to the <driver>
      element of both disk and interface devices. event_idx can be set to
      "on" (to force event_idx on in case qemu has it disabled by default)
      or "off" (for force event_idx off). In the case that event_idx support
      isn't present in qemu, the attribute is ignored (this on the advice of
      the qemu developer).
      
      docs/formatdomain.html.in: document the new flag (marking it as
         "don't mess with this!"
      docs/schemas/domain.rng: add event_idx in appropriate places
      src/conf/domain_conf.[ch]: add event_idx to parser and formatter
      src/libvirt_private.syms: export
         virDomainVirtioEventIdx(From|To)String
      src/qemu/qemu_capabilities.[ch]: detect and report event_idx in
         disk/net
      src/qemu/qemu_command.c: add event_idx parameter to qemu commandline
          when appropriate.
      tests/qemuxml2argvdata/qemuxml2argv-event_idx.args,
      tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml,
      tests/qemuxml2argvtest.c,
      tests/qemuxml2xmltest.c: test cases for event_idx.
      73c0a148
    • P
      qemu: error message should show uri instead of (null) · d17101e0
      Peter Krempa 提交于
      Fix pointer for error message uri if domain migration fails.
      
      BZ# 730244
      d17101e0
    • J
      qemu: Use fd: protocol for migration · 32617617
      Jiri Denemark 提交于
      By opening a connection to remote qemu process ourselves and passing the
      socket to qemu we get much better errors than just "migration failed"
      when the connection is opened by qemu.
      32617617