1. 05 10月, 2017 2 次提交
  2. 04 10月, 2017 4 次提交
  3. 29 9月, 2017 1 次提交
  4. 28 9月, 2017 2 次提交
    • A
      qemu: Add TLS support for Veritas HyperScale (VxHS) · 6885b51e
      Ashish Mittal 提交于
      Alter qemu command line generation in order to possibly add TLS for
      a suitably configured domain.
      
      Sample TLS args generated by libvirt -
      
          -object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/qemu,\
          endpoint=client,verify-peer=yes \
          -drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
          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 the qemuxml2argvtest with a couple of examples. One for a
      simple case and the other a bit more complex where multiple VxHS disks
      are added where at least one uses a VxHS that doesn't require TLS
      credentials and thus sets the domain disk source attribute "tls = 'no'".
      
      Update the hotplug to be able to handle processing the tlsAlias whether
      it's to add the TLS object when hotplugging a disk or to remove the TLS
      object when hot unplugging a disk.  The hot plug/unplug code is largely
      generic, but the addition code does make the VXHS specific checks only
      because it needs to grab the correct config directory and generate the
      object as the command line would do.
      Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      6885b51e
    • A
      util: Add TLS attributes to virStorageSource · f1705485
      Ashish Mittal 提交于
      Add an optional virTristateBool haveTLS to virStorageSource to
      manage whether a storage source will be using TLS.
      
      Sample XML for a VxHS disk:
      
      <disk type='network' device='disk'>
        <driver name='qemu' type='raw' cache='none'/>
        <source protocol='vxhs' name='eb90327c-8302-4725-9e1b-4e85ed4dc251' tls='yes'>
          <host name='192.168.0.1' port='9999'/>
        </source>
        <target dev='vda' bus='virtio'/>
      </disk>
      
      Additionally add a tlsFromConfig boolean to control whether the TLS
      setting was due to domain configuration or qemu.conf global setting
      in order to decide whether to Format the haveTLS setting for either
      a live or saved domain configuration file.
      
      Update the qemuxml2xmltest in order to add a test to show the proper
      parsing.
      
      Also update the docs to describe the tls attribute.
      Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f1705485
  5. 27 9月, 2017 1 次提交
  6. 26 9月, 2017 1 次提交
  7. 22 9月, 2017 1 次提交
  8. 21 9月, 2017 7 次提交
  9. 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
  10. 19 9月, 2017 3 次提交
  11. 18 9月, 2017 6 次提交
  12. 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
  13. 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
  14. 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