1. 13 9月, 2012 5 次提交
    • O
      build: Fix typo which causes build failure · 51b708c6
      Osier Yang 提交于
      Pushed under build-breaker rule.
      51b708c6
    • E
      build: force libnl1 if netcf also used libnl1 · 9298bfbc
      Eric Blake 提交于
      Recent spec file changes ensure that in distro situations, netcf
      and libvirt will link against the same libnl in order to avoid
      dumping core.  But for every-day development, if you use F17 and
      have the libnl3-devel headers available, libvirt was blindly
      linking against libnl3 even though F17 netcf still links against
      libnl1, making testing a self-built binary on F17 impossible.
      
      By making configure a little bit smarter, we can avoid this
      situation - we merely skip the probe of libnl-3 if we can prove
      that netcf is still using libnl-1.  I intentionally wrote the
      test so that we still favor libnl-3 if netcf is not installed or
      if we couldn't use ldd to determine things.
      
      Defaults being what they are, someone will invariably complain
      that our smarts were wrong.  Never fear - in that case, just run
      ./configure LIBNL_CFLAGS=..., where the fact that you set
      LIBNL_CFLAGS (even to the empty string) will go back to probing
      for libnl-3, regardless of netcf's choice.
      
      * configure.ac (LIBNL): Don't probe libnl3 if netcf doesn't use it.
      9298bfbc
    • E
      maint: fix missing spaces in message · 2387aa26
      Eric Blake 提交于
      I got an off-list report about a bad diagnostic:
      Target network card mac 52:54:00:49:07:ccdoes not match source 52:54:00:49:07:b8
      
      True to form, I've added a syntax check rule to prevent it
      from recurring, and found several other offenders.
      
      * cfg.mk (sc_require_whitespace_in_translation): New rule.
      * src/conf/domain_conf.c (virDomainNetDefCheckABIStability): Add
      space.
      * src/esx/esx_util.c (esxUtil_ParseUri): Likewise.
      * src/qemu/qemu_command.c (qemuCollectPCIAddress): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSetMetadata)
      (qemuDomainGetMetadata): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeNetBridge): Likewise.
      * src/rpc/virnettlscontext.c
      (virNetTLSContextCheckCertDNWhitelist): Likewise.
      * src/vmware/vmware_driver.c (vmwareDomainResume): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives):
      Avoid false negatives.
      * tools/virsh-domain.c (info_save_image_dumpxml): Reword.
      Based on a report by Luwen Su.
      2387aa26
    • E
      build: avoid confusing make with raw name 'undefine' · a20f06d9
      Eric Blake 提交于
      Make has a builtin operator 'undefine', and coupled with latest
      automake.git, this test name ended up confusing make into thinking
      the file name was meant to be used as the make operator.  Renaming
      the file avoids the confusion.
      
      * tests/undefine: Rename...
      * tests/virsh-undefine: ...to this.
      * tests/Makefile.am (test_scripts): Use new name.
      Reported by Jim Meyering.
      a20f06d9
    • D
      Add API for opening a QEMU monitor from a socket FD · cf5491e5
      Daniel P. Berrange 提交于
      Currently qemuMonitorOpen() requires an address of the QEMU
      monitor. When doing QMP based capabilities detection it is
      easier if a pre-opened FD can be provided, since then the
      monitor can be run on the STDIO console. Add a new API
      qemuMonitorOpenFD() for such usage
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cf5491e5
  2. 12 9月, 2012 12 次提交
    • D
      parallels: fix parallelsDomainDefineXML for domains with VNC and autoport · 4cf4120b
      Dmitry Guryanov 提交于
      virDomainDefParseString assigns 0 to port if autoport enabled.
      So fix code, which check different between old and new
      configurations.
      4cf4120b
    • D
      parallels: fix parallelsDoCmdRun in case of command failure · 748b6d8e
      Dmitry Guryanov 提交于
      Don't try to dereferece NULL pointer.
      748b6d8e
    • L
      Backcompt for console devices in virDomainDeviceInfoIterate · babe7dad
      Li Zhang 提交于
      Historically, the first <console> element is treated as the
      alias of a <serial> device. In the virDomainDeviceInfoIterate,
      This situation is not considered. It still handles the first <console>
      element as another devices, which means that for console[0] with
      serial targetType, it calls callback function another time.
      It will cause the problem of address conflicts when assigning
      spapr-vio address for serial device on pSeries guest.
      
      For pSeries guest, the serial configuration in the xml file
      is as the following:
               <serial type='pty'>
                     <target port='0'/>
                     <address type='spapr-vio'/>
                </serial>
      
      Console configuration is default, the dumped xml file is as the following:
         <serial type='pty'>
            <source path='/dev/pts/5'/>
            <target port='0'/>
            <alias name='serial0'/>
            <address type='spapr-vio' reg='0x30000000'/>
          </serial>
          <console type='pty' tty='/dev/pts/5'>
            <source path='/dev/pts/5'/>
            <target type='serial' port='0'/>
            <alias name='serial0'/>
            <address type='spapr-vio' reg='0x30000000'/>
          </console>
      
      It shows that the <console> device is the alias of serial device.
      So its address is the same as the serial device. When detecting
      the conflicts in the qemuAssignSpaprVIOAddress the first console
      and the serial device conflicts because virDomainDeviceInfoIterate()
      still handle these as two different devices, and in the qemuAssignSpaprVIOAddress(),
      it will compare these two devices' addressed. If they have same address,
      it will report address conflict error.
      
      So this patch is to handle the first console which targetType is serial
      as the alias of serial device to avoid address conflicts error reported.
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      babe7dad
    • O
      list: Expose virConnectListAllInterfaces to Python binding · ec448fbf
      Osier Yang 提交于
      The implementation is done manually as the generator does not support
      wrapping lists of C pointers into Python objects.
      
      python/libvirt-override-api.xml: Document
      
      python/libvirt-override-virConnect.py:
        * New file, includes implementation of listAllInterfaces.
      
      python/libvirt-override.c: Implementation for the wrapper.
      ec448fbf
    • O
      list: Use virConnectListAllInterfaces in virsh · 3c2e6472
      Osier Yang 提交于
      tools/virsh-interface.c:
        * vshInterfaceSorter to sort interfaces by name
      
        * vshInterfaceListFree to free the interface objects list.
      
        * vshInterfaceListCollect to collect the interface objects, trying
          to use new API first, fall back to older APIs if it's not supported.
      3c2e6472
    • O
      list: Implement listAllInterfaces · a3cf061c
      Osier Yang 提交于
      This is not that ideal as API for other objects, as it's still
      O(n). Because interface driver uses netcf APIs to manage the
      stuffs, instead of by itself. And netcf APIs don't return a object.
      It provides APIs like old libvirt APIs:
      
         ncf_number_of_interfaces
         ncf_list_interfaces
         ncf_lookup_by_name
         ......
      
      Perhaps we should further improve netcf to let it provide an API
      to return the object, but it could be a later patch. And anyway,
      we will still benefit from the new API for the simplification,
      and no race like the old APIs.
      
      src/interface/netcf_driver.c: Implement listAllInterfaces
      a3cf061c
    • O
      list: Implemente RPC calls for virConnectListAllInterfaces · 65741d84
      Osier Yang 提交于
      The RPC generator doesn't support returning list of object yet, this patch
      do the work manually.
      
        * daemon/remote.c:
          Implemente the server side handler remoteDispatchConnectListAllInterfaces.
      
        * src/remote/remote_driver.c:
          Add remote driver handler remoteConnectListAllInterfaces.
      
        * src/remote/remote_protocol.x:
          New RPC procedure REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES and
          structs to represent the args and ret for it.
      
        * src/remote_protocol-structs: Likewise.
      65741d84
    • O
      list: Define new API virConnectListAllInterfaces · f4af202f
      Osier Yang 提交于
      This is to list the interface objects, supported filtering flags
      are: active|inactive.
      
      include/libvirt/libvirt.h.in: Declare enum virConnectListAllInterfaceFlags
                                    and virConnectListAllInterfaces.
      python/generator.py: Skip auto-generating
      src/driver.h: (virDrvConnectListAllInterfaces)
      src/libvirt.c: Implement the public API
      src/libvirt_public.syms: Export the symbol to public
      f4af202f
    • E
      docs: mention another iaas app built on libvirt · 01fa1d7a
      Eric Blake 提交于
      Reported on the libvirt-users list.
      
      * docs/apps.html.in: Add Eucalyptus.
      Reported by Eric Choi.
      01fa1d7a
    • H
      fix bug in qemuSetupCgroupForEmulator · f7e1a546
      Hu Tao 提交于
      Should not return 0 when failed to setup cgroup.
      f7e1a546
    • E
      build: avoid dirty docs on fresh bootstrap · f36fadca
      Eric Blake 提交于
      * HACKING: Regenerate.
      f36fadca
    • F
      python: Initialize new_params in virDomainSetSchedulerParameters · 984a73c0
      Federico Simoncelli 提交于
      The new_params variable must be initialized in case the
      virDomainGetSchedulerParameters call fails and we hit the cleanup
      section before actually allocating the new parameters.
      Signed-off-by: NFederico Simoncelli <fsimonce@redhat.com>
      984a73c0
  3. 11 9月, 2012 16 次提交
  4. 10 9月, 2012 7 次提交
    • C
      Fix unwanted closing of libvirt client connection · 164c03d3
      Christophe Fergeau 提交于
      e5a1bee0 introduced a regression in Boxes: when Boxes is left idle
      (it's still doing some libvirt calls in the background), the
      libvirt connection gets closed after a few minutes. What happens is
      that this code in virNetClientIOHandleOutput gets triggered:
      
      if (!thecall)
          return -1; /* Shouldn't happen, but you never know... */
      
      and after the changes in e5a1bee0, this causes the libvirt connection
      to be closed.
      
      Upon further investigation, what happens is that
      virNetClientIOHandleOutput is called from gvir_event_handle_dispatch
      in libvirt-glib, which is triggered because the client fd became
      writable. However, between the times gvir_event_handle_dispatch
      is called, and the time the client lock is grabbed and
      virNetClientIOHandleOutput is called, another thread runs and
      completes the current call. 'thecall' is then NULL when the first
      thread gets to run virNetClientIOHandleOutput.
      
      After describing this situation on IRC, danpb suggested this:
      
      11:37 < danpb> In that case I think the correct thing would be to change
                     'return -1' above to 'return 0' since that's not actually an
                     error - its a rare, but expected event
      
      which is what this patch is doing. I've tested it against master
      libvirt, and I didn't get disconnected in ~10 minutes while this
      happens in less than 5 minutes without this patch.
      164c03d3
    • O
      list: Expose virStoragePoolListAllVolumes to Python binding · fa2e35a3
      Osier Yang 提交于
      The implementation is done manually as the generator does not support
      wrapping lists of C pointers into Python objects.
      
      python/libvirt-override-api.xml: Document
      
      python/libvirt-override-virStoragePool.py:
        * New file, includes implementation of listAllVolumes.
      
      python/libvirt-override.c: Implementation for the wrapper.
      fa2e35a3
    • O
      list: Use virStoragePoolListAllVolumes in virsh · 7e9548fc
      Osier Yang 提交于
      tools/virsh-volume.c:
        * vshStorageVolSorter to sort storage vols by name
      
        * vshStorageVolumeListFree to free the volume objects list
      
        * vshStorageVolumeListCollect to collect the volume objects, trying
          to use new API first, fall back to older APIs if it's not supported.
      7e9548fc
    • O
      list: Implement virStoragePoolListAllVolumes for test driver · a4d7f4a0
      Osier Yang 提交于
      src/test/test_driver.c: Implement poolListAllVolumes.
      a4d7f4a0
    • O
      list: Implement virStoragePoolListAllVolumes for storage driver · 7254a367
      Osier Yang 提交于
      src/storage/storage_driver.c: Implement poolListAllVolumes.
      7254a367
    • O
      list: Implement RPC calls for virStoragePoolListAllVolumes · a8bac1c0
      Osier Yang 提交于
      The RPC generator doesn't returning support list of object, this
      patch do the work manually.
      
        * daemon/remote.c:
          Implemente the server side handler remoteDispatchStoragePoolListAllVolumes
      
        * src/remote/remote_driver.c:
          Add remote driver handler remoteStoragePoolListAllVolumes
      
        * src/remote/remote_protocol.x:
          New RPC procedure REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES and
          structs to represent the args and ret for it.
      
        * src/remote_protocol-structs: Likewise.
      a8bac1c0
    • O
      list: Define new API virStoragePoolListAllVolumes · a42eac60
      Osier Yang 提交于
      Simply returns the storage volume objects. No supported filter
      flags.
      
      include/libvirt/libvirt.h.in: Declare the API
      python/generator.py: Skip the function for generating. virStoragePool.py
                           will be added in later patch.
      src/driver.h: virDrvStoragePoolListVolumesFlags
      src/libvirt.c: Implementation for the API.
      src/libvirt_public.syms: Export the symbol to public
      a42eac60