1. 27 9月, 2017 1 次提交
  2. 26 9月, 2017 1 次提交
  3. 22 9月, 2017 1 次提交
  4. 21 9月, 2017 7 次提交
  5. 20 9月, 2017 7 次提交
    • D
      Stop linking tests/commandhelper to libvirt code · eae746b2
      Daniel P. Berrange 提交于
      The commandhelper binary is a helper for commandtest that
      validates what file handles were inherited. For this to
      work reliably we must not have any libraries that leak
      file descriptors into commandhelper. Unfortunately some
      versions of gnutls will intentionally open file handles
      at library load time via a constructor function.
      
      We previously hacked around this in
      
        commit 4cbc15d0
        Author: Martin Kletzander <mkletzan@redhat.com>
        Date:   Fri May 2 09:55:52 2014 +0200
      
          tests: don't fail with newer gnutls
      
          gnutls-3.3.0 and newer leaves 2 FDs open in order to be backwards
          compatible when it comes to chrooted binaries [1].  Linking
          commandhelper with gnutls then leaves these two FDs open and
          commandtest fails thanks to that.  This patch does not link
          commandhelper with libvirt.la, but rather only the utilities making
          the test pass.
      
          Based on suggestion from Daniel [2].
      
          [1] http://lists.gnutls.org/pipermail/gnutls-help/2014-April/003429.html
          [2] https://www.redhat.com/archives/libvir-list/2014-April/msg01119.html
      
      That fix relied on fact that while libvirt.so linked with
      gnutls, libvirt_util.la did not link to it.  With the
      introduction of the util/vircrypto.c file that assumption
      is no longer valid. We must not link to libvirt_util.la
      at all - only gnulib and libc can (hopefully) be relied
      on not to open random file descriptors in constructors.
      Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      eae746b2
    • Z
      vhost-user: add support reconnect for vhost-user ports · edaf4ebe
      ZhiPeng Lu 提交于
      For vhost-user ports, Open vSwitch acts as the server and QEMU the client.
      When OVS crashed or restart, QEMU shoule be reconnect to OVS.
      Signed-off-by: NZhiPeng Lu <lu.zhipeng@zte.com.cn>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      edaf4ebe
    • J
      storage: Add new events for *PoolBuild() and *PoolDelete(). · b0652192
      Julio Faracco 提交于
      This commit adds new events for two methods and operations: *PoolBuild() and
      *PoolDelete(). Using the event-test and the commands set below we have the
      following outputs:
      
      $ sudo ./event-test
      Registering event callbacks
      myStoragePoolEventCallback EVENT: Storage pool test Defined 0
      myStoragePoolEventCallback EVENT: Storage pool test Created 0
      myStoragePoolEventCallback EVENT: Storage pool test Started 0
      myStoragePoolEventCallback EVENT: Storage pool test Stopped 0
      myStoragePoolEventCallback EVENT: Storage pool test Deleted 0
      myStoragePoolEventCallback EVENT: Storage pool test Undefined 0
      
      Another terminal:
      $ sudo virsh pool-define test.xml
      Pool test defined from test.xml
      
      $ sudo virsh pool-build test
      Pool test built
      
      $ sudo virsh pool-start test
      Pool test started
      
      $ sudo virsh pool-destroy test
      Pool test destroyed
      
      $ sudo virsh pool-delete test
      Pool test deleted
      
      $ sudo virsh pool-undefine test
      Pool test has been undefined
      
      This commits can be a solution for RHBZ #1475227.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1475227Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b0652192
    • A
      qemu: Add qemu command line generation for a VxHS block device · dbd98380
      Ashish Mittal 提交于
      The VxHS block device will only use the newer formatting options and
      avoid the legacy URI syntax.
      
      An excerpt for a sample QEMU command line is:
      
        -drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
         file.server.type=tcp,file.server.host=192.168.0.1,\
         file.server.port=9999,format=raw,if=none,id=drive-virtio-disk0,cache=none \
        -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
         id=virtio-disk0
      
      Update qemuxml2argvtest with a simple test.
      Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      dbd98380
    • A
      util: storage: Add JSON backing volume parse for VxHS · 2a48252b
      Ashish Mittal 提交于
      Add the backing parse and a test case to verify parsing of VxHS
      backing storage.
      Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      2a48252b
    • A
      docs: Add schema and docs for Veritas HyperScale (VxHS) · e6a7fa26
      Ashish Mittal 提交于
      Alter the schema to allow a VxHS block device. Sample XML is:
      
        <disk type='network' device='disk'>
          <driver name='qemu' type='raw' cache='none'/>
          <source protocol='vxhs' name='eb90327c-8302-4725-9e1b-4e85ed4dc251'>
            <host name='192.168.0.1' port='9999'/>
          </source>
          <target dev='vda' bus='virtio'/>
          <serial>eb90327c-8302-4725-9e1b-4e85ed4dc251</serial>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
        </disk>
      
      Update the html docs to describe the capability for VxHS.
      
      Alter the qemuxml2xmltest to validate the formatting.
      Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      e6a7fa26
    • J
      qemu: Detect support for vxhs · fa6159dd
      John Ferlan 提交于
      Using the query-qmp-schema introspection - look for the 'vxhs'
      blockdevOptions type.
      
      NB: This is a "best effort" type situation as there is not a
          mechanism to determine whether the running QEMU has been
          built with '--enable-vxhs'. All we can do is check if the
          option to use vxhs for a blockdev-add exists in the command
          infrastructure which does not take that into account when
          building its table of commands and options.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      fa6159dd
  6. 19 9月, 2017 3 次提交
  7. 18 9月, 2017 6 次提交
  8. 15 9月, 2017 3 次提交
    • J
      conf: Add invalid domain disk encryption test · 411cdb61
      John Ferlan 提交于
      Add a test to prove checking for invalid luks disk formatting check.
      The error message will indicate supplying the <cipher> element is
      unnecessary.
      411cdb61
    • J
      conf: Add invalid secrettype checks · fbad3ed0
      John Ferlan 提交于
      Add a couple of tests to "validate" checks in domain_conf that either
      a missing secrettype (CONFIG_UNSUPPORTED) or an mismatched secrettype
      of ceph for an iSCSI disk (INTERNAL_ERROR) will cause a parsing error.
      fbad3ed0
    • J
      docs: Remove unnecessary <auth> example for iscsi disk type='volume' · 4775ca27
      John Ferlan 提交于
      Alter the example to remove the <auth> from:
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw'/>
          <source pool='iscsi-pool' volume='unit:0:0:1' mode='host'/>
          <auth username='myuser'>
            <secret type='iscsi' usage='libvirtiscsi'/>
          </auth>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      and
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw'/>
          <source pool='iscsi-pool' volume='unit:0:0:2' mode='direct'/>
          <auth username='myuser'>
            <secret type='iscsi' usage='libvirtiscsi'/>
          </auth>
          <target dev='vdc' bus='virtio'/>
        </disk>
      
      The reality is, it's not even used. For a <source pool> the authdef
      from the storage source pool will supercede whatever is in the <disk>
      definition during virStorageTranslateDiskSourcePool processing. In fact,
      if the pool doesn't have/need authentication, then the authdef would
      be removed anyway as the storage pool would be handling things.
      
      The "proof" for this is in the adjustment to the test to add an
      <auth> for a disk. The resulting .args file won't add what normally
      would be added "myname:encodedpassword@" prior to the hostname in
      the IQN (e.g. iscsi://myname:encodedpassword@iscsi.example.org:3260/...
      4775ca27
  9. 14 9月, 2017 1 次提交
    • J
      qemu: Add QEMU 2.10 x86_64 the generated capabilities · 3358bfb2
      John Ferlan 提交于
      For reference, these were generated by updating a local qemu git
      repository to the latest upstream, making sure the latest dependencies
      were met via "dnf builddep qemu" from my sufficiently privileged root
      account, checking out the v2.10.0 tag, and building in order to generate
      an "x86_64-softmmu/qemu-system-x86_64" image.
      
      Then using a clean libvirt tree updated to master and built, the image
      was then provided as input:
      
          tests/qemucapsprobe /path/to/x86_64-softmmu/qemu-system-x86_64 > \
             tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies
      
      With the .replies file in place and the DO_TEST line added and build,
      then running the following commands:
      
          touch tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
          VIR_TEST_REGENERATE_OUTPUT=1 ./tests/qemucapabilitiestest
      
      to generate tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml and both
      were added to the commit.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      3358bfb2
  10. 12 9月, 2017 1 次提交
    • J
      qemu: Provide default LUN=0 for iSCSI if not provided · f64f03b5
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1477880
      
      If the "/#" is missing from the provided iSCSI path, then we need
      to provide the default LUN of /0; otherwise, QEMU will fail to parse
      the URL causing a failure to either create the guest or hotplug
      attach the storage.
      
      During post parse, for any iSCSI disk or hostdev, scan the source
      path looking for the presence of '/', if found, then we can assume
      the LUN is provided.  If not found, alter the input XML to add the
      "/0".  This will cause the generated XML to have the generated
      value when the domain config is saved after post parse.
      f64f03b5
  11. 11 9月, 2017 1 次提交
    • J
      tests: merge iommu tests · 190a5bc1
      Ján Tomko 提交于
      Using intremap without <ioapic driver='qemu'/> does not work.
      Merge the tests to avoid a duplicit test once we start validating it.
      190a5bc1
  12. 07 9月, 2017 3 次提交
  13. 05 9月, 2017 3 次提交
  14. 30 8月, 2017 2 次提交
    • P
      qemu: set bind mode for chardev while parsing XML · be6a415e
      Pavel Hrdina 提交于
      Currently while parsing domain XML we clear the UNIX path if it matches
      one of the auto-generated paths by libvirt.  After that when the guest
      is started new path is generated but the mode is also changed to "bind".
      
      In the real-world use-case the mode should not change, it only happens
      if a user provides a mode='connect' and path that matches one of the
      auto-generated path or not provides a path at all.
      
      Before *reconnect* feature was introduced there was no issue, but with
      the new feature we need to make sure that it's used only with "connect"
      mode, therefore we need to move the mode change into parsing in order
      to have a proper error reported by validation code.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      be6a415e
    • P
      tests: don't use unix socket path that matches auto-generated path · 8646b125
      Pavel Hrdina 提交于
      The test was introduced by 60135b22.
      
      The auto-generated path is removed by post-parse callback which
      also changes the mode from "connect" to "bind" since the auto-generated
      path makes sense only for "bind" mode.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      8646b125