1. 02 1月, 2019 8 次提交
  2. 21 12月, 2018 5 次提交
  3. 19 12月, 2018 20 次提交
  4. 18 12月, 2018 7 次提交
    • J
      remote: Handle xdr char ** data return fields more consistently · 4d95d356
      John Ferlan 提交于
      For consistency, handle the @data "char **" (or remote_string)
      assignments and processing similarly between various APIs
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      4d95d356
    • J
      remote: Resolve resource leak · eb448cb5
      John Ferlan 提交于
      Using a combination of VIR_ALLOC and VIR_STRDUP into a local
      variable and then jumping to error on the VIR_STRDUP before
      assiging it into the @data would cause a memory leak. Let's
      just avoid that by assiging directly into @data.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      eb448cb5
    • J
      tests: Fix possible NULL derefs in virErrorTestMsgs · 44d0db01
      John Ferlan 提交于
      Add guards to avoid calling strchr when @err_noinfo == NULL or
      calling virErrorTestMsgFormatInfoOne when @err_info == NULL as
      both would fail with a NULL deref.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NPeter Krempa <pkrempa@redhat.com>
      44d0db01
    • D
      logging: ensure pending I/O is drained before reading position · cc9e80c5
      Daniel P. Berrangé 提交于
      The virtualization driver has two connections to the virtlogd daemon,
      one pipe fd for writing to the log file, and one socket fd for making
      RPC calls. The typical sequence is to write some data to the pipe fd and
      then make an RPC call to determine the current log file offset.
      
      Unfortunately these two operations are not guaranteed to be handling in
      order by virtlogd. The event loop for virtlogd may identify an incoming
      event on both the pipe fd and socket fd in the same iteration of the
      event loop. It is then entirely possible that it will process the socket
      fd RPC call before reading the pending log data from the pipe fd.
      
      As a result the virtualization driver will get an outdated log file
      offset reported back.
      
      This can be seen with the QEMU driver where, when a guest fails to
      start, it will randomly include too much data in the error message it
      has fetched from the log file.
      
      The solution is to ensure we have drained all pending data from the pipe
      fd before reporting the log file offset. The pipe fd is always in
      blocking mode, so cares needs to be taken to avoid blocking. When
      draining this is taken care of by using poll(). The extra complication
      is that they might already be an event loop dispatch pending on the pipe
      fd. If we have just drained the pipe this pending event will be invalid
      so must be discarded.
      
      See also https://bugzilla.redhat.com/show_bug.cgi?id=1356108Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      cc9e80c5
    • D
      tests: ignore XML files starting with a . · 3dc3e58b
      Daniel P. Berrangé 提交于
      If an editor has an XML file open, it may create a temporary . file. The
      existance of this file will cause the virschematest to fail, so just
      skip these editor temp files.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      3dc3e58b
    • J
      docs: Improve description of <hard_limit> · fe8eb883
      Jim Fehlig 提交于
      /domain/memtune/hard_limit provides a way to cap the memory a VM process
      can use, including the amount of memory the process can lock. When memory
      locking of a VM is requested, <hard_limit> can be used to prevent the
      potential host DoS issue mentioned in /domain/memoryBacking/locked
      description.
      
      This patch improves the <hard_limit> text by clarifying it can be used
      to prevent "host crashing" when VM memory is locked.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      fe8eb883
    • D
      util: fix translation of error message strings · 57a9e492
      Daniel P. Berrangé 提交于
      The arguments to the N_() macro must only ever be a literal string. It
      is not possible to use macro arguments, or use macro string
      concatenation in this context. The N_() macro is a no-op whose only
      purpose is to act as a marker for xgettext when it extracts translatable
      strings from the source code. Anything other than a literal string will
      be silently ignored by xgettext.
      
      Unfortunately this means that the clever MSG, MSG2 & MSG_EXISTS macros
      used for building up error message strings have prevented any of the
      error messages getting marked for translation. We must sadly, revert to
      a more explicit listing of strings for now.
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      57a9e492