1. 02 8月, 2016 3 次提交
  2. 28 7月, 2016 1 次提交
    • D
      storage: remove "luks" storage volume type · a48c7141
      Daniel P. Berrange 提交于
      The current LUKS support has a "luks" volume type which has
      a "luks" encryption format.
      
      This partially makes sense if you consider the QEMU shorthand
      syntax only requires you to specify a format=luks, and it'll
      automagically uses "raw" as the next level driver. QEMU will
      however let you override the "raw" with any other driver it
      supports (vmdk, qcow, rbd, iscsi, etc, etc)
      
      IOW the intention though is that the "luks" encryption format
      is applied to all disk formats (whether raw, qcow2, rbd, gluster
      or whatever). As such it doesn't make much sense for libvirt
      to say the volume type is "luks" - we should be saying that it
      is a "raw" file, but with "luks" encryption applied.
      
      IOW, when creating a storage volume we should use this XML
      
        <volume>
          <name>demo.raw</name>
          <capacity>5368709120</capacity>
          <target>
            <format type='raw'/>
            <encryption format='luks'>
              <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/>
            </encryption>
          </target>
        </volume>
      
      and when configuring a guest disk we should use
      
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw'/>
          <source file='/home/berrange/VirtualMachines/demo.raw'/>
          <target dev='sda' bus='scsi'/>
          <encryption format='luks'>
            <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/>
          </encryption>
        </disk>
      
      This commit thus removes the "luks" storage volume type added
      in
      
        commit 318ebb36
        Author: John Ferlan <jferlan@redhat.com>
        Date:   Tue Jun 21 12:59:54 2016 -0400
      
          util: Add 'luks' to the FileTypeInfo
      
      The storage file probing code is modified so that it can probe
      the actual encryption formats explicitly, rather than merely
      probing existance of encryption and letting the storage driver
      guess the format.
      
      The rest of the code is then adapted to deal with
      VIR_STORAGE_FILE_RAW w/ VIR_STORAGE_ENCRYPTION_FORMAT_LUKS
      instead of just VIR_STORAGE_FILE_LUKS.
      
      The commit mentioned above was included in libvirt v2.0.0.
      So when querying volume XML this will be a change in behaviour
      vs the 2.0.0 release - it'll report 'raw' instead of 'luks'
      for the volume format, but still report 'luks' for encryption
      format.  I think this change is OK because the storage driver
      did not include any support for creating volumes, nor starting
      guets with luks volumes in v2.0.0 - that only since then.
      Clearly if we change this we must do it before v2.1.0 though.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a48c7141
  3. 26 7月, 2016 2 次提交
  4. 22 7月, 2016 1 次提交
  5. 21 7月, 2016 1 次提交
  6. 20 7月, 2016 2 次提交
  7. 19 7月, 2016 9 次提交
    • 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
      qemu: Alter the qemuDomainGetSecretAESAlias to add new arg · b7b3a51e
      John Ferlan 提交于
      Soon we will be adding luks encryption support. Since a volume could require
      both a luks secret and a secret to give to the server to use of the device,
      alter the alias generation to create a slightly different alias so that
      we don't have two objects with the same alias.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b7b3a51e
    • J
      qemu: Add secinfo for hotplug virtio disk · fceeeda2
      John Ferlan 提交于
      Commit id 'a1344f70' added AES secret processing for RBD when starting
      up a guest. As such, when the hotplug code calls qemuDomainSecretDiskPrepare
      an AES secret could be added to the disk about to be hotplugged. If an AES
      secret was added, then the hotplug code would need to generate the secret
      object because qemuBuildDriveStr would add the "password-secret=" to the
      returned 'driveStr' rather than the base64 encoded password.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      fceeeda2
    • J
      qemu: Alter error path cleanup for qemuDomainAttachMemory · 99026fd0
      John Ferlan 提交于
      A recent adjustment to qemuDomainAttachRNGDevice to properly cleanup
      the props object after a qemuMonitorAddObject also would affect this
      code. Alter the cleanup to be similar to RNG changes.
      99026fd0
    • J
      qemu: Alter error path cleanup for qemuDomainAttachRNGDevice · 47208776
      John Ferlan 提交于
      Based on recent review comment - rather than have a spate of goto failxxxx,
      change to a boolean based model. Ensures that the original error can be
      preserved and cleanup is a bit more orderly if more objects are added.
      47208776
    • J
      qemu: Alter error path cleanup for qemuDomainAttachChrDevice · 05bc30d2
      John Ferlan 提交于
      Based on recent review comment - rather than have a spate of goto failxxxx,
      change to a boolean based model. Ensures that the original error can be
      preserved and cleanup is a bit more orderly if more objects are added.
      05bc30d2
    • J
      qemu: Alter error path cleanup for qemuDomainAttachSCSIDisk · c3b5f22d
      John Ferlan 提交于
      Based on recent review comment - rather than have a spate of goto failxxxx,
      change to a boolean based model. Ensures that the original error can be
      preserved and cleanup is a bit more orderly if more objects are added.
      c3b5f22d
    • J
      qemu: Alter error path cleanup for qemuDomainAttachVirtioDiskDevice · a7f84cb1
      John Ferlan 提交于
      Based on recent review comment - rather than have a spate of goto failxxxx,
      change to a boolean based model. Ensures that the original error can be
      preserved and cleanup is a bit more orderly if more objects are added.
      a7f84cb1
    • J
      qemu: Alter error path cleanup for qemuDomainAttachHostSCSIDevice · 6fe2eb24
      John Ferlan 提交于
      Based on recent review comment - rather than have a spate of goto failxxxx,
      change to a boolean based model. Ensures that the original error can be
      preserved and cleanup is a bit more orderly if more objects are added.
      6fe2eb24
  8. 12 7月, 2016 1 次提交
  9. 01 7月, 2016 1 次提交
  10. 30 6月, 2016 3 次提交
  11. 27 6月, 2016 1 次提交
    • L
      conf/openvz: eliminate incorrect/undocumented use of <source dev='blah'/> · 9658e70f
      Laine Stump 提交于
      When support for <interface type='ethernet'> was added in commit
      9a4b705f back in 2010, it erroneously looked at <source dev='blah'/>
      for a user-specified guest-side interface name. This was never
      documented though. (that attribute already existed at the time in the
      data.ethernet union member of virDomainNetDef, but apparently had no
      practical use - it was only used as a storage place for a NetDef's
      bridge name during qemuDomainXMLToNative(), but even then that was
      never used for anything).
      
      When support for similar guest-side device naming was added to the lxc
      driver several years later, it was put in a new subelement <guest
      dev='blah'/>.
      
      In the intervening years, since there was no validation that
      ethernet.dev was NULL in the other drivers that didn't actually use
      it, innocent souls who were adding other features assuming they needed
      to account for non-NULL ethernet.dev when really they didn't, so
      little bits of the usual pointless cargo-cult code showed up.
      
      This patch not only switches the openvz driver to use the documented
      <guest dev='blah'/> notation for naming the guest-side device (just in
      case anyone is still using the openvz driver), and logs an error if
      anyone tries to set <source dev='blah'/> for a type='ethernet'
      interface, it also removes the cargo-cult uses of ethernet.dev and
      <source dev='blah'/>, and eliminates if from the RNG and from
      virDomainNetDef.
      
      NB: I decided on this course of action after mentioning the
      inconsistency here:
      
        https://www.redhat.com/archives/libvir-list/2016-May/msg02038.html
      
      and getting encouragement do eliminate it in a later IRC discussion
      with danpb.
      9658e70f
  12. 19 6月, 2016 1 次提交
  13. 18 6月, 2016 1 次提交
  14. 17 6月, 2016 1 次提交
  15. 16 6月, 2016 1 次提交
  16. 14 6月, 2016 1 次提交
  17. 09 6月, 2016 2 次提交
  18. 26 5月, 2016 1 次提交
    • L
      conf: permit auto-assignment of controller indexes · 4d100c7a
      Laine Stump 提交于
      Hand-entering indexes for 20 PCI controllers is not as tedious as
      manually determining and entering their PCI addresses, but it's still
      annoying, and the algorithm for determining the proper index is
      incredibly simple (in all cases except one) - just pick the lowest
      unused index.
      
      The one exception is USB2 controllers because multiple controllers in
      the same group have the same index. For these we look to see if 1) the
      most recently added USB controller is also a USB2 controller, and 2)
      the group *that* controller belongs to doesn't yet have a controller
      of the exact model we're just now adding - if both are true, the new
      controller gets the same index, but in all other cases we just assign
      the lowest unused index.
      
      With this patch in place and combined with the automatic PCI address
      assignment, we can define a PCIe switch with several ports like this:
      
        <controller type='pci' model='pcie-root-port'/>
        <controller type='pci' model='pcie-switch-upstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        ...
      
      These will each get a unique index, and PCI addresses that connect
      them together appropriately with no pesky numbers required.
      4d100c7a
  19. 25 5月, 2016 5 次提交
  20. 23 5月, 2016 2 次提交