1. 26 3月, 2013 2 次提交
    • G
      python: set default value to optional arguments · c65fc29a
      Guannan Ren 提交于
      When prefixing with string (optional) or optional in the description
      of arguments to libvirt C APIs, in python, these arguments will be
      set as optional arugments, for example:
      
       * virDomainSaveFlags:
       * @domain: a domain object
       * @to: path for the output file
       * @dxml: (optional) XML config for adjusting guest xml used on restore
       * @flags: bitwise-OR of virDomainSaveRestoreFlags
      
       the corresponding python APIs is
       restoreFlags(self, frm, dxml=None, flags=0)
      
      The following python APIs are changed to:
       blockCommit(self, disk, base, top, bandwidth=0, flags=0)
       blockPull(self, disk, bandwidth=0, flags=0)
       blockRebase(self, disk, base, bandwidth=0, flags=0)
       migrate(self, dconn, flags=0, dname=None, uri=None, bandwidth=0)
       migrate2(self, dconn, dxml=None, flags=0, dname=None, uri=None, bandwidth=0)
       migrateToURI(self, duri, flags=0, dname=None, bandwidth=0)
       migrateToURI2(self, dconnuri=None, miguri=None, dxml=None, flags=0, \
                     dname=None, bandwidth=0)
       saveFlags(self, to, dxml=None, flags=0)
       migrate(self, domain, flags=0, dname=None, uri=None, bandwidth=0)
       migrate2(self, domain, dxml=None, flags=0, dname=None, uri=None, bandwidth=0)
       restoreFlags(self, frm, dxml=None, flags=0)
      c65fc29a
    • Y
      Remove the redundant parentheses in migrate help · 5c925a4d
      Yanbing Du 提交于
      Signed-off-by: NYanbing Du <ydu@redhat.com>
      5c925a4d
  2. 25 3月, 2013 12 次提交
    • E
      Revert "qemu: detect multi-head qxl via more than version check" · 7524cd89
      Eric Blake 提交于
      This reverts commit 5ac846e4.
      
      After further discussions with Alon Levy, I learned the following:
      
      The use of '-vga qxl' vs. '-device qxl-vga' is completely orthogonal
      to whether ram_size can be exposed.  Downstream distros are interested
      in backporting support for multi-head qxl, but this can be done in
      one of two ways:
      1. Support one head per PCI device.  If you do this, then it makes
      sense to have full control over the PCI address of each device. For
      full control, you need '-device qxl-vga' instead of '-vga qxl'.
      2. Support multiple heads through a single PCI device.  If you do
      this, then you need to allocate more RAM to that PCI device (enough
      ram to cover the multiple screens).  Here, the device is hard-coded
      to 0:0:2.0, both in qemu and libvirt code.
      
      Apparently, backporting ram_size changes to allow multiple heads in
      a single device is much easier than backporting multiple device
      support.  Furthermore, the presence or absence of qxl-vga.surfaces
      is no different than the presence or absence of qxl-vga.ram_size;
      both properties can be applied regardless of whether you have one
      PCI device (-vga qxl) or multiple (-device qxl-vga), so this property
      is NOT a good witness of whether '-device qxl-vga' support has been
      backported.
      
      Downstream RHEL will NOT be using this patch; and worse, leaving this
      patch in risks doing the wrong thing if compiling upstream libvirt
      on RHEL, so the best course of action is to revert it.  That means
      that libvirt will go back to only using '-device qxl-vga' for qemu
      >= 1.2, but this is just fine because we know of no distros that plan
      on backporting multiple PCI address support to any older version of
      qemu.  Meanwhile, downstream can still use ram_size to pack multiple
      heads through a single PCI device.
      7524cd89
    • E
      libvirt-guests: newline between output sentences · 7c12055d
      Eric Blake 提交于
      Right now, libvirt-guests gives awkward output.  It's possible to
      force faster failure by setting /etc/sysconfig/libvirt-guests to use:
      
      ON_SHUTDOWN=shutdown
      PARALLEL_SHUTDOWN=0
      SHUTDOWN_TIMEOUT=1
      ON_BOOT=ignore
      
      at which point, we see:
      
      $ service libvirt-guests restart
      Running guests on default URI: a, b, d, c
      Shutting down guests on default URI...
      Starting shutdown on guest: a
      Shutdown of guest a failed to complete in time.Starting shutdown on guest: b
      Shutdown of guest b failed to complete in time.Starting shutdown on guest: d
      Shutdown of guest d failed to complete in time.Starting shutdown on guest: c
      Shutdown of guest c failed to complete in time.libvirt-guests is configured not to start any guests on boot
      
      * tools/libvirt-guests.sh.in (shutdown_guest): Add missing newline.
      Reported by Xuesong Zhang.
      7c12055d
    • O
      util: Fix bug of managing vport · f90af691
      Osier Yang 提交于
      The string written to "vport_create" or "vport_delete" should
      be "wwnn:wwpn", but not "wwpn:wwnn".
      f90af691
    • O
      nodedev: Fix the improper logic when enumerating SRIOV VF · 9a3ff01d
      Osier Yang 提交于
      virPCIGetVirtualFunctions returns 0 even if there is no "virtfn"
      entry under the device sysfs path.
      
      And virPCIGetVirtualFunctions returns -1 when it fails to get
      the PCI config space of one VF, however, with keeping the
      the VFs already detected.
      
      That's why udevProcessPCI and gather_pci_cap use logic like:
      
      if (!virPCIGetVirtualFunctions(syspath,
                                     &data->pci_dev.virtual_functions,
                                     &data->pci_dev.num_virtual_functions) ||
          data->pci_dev.num_virtual_functions > 0)
          data->pci_dev.flags |= VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION;
      
      to tag the PCI device with "virtual_function" cap.
      
      However, this results in a VF will aslo get "virtual_function" cap.
      
      This patch fixes it by:
        * Ignoring the VF which has failure of getting PCI config space
          (given that the successfully detected VFs are kept , it makes
          sense to not give up on the failure of one VF too) with a warning,
          so virPCIGetVirtualFunctions will not return -1 except out of memory.
      
        * Free the allocated *virtual_functions when out of memory
      
      And thus the logic can be changed to:
      
          /* Out of memory */
          int ret = virPCIGetVirtualFunctions(syspath,
                                              &data->pci_dev.virtual_functions,
                                              &data->pci_dev.num_virtual_functions);
      
          if (ret < 0 )
              goto out;
          if (data->pci_dev.num_virtual_functions > 0)
              data->pci_dev.flags |= VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION;
      9a3ff01d
    • O
      nodedev: Abstract nodeDeviceVportCreateDelete as util function · 96d3086a
      Osier Yang 提交于
      This abstracts nodeDeviceVportCreateDelete as an util function
      virManageVport, which can be further used by later storage patches
      (to support persistent vHBA, I don't want to create the vHBA
      using the public API, which is not good).
      96d3086a
    • O
      nodedev: Dump max vports and vports in use for HBA's XML · 448be8f7
      Osier Yang 提交于
      This enrichs HBA's xml by dumping the number of max vports and
      vports in use. Format is like:
      
        <capability type='vport_ops'>
          <max_vports>164</max_vports>
          <vports>5</vports>
        </capability>
      
      * docs/formatnode.html.in: (Document the new XML)
      * docs/schemas/nodedev.rng: (Add the schema)
      * src/conf/node_device_conf.h: (New member for data.scsi_host)
      * src/node_device/node_device_linux_sysfs.c: (Collect the value of
        max_vports and vports)
      448be8f7
    • O
      nodedev: Refactor the helpers · 4360a098
      Osier Yang 提交于
      This adds two util functions (virIsCapableFCHost and virIsCapableVport),
      and rename helper check_fc_host_linux as detect_scsi_host_caps,
      check_capable_vport_linux is removed, as it's abstracted to the util
      function virIsCapableVport. detect_scsi_host_caps nows detect both
      the fc_host and vport_ops capabilities. "stat(2)" is replaced with
      "access(2)" for saving.
      
      * src/util/virutil.h:
        - Declare virIsCapableFCHost and virIsCapableVport
      * src/util/virutil.c:
        - Implement virIsCapableFCHost and virIsCapableVport
      * src/node_device/node_device_linux_sysfs.c:
        - Remove check_capable_vport_linux
        - Rename check_fc_host_linux as detect_scsi_host_caps, and refactor
          it a bit to detect both fc_host and vport_os capabilities
      * src/node_device/node_device_driver.h:
        - Change/remove the related declarations
      * src/node_device/node_device_udev.c: (Use detect_scsi_host_caps)
      * src/node_device/node_device_hal.c: (Likewise)
      * src/node_device/node_device_driver.c (Likewise)
      4360a098
    • O
      nodedev: Use access instead of stat · d91f7dec
      Osier Yang 提交于
      The use of 'stat' in nodeDeviceVportCreateDelete is only to check
      if the file exists or not, it's a bit overkill, and safe to replace
      with the wrapper of access(2) (virFileExists).
      d91f7dec
    • O
      util: Add one helper virReadFCHost to read the value of fc_host entry · 244ce462
      Osier Yang 提交于
      "open_wwn_file" in node_device_linux_sysfs.c is redundant, on one
      hand it duplicates work of virFileReadAll, on the other hand, it's
      waste to use a function for it, as there is no other users of it.
      So I don't see why the file opening work cannot be done in
      "read_wwn_linux".
      
      "read_wwn_linux" can be abstracted as an util function. As what all
      it does is to read the sysfs entry.
      
      So this patch removes "open_wwn_file", and abstract "read_wwn_linux"
      as an util function "virReadFCHost" (a more general name, because
      after changes, it can read each of the fc_host entry now).
      
      * src/util/virutil.h: (Declare virReadFCHost)
      * src/util/virutil.c: (Implement virReadFCHost)
      * src/node_device/node_device_linux_sysfs.c: (Remove open_wwn_file,
        and read_wwn_linux)
      src/node_device/node_device_driver.h: (Remove the declaration of
        read_wwn_linux, and the related macros)
      src/libvirt_private.syms: (Export virReadFCHost)
      244ce462
    • O
      nodedev: Introduce two new flags for listAll API · 652a2ec6
      Osier Yang 提交于
      VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST to filter the FC HBA,
      and VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS to filter the FC HBA
      which supports vport.
      652a2ec6
    • O
      nodedev: Remove the unused enum · ab4b0001
      Osier Yang 提交于
      Guess it was created for the fc_host and vports_ops capabilities
      purpose, but there is enum virNodeDevScsiHostCapFlags for them,
      and enum virNodeDevHBACapType is unused, and actually both
      VIR_ENUM_DECL and VIR_ENUM_IMPL use the wrong enum name
      "virNodeDevHBACap".
      ab4b0001
    • P
      virsh: Fix docs for "virsh setmaxmem" · b88831f7
      Peter Krempa 提交于
      The docs assumed the command works always for QEMU and other
      hypervisors. As this is done using the balloon mechainism live increase
      of the maximum memory limit isn't supported. Fix the docs to mention
      this limitation.
      b88831f7
  3. 23 3月, 2013 6 次提交
  4. 22 3月, 2013 16 次提交
  5. 21 3月, 2013 4 次提交