1. 03 7月, 2014 8 次提交
  2. 02 7月, 2014 10 次提交
  3. 01 7月, 2014 14 次提交
    • P
      qemu: copy: Accept 'format' parameter when copying to a non-existing img · 42619ed0
      Peter Krempa 提交于
      We have the following matrix of possible arguments handled by the logic
      statement touched by this patch:
             | flags & _REUSE_EXT | !(flags & _REUSE_EXT)
      -------+--------------------+----------------------
       format| (1)                | (2)
      -------+--------------------+----------------------
      !format| (3)                | (4)
      -------+--------------------+----------------------
      
      In cases 1 and 2 the user provided a format, in cases 3 and 4 not. The
      user requests to use a pre-existing image in 1 and 3 and libvirt will
      create a new image in 2 and 4.
      
      The difference between cases 3 and 4 is that for 3 the format is probed
      from the user-provided image, whereas in 4 we just use the existing disk
      format.
      
      The current code would treat cases 1,3 and 4 correctly but in case 2 the
      format provided by the user would be ignored.
      
      The particular piece of code was broken in commit 35c7701c
      but since it was introduced a few commits before that it was never
      released as working.
      42619ed0
    • P
      storage: gluster: Fix header reader function · f412fc9f
      Peter Krempa 提交于
      Advance the right pointer to actually append to the buffer. We were
      lucky that all reads were completed in one try.
      f412fc9f
    • P
      conf: storage: Add volume feature formatter for gluster pools · 88f3f7c3
      Peter Krempa 提交于
      Libvirt didn't output feature flags for images stored on native gluster.
      Fix this trivially by adding a feature formatter callback.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1095035
      88f3f7c3
    • M
      build: link libvirt_conf with libxml · fb62d311
      Martin Kletzander 提交于
      Since there is code using functions from the libxml library,
      libvirt_conf should have that in LIBADD so it can be linked against
      even without libvirt_util (which usually deals with the error itself,
      since libvirt_util has libxml in LIBADD).  The same applies to
      storage_backend.c.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      fb62d311
    • M
      vboxsnapshotxmltest: Don't write to a file in abs_srcdir · 7315189e
      Michal Privoznik 提交于
      In the test, the snapshot XML is written into a file that's located
      under:
      
        abs_srcdir/vboxsnapshotxmldata/testResult.vbox
      
      However, the abs_srcdir doesn't have to be necessarily writable. It
      should have been abs_builddir instead. Moreover, the label in the func
      creating the file is called 'fail' while it fulfils the duty of
      'cleanup' label.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7315189e
    • M
      securityselinuxlabeltest: Don't create dummy file in the srcdir · e5f5805f
      Michal Privoznik 提交于
      At the very beginning of the test we check if the underlying
      filesystem supports extended attributes as they are used to store fake
      SELinux labels. In order to check that, a dummy file is created and
      semi-random attribute is set. However, the file is created under:
      
        abs_srcdir "/securityselinuxlabeldata/testxattr"
      
      which has two problems: abs_srcdir is not required to be writable, so
      it should have been abs_builddir. The second one is - there's no
      "securityselinuxlabeldata" folder under abs_builddir. The problem was
      introduced in caf164f1.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e5f5805f
    • J
      Report one error less when getting net dev speed · 1c7601f5
      Ján Tomko 提交于
      virFileReadAll already logs an error. If reading the 'speed' file
      fails with EINVAL, we log an error even though we ignore it. If it
      fails with other errors, we log two errors.
      
      Use virFileReadAllQuiet - ignore EINVAL and report just one error
      in other cases.
      
      Fixes this error on libvirtd startup:
      2014-06-30 12:47:14.583+0000: 20971: error : virFileReadAll:1297 :
      Failed to read file '/sys/class/net/wlan0/speed': Invalid argument
      1c7601f5
    • J
      Introduce virFileReadAllQuiet · f638c13e
      Ján Tomko 提交于
      Just like virFileReadAll, but returns -errno instead
      of reporting errors. Useful for ignoring some errors.
      f638c13e
    • J
      Only detect PCI Express devices as root in udev nodedev driver · 5de9b502
      Ján Tomko 提交于
      This stops the error message spam when running unprivileged
      libvirtd:
      2014-06-30 12:38:47.990+0000: 631: error : virPCIDeviceConfigOpen:300 :
      Failed to open config space file
      '/sys/bus/pci/devices/0000:00:00.0/config': Permission denied
      
      Reported by Daniel Berrange:
      https://www.redhat.com/archives/libvir-list/2014-June/msg01082.html
      5de9b502
    • J
      Track privileged state in udev nodedev driver · 1229ef49
      Ján Tomko 提交于
      Remember if libvirtd is running as root or not.
      1229ef49
    • J
      libxl: add PV console if not explicitly specified · ec7b9225
      Jim Fehlig 提交于
      Xen PV domains always have a PV console, so add one to the domain
      config via post-parse callback if not explicitly specified in
      the XML.  The legacy Xen driver behaves similarly, causing a
      regression when switching to the new Xen toolstack.  I.e.
      
        virsh console pv-domain
      
      will no longer work after upgrading a xm/xend stack to xl/libxl.
      ec7b9225
    • J
      build: fix 'make syntax-check' after commit c6cf5df3 · dc165342
      Jim Fehlig 提交于
      The commit caused prohibit_long_lines to fail in src/Makefile.am.
      dc165342
    • J
      vbox: fix linker error · c6cf5df3
      Jim Fehlig 提交于
      Noticed the following error when building the vbox driver
      in the openSUSE build service
      
      CCLD     vboxsnapshotxmltest
      /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
      ../src/.libs/libvirt_driver_vbox_impl.a
      (libvirt_driver_vbox_impl_la-vbox_snapshot_conf.o):
      undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30'
      /usr/lib64/libxml2.so: error adding symbols: DSO missing from command line
      collect2: error: ld returned 1 exit status
      
      Fixed by adding LIBXML_LIBS to libvirt_driver_vbox_impl_la_LIBADD
      c6cf5df3
    • D
      libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity() · bfc72e99
      Dario Faggioli 提交于
      libxl interface for vcpu pinning is changing in Xen 4.5. Basically,
      libxl_set_vcpuaffinity() now wants one more parameter. That is
      representative of 'VCPU soft affinity', which libvirt does not use.
      
      To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is
      defined. Use it as a gate and, if present, re-#define the calls from
      the old to the new interface, to avoid breaking the build.
      Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com>
      Cc: Jim Fehlig <jfehlig@suse.com>
      Cc: Ian Campbell <Ian.Campbell@citrix.com>
      Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
      bfc72e99
  4. 30 6月, 2014 2 次提交
  5. 27 6月, 2014 6 次提交
    • R
      bhyve: fix build by fixing typo in variable name · b963ca06
      Roman Bogorodskiy 提交于
      Commit 80d0918b introduced a typo in variable name:
      
      s/failIncomaptible/failIncompatible/
      
      Pushed under the build breaker rule.
      b963ca06
    • J
      cpu: Add new Broadwell CPU model · 04533767
      Jiri Denemark 提交于
      04533767
    • P
      net: merge virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC · 02bffd47
      Peter Krempa 提交于
      Instead of maintaining two very similar APIs, add the "@mac" parameter
      to virNetworkGetDHCPLeases and kill virNetworkGetDHCPLeasesForMAC. Both
      of those functions would return data the same way, so making @mac an
      optional filter simplifies a lot of stuff.
      02bffd47
    • J
      Add test for type none model dac seclabel · 96f62755
      Ján Tomko 提交于
      96f62755
    • J
      test: add user_xattr check for securityselinuxlabeltest · caf164f1
      Jincheng Miao 提交于
      libvirt unit test used setxattr with "user.libvirt.selinux" name to
      emulate setfilecon of selinux. But for some old kernel filesystem
      (like 2.6.32-431.el6.x86_64), if the filesystem is not mounted with
      user_xattr flag, the setxattr with "user.libvirt.selinux" will fail.
      
      So adding testUserXattrEnabled() in securityselinuxlabeltest.c,
      if user_xattr is not enabled, skip this case.
      
      The user_xattr is departed in newer kernel, therefore this commit is
      only for the compatablity for old kernel.
      Signed-off-by: NJincheng Miao <jmiao@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Tested-by: NScott Sullivan <ssullivan@liquidweb.com>
      caf164f1
    • E
      docs: publish correct enum values · 9b291bbe
      Eric Blake 提交于
      We publish libvirt-api.xml for others to use, and in fact, the
      libvirt-python bindings use it to generate python constants that
      correspond to our enum values.  However, we had an off-by-one bug
      that any enum that relied on C's rules for implicit initialization
      of the first enum member to 0 got listed in the xml as having a
      value of 1 (and all later members of the enum were equally
      botched).
      
      The fix is simple - since we add one to the previous value when
      encountering an enum without an initializer, the previous value
      must start at -1 so that the first enum member is assigned 0.
      
      The python generator code has had the off-by-one ever since DV
      first wrote it years ago, but most of our public enums were immune
      because they had an explicit = 0 initializer.  The only affected
      enums are:
      - virDomainEventGraphicsAddressType (such as
      VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4), since commit 987e31ed
      (libvirt v0.8.0)
      - virDomainCoreDumpFormat (such as VIR_DOMAIN_CORE_DUMP_FORMAT_RAW),
      since commit 9fbaff00 (libvirt v1.2.3)
      - virIPAddrType (such as VIR_IP_ADDR_TYPE_IPV4), since commit
      03e0e79e (not yet released)
      
      Thanks to Nehal J Wani for reporting the problem on IRC, and
      for helping me zero in on the culprit function.
      
      * docs/apibuild.py (CParser.parseEnumBlock): Fix implicit enum
      values.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9b291bbe