1. 10 3月, 2014 15 次提交
  2. 08 3月, 2014 1 次提交
    • J
      virscsi: Introduce virSCSIDeviceUsedByInfoFree · ea1eadd6
      John Ferlan 提交于
      This resolves a Coverity RESOURCE_LEAK issue introduced by commit
      id 'de6fa535' where the virSCSIDeviceSetUsedBy() didn't VIR_FREE
      the 'copy' or possibly VIR_STRDUP()'d values.  It also ensures that
      the VIR_APPEND_ELEMENT is successful...
      ea1eadd6
  3. 07 3月, 2014 1 次提交
  4. 06 3月, 2014 2 次提交
  5. 05 3月, 2014 5 次提交
    • P
      qemu: monitor: Provide more information in generic block job error · 3e04d65a
      Peter Krempa 提交于
      The qemuMonitorJSONBlockJob handles a few errors internally. If qemu
      returns a different error we would report a rather unhelpful message:
      
       $ virsh blockpull gluster-job vda --base /dev/null
       error: internal error: Unexpected error
      
      As the actual message from qemu contains a bit more info, let's use it
      to report something a little more useful:
      
       $ virsh blockpull gluster-job vda --base /dev/null
       error: internal error: Unexpected error: (GenericError) 'Base '/dev/null' not found'
      3e04d65a
    • P
      storage: Don't lie about path used to look up in error message · 46446313
      Peter Krempa 提交于
      In storageVolLookupByPath the provided path is "sanitized" at first.
      This removes some extra slashes and stuff. When the lookup of the volume
      fails the original path is used which makes it hard to trace errors in
      some cases.
      
      Improve the error message to print the sanitized path along with the
      user provided path if they are not equal.
      46446313
    • P
      storage: Avoid mangling paths of non-local filesystems when looking up · 7fb3902b
      Peter Krempa 提交于
      When looking up a volume by path on a non-local filesystem don't use the
      "cleaned" path that might be mangled in such a way that it will differ
      from a path provided by a storage backend.
      
      Skip the cleanup step for gluster, sheepdog and RBD.
      7fb3902b
    • P
      storage: Error out when attempting to vol-upload into a remote pool · 429bf253
      Peter Krempa 提交于
      Pools that are not backed by files in the filesystem cause problems with
      some APIs. Error out when attempting to upload a volume in such a pool
      as currently we expect a local file representation for it.
      429bf253
    • P
      storage: Use cleanup label instead of out · e45c30ee
      Peter Krempa 提交于
      e45c30ee
  6. 04 3月, 2014 16 次提交
    • C
      6b4c0a63
    • C
      add 'driver' info to used_by · de6fa535
      Chunyan Liu 提交于
      Specify which driver and which domain in used_by area to avoid conflict among
      different drivers.
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      de6fa535
    • C
      apparmor: handle "none" type · 9194ccec
      Cédric Bosdonnat 提交于
      9194ccec
    • C
      add support for apparmor in lxc-enter-namespace · ef7dc7d4
      Cédric Bosdonnat 提交于
      ef7dc7d4
    • C
      apparmor: add debug traces when changing profile. · 500b2e96
      Cédric Bosdonnat 提交于
      The reason for these is that aa-status doesn't show the process using
      the profile as they are in another namespace.
      500b2e96
    • C
      LXC driver: generate apparmor profiles for guests · 43c030f0
      Cédric Bosdonnat 提交于
      use_apparmor() was first designed to be called from withing libvirtd,
      but libvirt_lxc also uses it. in libvirt_lxc, there is no need to check
      whether to use apparmor or not: just use it if possible.
      43c030f0
    • P
      qemu: monitor: Fix error message and comment when getting cpu info · a31bd18f
      Peter Krempa 提交于
      In qemuMonitorJSONExtractCPUInfo an error message hinted on missing
      character device data which is wrong.
      
      Also a comment states that only qemu-kvm tree includes the thread_id
      field. This is no longer true.
      a31bd18f
    • P
      qemu: snapshot: Use better check when reverting external snapshots · d410e6f1
      Peter Krempa 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1071264
      
      Reverting of external snapshots is not supported currently. The check
      that is present doesn't properly check for all aspects that make a
      snapshot external. Use virDomainSnapshotIsExternal() to do the check.
      d410e6f1
    • M
      qemuBuildNicDevStr: Adapt to new advisory on multiqueue · 042c4ab1
      Michal Privoznik 提交于
      As I did previously in 4f588a1b, libvirt needs to set virtio vectors.
      Previously, we were advised to use vectors=N, where
      
      N = 2 * (number of queues) + 1
      
      However, just recently this advisory has changed on the Multiquue wiki
      page [1] to:
      
      N = 2 * (number of queues) + 2
      
      1: http://www.linux-kvm.org/page/Multiqueue#Enable_MQ_featureSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
      042c4ab1
    • J
      Check if systemd is running before creating machines · 12ee0b98
      Ján Tomko 提交于
      If systemd is installed, but is not the init system,
      systemd-machined fails with an unhelpful error message:
      Launch helper exited with unknown return code 1
      
      Currently we only check if the "machine1" service is
      available (in ListActivatableNames).
      Also check if "systemd1" service is registered with DBus
      (ListNames).
      
      This fixes https://bugs.gentoo.org/show_bug.cgi?id=493246#c22
      12ee0b98
    • J
      Split out most of virDBusIsServiceEnabled · 65a4cb03
      Ján Tomko 提交于
      Introduce virDBusIsServiceInList which can be used to call other
      methods for listing services (ListNames), not just ListActivatableNames.
      
      No functional change, fixed the 'Retruns' typo.
      65a4cb03
    • E
      build: fix cppi warning · b75c7bd6
      Eric Blake 提交于
      Jenkins pointed out that the previous commit violates syntax
      check when cppi is installed.
      
      * src/nwfilter/nwfilter_dhcpsnoop.c (SNOOP_POLL_MAX_TIMEOUT_MS):
      Update indentation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b75c7bd6
    • S
      nwfilter: Increase buffer size for libpcap · 49b59a15
      Stefan Berger 提交于
      Libpcap 1.5 requires a larger buffer than previous pcap versions.
      Adjust the size of the buffer to 128kb.
      
      This patch should address symptoms in BZ 1071181 and BZ 731059
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      49b59a15
    • S
      nwfilter: Display the pcap errror message · 64df4c75
      Stefan Berger 提交于
      Display the pcap error message in the log.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      64df4c75
    • S
      nwfilter: Cap the poll timeout in the DHCP Snooping code · a718eb19
      Stefan Berger 提交于
      Cap the poll timeout in the DHCP Snooping code to a max. of 10 seconds
      to not hold up the libvirt shutdown longer than this.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      a718eb19
    • E
      virFork: simplify semantics · 25f87817
      Eric Blake 提交于
      The old semantics of virFork() violates the priciple of good
      usability: it requires the caller to check the pid argument
      after use, *even when virFork returned -1*, in order to properly
      abort a child process that failed setup done immediately after
      fork() - that is, the caller must call _exit() in the child.
      While uses in virfile.c did this correctly, uses in 'virsh
      lxc-enter-namespace' and 'virt-login-shell' would happily return
      from the calling function in both the child and the parent,
      leading to very confusing results. [Thankfully, I found the
      problem by inspection, and can't actually trigger the double
      return on error without an LD_PRELOAD library.]
      
      It is much better if the semantics of virFork are impossible
      to abuse.  Looking at virFork(), the parent could only ever
      return -1 with a non-negative pid if it misused pthread_sigmask,
      but this never happens.  Up until this patch series, the child
      could return -1 with non-negative pid if it fails to set up
      signals correctly, but we recently fixed that to make the child
      call _exit() at that point instead of forcing the caller to do
      it.  Thus, the return value and contents of the pid argument are
      now redundant (a -1 return now happens only for failure to fork,
      a child 0 return only happens for a successful 0 pid, and a
      parent 0 return only happens for a successful non-zero pid),
      so we might as well return the pid directly rather than an
      integer of whether it succeeded or failed; this is also good
      from the interface design perspective as users are already
      familiar with fork() semantics.
      
      One last change in this patch: before returning the pid directly,
      I found cases where using virProcessWait unconditionally on a
      cleanup path of a virFork's -1 pid return would be nicer if there
      were a way to avoid it overwriting an earlier message.  While
      such paths are a bit harder to come by with my change to a direct
      pid return, I decided to keep the virProcessWait change in this
      patch.
      
      * src/util/vircommand.h (virFork): Change signature.
      * src/util/vircommand.c (virFork): Guarantee that child will only
      return on success, to simplify callers.  Return pid rather than
      status, now that the situations are always the same.
      (virExec): Adjust caller, also avoid open-coding process death.
      * src/util/virprocess.c (virProcessWait): Tweak semantics when pid
      is -1.
      (virProcessRunInMountNamespace): Adjust caller.
      * src/util/virfile.c (virFileAccessibleAs, virFileOpenForked)
      (virDirCreate): Likewise.
      * tools/virt-login-shell.c (main): Likewise.
      * tools/virsh-domain.c (cmdLxcEnterNamespace): Likewise.
      * tests/commandtest.c (test23): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      25f87817