1. 20 7月, 2016 8 次提交
    • J
      storage: Add extra failure condition for luks volume creation · 30d27f24
      John Ferlan 提交于
      Commit id '5e46d7d6' did not take into account that usage of a luks
      volume will require usage of the master key encrypted passphrase for
      a QEMU environment.  So rather than allow creation of something that
      won't be usable, just fail the creation.
      30d27f24
    • J
      qemu: Disallow usage of luks encryption if aes secret not possible · a53349e6
      John Ferlan 提交于
      Resolves a CI test integration failure with a RHEL6/Centos6 environment.
      
      In order to use a LUKS encrypted device, the design decision was to
      generate an encrypted secret based on the master key. However, commit
      id 'da86c6c2' missed checking for that specifically.
      
      When qemuDomainSecretSetup was implemented, a design decision was made
      to "fall back" to a plain text secret setup if the specific cipher was
      not available (e.g. virCryptoHaveCipher(VIR_CRYPTO_CIPHER_AES256CBC))
      as well as the QEMU_CAPS_OBJECT_SECRET. For the luks encryption setup
      there is no fall back to the plaintext secret, thus if that gets set
      up by qemuDomainSecretSetup, then we need to fail.
      
      Also, while the qemuxml2argvtest has set the QEMU_CAPS_OBJECT_SECRET
      bit, it didn't take into account the second requirement that the
      ability to generate the encrypted secret is possible. So modify the
      test to not attempt to run the luks-disk if we know we don't have
      the encryption algorithm.
      a53349e6
    • J
      storage: Fix error path · 9301b462
      John Ferlan 提交于
      virStorageBackendCreateQemuImgCheckEncryption didn't return -1 if there
      were no secrets.
      9301b462
    • J
      qemu: Move setting of encobjAdded for qemuDomainAttachSCSIDisk · 4f5debbe
      John Ferlan 提交于
      A post push realization that the boolean should be set inside the condition
      4f5debbe
    • J
      qemu: Move setting of obj bools for qemuDomainAttachVirtioDiskDevice · c144f14c
      John Ferlan 提交于
      A post push realization that the setting of the boolean needed to be
      inside the if condition.
      c144f14c
    • J
      hvsupport: skip non-matching lines early · f1bbf57c
      Ján Tomko 提交于
      Most of the lines we look at are not going to match one of the
      driver types contained in $groups_regex.
      
      Move on to the next line if it does not contain any of them early.
      This speeds up the script execution by 50%, since this simple regex
      does not have any capture groups.
      f1bbf57c
    • J
      hvsupport: construct the group regex upfront · 6dc1f103
      Ján Tomko 提交于
      The %groups hash contains all the driver types (e.g.
      virHypervisorDriver or virSecretDriver).
      
      When searching for all the APIs that are implemented by a driver
      of that specific driver type, we keep iterating over the %groups
      hash on every line we look at, then matching against the driver type.
      
      This is inefficient because it prevents perl from caching the regex
      and it executes the regex once for every driver type, even though
      one regex matching excludes all the others, since all the driver types
      are different.
      
      Construct the regex containing all the driver types upfront to save
      about 6.4s (~98%) of the script execution time.
      6dc1f103
    • J
      hvsupport: use a regex instead of XML::XPath · ad9e72f5
      Ján Tomko 提交于
      When generating the hvsupport.html.in file, we parse the -api.xml
      files generated by apibuild.py to know in which HTML file the API
      function is.
      
      Doing an XPath query for every single 'function' element in the
      file is inefficient.
      
      Since the XML file is generated by another of our build scripts
      (apibuild.py, using Python's standard 'output.write' XML library),
      just find the function name->file mapping by a regex upfront.
      
      Also add a note about this next to the line that generates it
      in apibuild.py and do not check if XML::XPath is installed in
      bootstrap since we no longer use it.
      ad9e72f5
  2. 19 7月, 2016 32 次提交