1. 21 7月, 2016 3 次提交
  2. 20 7月, 2016 1 次提交
    • 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
  3. 19 7月, 2016 3 次提交
    • J
      qemu: Add luks support for domain disk · da86c6c2
      John Ferlan 提交于
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1301021
      
      Generate the luks command line using the AES secret key to encrypt the
      luks secret. A luks secret object will be in addition to a an AES secret.
      
      For hotplug, check if the encinfo exists and if so, add the AES secret
      for the passphrase for the secret object used to decrypt the device.
      
      Modify/augment the fakeSecret* in qemuxml2argvtest in order to handle
      find a uuid or a volume usage with a specific path prefix in the XML
      (corresponds to the already generated XML tests). Add error message
      when the 'usageID' is not 'mycluster_myname'. Commit id '1d632c39'
      altered the error message generation to rely on the errors from the
      secret_driver (or it's faked replacement).
      
      Add the .args output for adding the LUKS disk to the domain
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      da86c6c2
    • J
      storage: Add support to create a luks volume · 5e46d7d6
      John Ferlan 提交于
      Partially resolves:
      https://bugzilla.redhat.com/show_bug.cgi?id=1301021
      
      If the volume xml was looking to create a luks volume take the necessary
      steps in order to make that happen.
      
      The processing will be:
       1. create a temporary file (virStorageBackendCreateQemuImgSecretPath)
         1a. use the storage driver state dir path that uses the pool and
             volume name as a base.
      
       2. create a secret object (virStorageBackendCreateQemuImgSecretObject)
         2a. use an alias combinding the volume name and "_luks0"
         2b. add the file to the object
      
       3. create/add luks options to the commandline (virQEMUBuildLuksOpts)
         3a. at the very least a "key-secret=%s" using the secret object alias
         3b. if found in the XML the various "cipher" and "ivgen" options
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5e46d7d6
    • J
      tests: Need to check return of virGetLastError · 5ddaa7ef
      John Ferlan 提交于
      Cannot assume virGetLastError returns non-NULL value - modify the code to
      fetch err and check if err && err->code
      
      Found by Coverity
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5ddaa7ef
  4. 18 7月, 2016 2 次提交
    • A
      util: conf: Rename VIR_CONF_{U,}LONG -> VIR_CONF_{U,}LLONG · b1cd3423
      Andrea Bolognani 提交于
      Since commit 6381c89f, we're storing long long integers
      instead of long integers. Rename the corresponding virConfType
      value accordingly.
      b1cd3423
    • J
      Allow omitting USB port · 4f903643
      Ján Tomko 提交于
      We were requiring a USB port path in the schema, but not enforcing it.
      Omitting the USB port would lead to libvirt formatting it as (null).
      Such domain cannot be started and will disappear after libvirtd restart
      (since it cannot parse back the XML).
      
      Only format the port if it has been specified and mark it as optional
      in the XML schema.
      4f903643
  5. 15 7月, 2016 2 次提交
  6. 14 7月, 2016 1 次提交
    • A
      tests: command: Fix build on ppc64/aarch64 · 5bcbf724
      Andrea Bolognani 提交于
      Commit ca10bb04 introduced a new test that fails to build
      on at least some architectures:
      
        commandtest.c: In function 'test25':
        commandtest.c:1121:5: error: comparison is always true due to
                              limited range of data type [-Werror=type-limits]
          if (rv >= 0) {
          ^
      
      Change the type of 'rv' from char to int, which is the proper
      return type for virCommandExec() anyway.
      5bcbf724
  7. 12 7月, 2016 14 次提交
  8. 11 7月, 2016 8 次提交
    • T
      qemuhotplugtest: Move domain and device XMLs to different directories · b0b4a35c
      Tomasz Flendrich 提交于
      This way we can safely differentiate what XMLs contain whole domain
      definitions and which contain just devices.  Thanks to that we can
      test the domain XMLs in virschematest again.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b0b4a35c
    • T
      qemuhotplugtest: Move all XMLs to one directory · ec5dcf2a
      Tomasz Flendrich 提交于
      This makes the search for related XMLs easier, plus they are not used in
      the xml2argv tests anyway.  This also makes future patches cleaner.
      While on that remove unnecessary '-hotplug' from the filenames.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      ec5dcf2a
    • M
      qemuxml2argvmock: Don't leak @netdef->ifname · 1cbb8d4a
      Michal Privoznik 提交于
      In the mock, we have a stub for virNetDevTapCreate(). However,
      the mocked version does not exactly as it's native counterpart.
      The function receives a string, which is an interface name that
      caller would like to have, but it's not guaranteed that they will
      get just that one. If they don't, the function free()-s the one
      passed and returns the new one. Just like the mocked version. But
      what is the mocked version missing is the free().
      
      ==1068== 6 bytes in 1 blocks are definitely lost in loss record 9 of 132
      ==1068==    at 0x4C29F80: malloc (vg_replace_malloc.c:296)
      ==1068==    by 0xDE13356: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4)
      ==1068==    by 0xAE2333E: virXMLPropString (virxml.c:479)
      ==1068==    by 0xAE45975: virDomainNetDefParseXML (domain_conf.c:9038)
      ==1068==    by 0xAE5C0BB: virDomainDefParseXML (domain_conf.c:16734)
      ==1068==    by 0xAE5EB96: virDomainDefParseNode (domain_conf.c:17444)
      ==1068==    by 0xAE5EA05: virDomainDefParse (domain_conf.c:17391)
      ==1068==    by 0xAE5EA93: virDomainDefParseFile (domain_conf.c:17415)
      ==1068==    by 0x433430: testCompareXMLToArgvFiles (qemuxml2argvtest.c:278)
      ==1068==    by 0x433A18: testCompareXMLToArgvHelper (qemuxml2argvtest.c:414)
      ==1068==    by 0x446ED4: virTestRun (testutils.c:179)
      ==1068==    by 0x43A099: mymain (qemuxml2argvtest.c:1016)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      1cbb8d4a
    • M
      qemuxml2argvtest: Don't leak dummy monitor · 958d6208
      Michal Privoznik 提交于
      It's just test, but why leak it?
      
      ==26971== 20 bytes in 1 blocks are definitely lost in loss record 623 of 704
      ==26971==    at 0x4C29F80: malloc (vg_replace_malloc.c:296)
      ==26971==    by 0xE560447: vasprintf (vasprintf.c:76)
      ==26971==    by 0xAE0DEE2: virVasprintfInternal (virstring.c:480)
      ==26971==    by 0xAE0DFF7: virAsprintfInternal (virstring.c:501)
      ==26971==    by 0x4751F3: qemuProcessPrepareMonitorChr (qemu_process.c:2651)
      ==26971==    by 0x4334B1: testCompareXMLToArgvFiles (qemuxml2argvtest.c:297)
      ==26971==    by 0x4339AC: testCompareXMLToArgvHelper (qemuxml2argvtest.c:413)
      ==26971==    by 0x446E7A: virTestRun (testutils.c:179)
      ==26971==    by 0x445D33: mymain (qemuxml2argvtest.c:2029)
      ==26971==    by 0x44886F: virTestMain (testutils.c:969)
      ==26971==    by 0x445D9B: main (qemuxml2argvtest.c:2036)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      958d6208
    • P
      qemu: Add cpu ID to the vCPU pid list in the status XML · 3f57ce4a
      Peter Krempa 提交于
      Note the vcpu ID so that once we allow non-contiguous vCPU topologies it
      will be possible to pair thread id's with the vcpus.
      3f57ce4a
    • P
      tests: qemuxml2xml: Format status XML header dynamically · 7615917a
      Peter Krempa 提交于
      Status XML tests were done by prepending a constant string to an
      existing XML. With the planned changes the header will depend on data
      present in the definition rather than just on the data that was parsed.
      
      The first dynamic element in the header will be the vcpu thread list.
      Reuse and rename qemuXML2XMLPreFormatCallback for gathering the relevant
      data when checking the active XML parsing and formating and pass the
      bitmap to a newly crated header generator.
      7615917a
    • R
      bhyve: fix bhyveargv2xml custom loader test · 9bbb3676
      Roman Bogorodskiy 提交于
      Before pushing this test, I changed the appropriate args file
      to pet test-wrap-argv.pl, but forgot to change the xml file, so
      update it accordingly.
      9bbb3676
    • F
      bhyve: add tests for bhyveParseCommandLineString · dd23c382
      Fabian Freyer 提交于
      dd23c382
  9. 09 7月, 2016 2 次提交
  10. 07 7月, 2016 3 次提交
  11. 02 7月, 2016 1 次提交