1. 20 8月, 2014 2 次提交
    • R
      bhyve: add volumes support · 6c2e7d0b
      Roman Bogorodskiy 提交于
      Update bhyveBuildDiskArgStr to support volumes:
      
       - Make virBhyveProcessBuildBhyveCmd and
         virBhyveProcessBuildLoadCmd take virConnectPtr as the
         first argument instead of bhyveConnPtr as virConnectPtr is
         needed for virStorageTranslateDiskSourcePool,
       - Add virStorageTranslateDiskSourcePool call to
         virBhyveProcessBuildBhyveCmd and
         virBhyveProcessBuildLoadCmd,
       - Allow disks of type VIR_STORAGE_TYPE_VOLUME
      6c2e7d0b
    • R
      storage: make disk source pool translation generic · 8c170c9f
      Roman Bogorodskiy 提交于
      Currently, qemu driver uses qemuTranslateDiskSourcePool()
      to translate disk volume information. This function is
      general enough and could be used for other drivers as well,
      so move it to conf/domain_conf.c along with its helpers.
      
       - qemuTranslateDiskSourcePool: move to storage/storage_driver.c
         and rename to virStorageTranslateDiskSourcePool,
       - qemuAddISCSIPoolSourceHost: move to storage/storage_driver.c
         and rename to virStorageAddISCSIPoolSourceHost,
       - qemuTranslateDiskSourcePoolAuth: move to storage/storage_driver.c
         and rename to virStorageTranslateDiskSourcePoolAuth,
       - Update users of qemuTranslateDiskSourcePool to use a
         new name.
      8c170c9f
  2. 19 8月, 2014 2 次提交
  3. 12 8月, 2014 2 次提交
  4. 11 8月, 2014 1 次提交
  5. 08 8月, 2014 2 次提交
    • P
      e260a0e6
    • J
      hostdev: Add iSCSI hostdev XML · 54ac483e
      John Ferlan 提交于
      Introduce a new structure to handle an iSCSI host device based on the
      existing virDomainHostdevSubsysSCSI by adding a "protocol='iscsi'" to
      the <source/> element. The existing scsi_host subsystem RNG was modified
      to read an optional "protocol='adapter'", although it won't be written
      out nor is it documented as an option (by choice).
      
      The new hostdev structure mimics the existing <disk/> element for an
      iSCSI device (network) device. New XML is:
      
        <hostdev mode='subsystem' type='scsi' managed='yes'>
          <source protocol='iscsi' name='iqn.1992-01.com.example'>
            <host name='example.org' port='3260'/>
            <auth username='myname'>
              <secret type='iscsi' usage='mycluster_myname'/>
            </auth>
          </source>
          <address type='drive' controller='0' bus='0' target='2' unit='5'/>
        </hostdev>
      
      The controller element will mimic the existing scsi_host code insomuch
      as when 'lsi' and 'virtio-scsi' are used.
      54ac483e
  6. 01 8月, 2014 1 次提交
  7. 30 7月, 2014 3 次提交
    • E
      blockcommit: track job type in xml · 232a31be
      Eric Blake 提交于
      A future patch is going to wire up qemu active block commit jobs;
      but as they have similar events and are canceled/pivoted in the
      same way as block copy jobs, it is easiest to track all bookkeeping
      for the commit job by reusing the <mirror> element.  This patch
      adds domain XML to track which job was responsible for creating a
      mirroring situation, and adds a job='copy' attribute to all
      existing uses of <mirror>.  Along the way, it also massages the
      qemu monitor backend to read the new field in order to generate
      the correct type of libvirt job (even though it requires a
      future patch to actually cause a qemu event that can be reported
      as an active commit).  It also prepares to update persistent XML
      to match changes made to live XML when a copy completes.
      
      * docs/schemas/domaincommon.rng: Enhance schema.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (_virDomainDiskDef): Add a field.
      * src/conf/domain_conf.c (virDomainBlockJobType): String conversion.
      (virDomainDiskDefParseXML): Parse job type.
      (virDomainDiskDefFormat): Output job type.
      * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Distinguish
      active from regular commit.
      * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Set job type.
      (qemuDomainBlockPivot, qemuDomainBlockJobImpl): Clean up job type
      on completion.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml:
      Update tests.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-active-commit.xml: New
      file.
      * tests/qemuxml2xmltest.c (mymain): Drive new test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      232a31be
    • C
      Domain config: write <features/> if some capabilities are set. · 251d75a8
      Cédric Bosdonnat 提交于
      If all features are set to default (including the capabilities policy),
      but some capabilities are toggled, we need to output the <features>
      element when formatting the config.
      251d75a8
    • E
      blockcopy: add more XML for state tracking · 9a212d67
      Eric Blake 提交于
      Doing a blockcopy operation across a libvirtd restart is not very
      robust at the moment.  In particular, we are clearing the <mirror>
      element prior to telling qemu to finish the job.  Also, thanks to the
      ability to request async completion, the user can easily regain
      control prior to qemu actually finishing the effort, and they should
      be able to poll the domain XML to see if the job is still going.
      
      A future patch will fix things to actually wait until qemu is done
      before modifying the XML to reflect the job completion.  But since
      qemu issues identical BLOCK_JOB_COMPLETE events regardless of whether
      the job was cancelled (kept the original disk) or completed (pivoted
      to the new disk), we have to track which of the two operations were
      used to end the job.  Furthermore, we'd like to avoid attempts to
      end a job where we are already waiting on an earlier request to qemu
      to end the job.  Likewise, if we miss the qemu event (perhaps because
      it arrived during a libvirtd restart), we still need enough state
      recorded to be able to determine how to modify the domain XML once
      we reconnect to qemu and manually learn whether the job still exists.
      
      Although this patch doesn't actually fix the problem, it is a
      preliminary step that makes it possible to track whether a job
      has already begun steps towards completion.
      
      * src/conf/domain_conf.h (virDomainDiskMirrorState): New enum.
      (_virDomainDiskDef): Convert bool mirroring to new enum.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML)
      (virDomainDiskDefFormat): Handle new values.
      * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Adjust
      client.
      * src/qemu/qemu_driver.c (qemuDomainBlockPivot)
      (qemuDomainBlockJobImpl): Likewise.
      * docs/schemas/domaincommon.rng (diskMirror): Expose new values.
      * docs/formatdomain.html.in (elementsDisks): Document it.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Test it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9a212d67
  8. 29 7月, 2014 5 次提交
  9. 28 7月, 2014 1 次提交
  10. 25 7月, 2014 2 次提交
  11. 24 7月, 2014 1 次提交
    • R
      bhyve: cdrom support · d704e698
      Roman Bogorodskiy 提交于
      Add support for CDROM devices for bhyve driver using
      bhyve(8)'s 'ahci-cd' device type.
      
      As bhyve currently does not support media insertion at runtime,
      disallow to start a domain with an empty source path for cdrom
      devices.
      d704e698
  12. 23 7月, 2014 2 次提交
  13. 22 7月, 2014 6 次提交
    • M
      tests: Remove stale scsihostdata dir · 692016f7
      Michal Privoznik 提交于
      In the fbd91d49 commit, new scsihostdata dir is added to EXTRA_DIST in
      the tests/Makefile.am. However, the directory itself is not created
      anywhere, nor in the commit.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      692016f7
    • J
      scsi_host: Introduce virFindSCSIHostByPCI · ef48a1b6
      John Ferlan 提交于
      Introduce a new function to parse the provided scsi_host parent address
      and unique_id value in order to find the /sys/class/scsi_host directory
      which will allow a stable SCSI host address
      
      Add a test to scsihosttest to lookup the host# name by using the PCI address
      and unique_id value
      ef48a1b6
    • J
      Add unique_id to nodedev output · f3271f4c
      John Ferlan 提交于
      Add an optional unique_id parameter to nodedev.  Allows for easier lookup
      and display of the unique_id value in order to document for use with
      scsi_host code.
      f3271f4c
    • J
      virutil: Introduce virReadSCSIUniqueId · fbd91d49
      John Ferlan 提交于
      Introduce a new function to read the current scsi_host entry and return
      the value found in the 'unique_id' file.
      
      Add a 'scsihosttest' test (similar to the fchosttest, but incorporating some
      of the concepts of the mocked pci test library) in order to read the
      unique_id file like would be found in the /sys/class/scsi_host tree.
      fbd91d49
    • O
      storage: Introduce parentaddr into virStoragePoolSourceAdapter · a4bd62ad
      Osier Yang 提交于
      Between reboots and kernel reloads, the SCSI host number used for SCSI
      storage pools may change requiring modification to the storage pool XML
      in order to use a specific SCSI host adapter.
      
      This patch introduces the "parentaddr" element and "unique_id" attribute
      for the SCSI host adapter in order to uniquely identify the adapter
      between reboots and kernel reloads. For now the goal is to only parse
      and format the XML. Both will be required to be provided in order to
      uniquely identify the desired SCSI host.
      
      The new XML is expected to be as follows:
      
        <adapter type='scsi_host'>
          <parentaddr unique_id='3'>
            <address domain='0x0000' bus='0x00' slot='0x1f' func='0x2'/>
          </parentaddr>
        </adapter>
      
      where "parentaddr" is the parent device of the SCSI host using the PCI
      address on which the device resides and the value from the unique_id file
      for the device. Both the PCI address and unique_id values will be used
      to traverse the /sys/class/scsi_host/ directories looking at each link
      to match the PCI address reformatted to the directory link format where
      "domain:bus:slot:function" is found.  Then for each matching directory
      the unique_id file for the scsi_host will be used to match the unique_id
      value in the xml.
      
      For a PCI address listed above, this will be formatted to "0000:00:1f.2"
      and the links in /sys/class/scsi_host will be used to find the host#
      to be used for the 'scsi_host' device. Each entry is a link to the
      /sys/bus/pci/devices directories, e.g.:
      
      %  ls -al /sys/class/scsi_host/host2
      lrwxrwxrwx. 1 root root 0 Jun  1 00:22 /sys/class/scsi_host/host2 -> ../../devices/pci0000:00/0000:00:1f.2/ata3/host2/scsi_host/host2
      
      % cat /sys/class/scsi_host/host2/unique_id
      3
      
      The "parentaddr" and "name" attributes are mutually exclusive to identify
      the SCSI host number. Use of the "parentaddr" element will be the preferred
      mechanism.
      
      This patch only supports to parse and format the XMLs. Later patches will
      add code to find out the scsi host number.
      a4bd62ad
    • P
      schema: pool: netfs: Don't enforce slash in glusterfs pool source · b325be12
      Peter Krempa 提交于
      Gluster volumes don't start with a leading slash. Our schema for netfs
      gluster pools enforces it though. Luckily mount.glusterfs skips it.
      Allow a slashless volume name for glusterfs netfs mounts in the schema.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1101999
      b325be12
  14. 18 7月, 2014 2 次提交
  15. 17 7月, 2014 8 次提交