1. 24 6月, 2019 2 次提交
  2. 04 10月, 2016 1 次提交
    • M
      qemu: Only use memory-backend-file with NUMA if needed · f398d4b4
      Martin Kletzander 提交于
      If this reminds you of a commit message from around a year ago, it's
      41c2aa72 and yes, we're dealing with
      "the same thing" again.  Or f309db1f and
      it's similar.
      
      There is a logic in place that if there is no real need for
      memory-backend-file, qemuBuildMemoryBackendStr() returns 0.  However
      that wasn't the case with hugepage backing.  The reason for that was
      that we abused the 'pagesize' variable for storing that information, but
      we should rather have a separate one that specifies whether we really
      need the new object for hugepage backing.  And that variable should be
      set only if this particular NUMA cell needs special treatment WRT
      hugepages.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372153Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      (cherry picked from commit 4372a7845acbc6974f6027ef68e7dd3eeb47f425)
      f398d4b4
  3. 02 8月, 2016 6 次提交
  4. 01 8月, 2016 6 次提交
  5. 29 7月, 2016 2 次提交
    • M
      conf: Catch invalid memory model earlier · 1e058463
      Michal Privoznik 提交于
      Consider the following XML snippet:
      
          <memory model=''>
            <target>
              <size unit='KiB'>523264</size>
              <node>0</node>
            </target>
          </memory>
      
      Whats wrong you ask? The @model attribute. This should result in
      an error thrown into users faces during virDomainDefine phase.
      Except it doesn't. The XML validation catches this error, but if
      users chose to ignore that, they will end up with invalid XML.
      Well, they won't be able to start the machine - that's when error
      is produced currently. But it would be nice if we could catch the
      error like this earlier.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      1e058463
    • E
      admin: Fix default uri config option name s/admin_uri_default/uri_default · f5f32bcd
      Erik Skultety 提交于
      The original name 'admin_uri_default' was introduced to our code by commit
      dbecb87f. However, at that time we already had a separate config file for
      admin library but the commit mentioned above didn't properly adjust the
      config's option name. The result is that when we're loading the config, we
      check a non-existent config option (there's not much to do with the URIs
      anyway, since we only allow local connection). Additionally, virt-admin's man
      page documents, that the default URI can be altered by setting
      admin_uri_default option. So the fix proposed by this patch leaves the
      libvirt-admin.conf as is and adjusts the naming in the code as well as in the
      virt-admin's man page.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      f5f32bcd
  6. 28 7月, 2016 13 次提交
    • M
      wireshark: Adapt to dissector function header change · 98aefa81
      Michal Privoznik 提交于
      In wireshark commit bbdd89b9 (contained in 2.1.0 release) they
      have changed prototype of dissector function. Now it returns
      number of bytes consumed by the dissector, and can get a pointer
      to user specified data (which we don't use).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      98aefa81
    • J
      qemu: Need to free fileprops in error path · 8ad7eceb
      John Ferlan 提交于
      The virJSONValueObjectCreate only consumes the object on success, so on
      failure we must free - from commit id 'f4441017' (found by Coverity).
      8ad7eceb
    • J
      iscsi: Establish connection to target via static target login · 5d8c31c6
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1356436
      
      Commit id '56057900' altered the discovery of iSCSI node targets by
      using the "--op nonpersistent". This caused issues for clean environments
      or if by chance a "-m node -o delete" was executed.
      
      Since each iSCSI Storage Pool has the required iSCSI target path, use
      that and the virISCSINodeNew API in order to generate the iSCSI node record.
      5d8c31c6
    • J
      util: Introduce virISCSINodeNew · ae65c908
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1356436
      
      According to RFC 3721 (https://www.ietf.org/rfc/rfc3721.txt), there are
      two ways to "discover" targets in/for the iSCSI environment. Discovery
      is the process which allows the initiator to find the targets to which
      it has access and at least one address at which each target may be
      accessed.
      
      The method currently implemented in libvirt using the virISCSIScanTargets
      API is known as "SendTargets" discovery. This method is more useful when
      the target IP Address and TCP port information are available, e.g. in
      libvirt terms the "portal". It returns a list of targets for the portal.
      From that list, the target can be found. This operation can also fill an
      iSCSI node table into which iSCSI logins may occur. Commit id '56057900'
      altered that filling by adding the "--op nonpersistent" since it was
      not necessarily desired to perform that for non libvirt related targets.
      
      The second method is "Static Configuration". This method not only needs
      the IP Address and TCP port (e.g. portal), but also the iSCSI target name.
      In libvirt terms this would be the device path field from the iSCSI pool
      <source> XML. This patch implements the second methodology using that
      required device path as the targetname.
      ae65c908
    • E
      tools: Make use of the correct environment variables · d02ef334
      Erik Skultety 提交于
      Since commit 834c5720 which extracted the generic functionality out of virsh
      and made it available for other clients like virt-admin to make use of it, it
      also introduced a bug when it renamed the original VIRSH_ environment variables
      to VSH_ variables. Virt-admin of course suffers from the same bug, so this
      patch modifies the generic module vsh.c to construct the correct name for
      environment variables of each client from information it has.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1357363Signed-off-by: NErik Skultety <eskultet@redhat.com>
      d02ef334
    • E
      vsh: Make vshInitDebug return int instead of void · 0ef07e19
      Erik Skultety 提交于
      Well, the reason behind this change is that if the function is extended in some
      way that e.g. would involve allocation we do not have a way of telling it to
      the caller. More specifically, vshInitDebug only relies on some hardcoded
      environment variables (by a mistake) that aren't documented anywhere so neither
      virsh's nor virt-admin's documented environment variables take effect. One
      possible solution would be duplicate the code for each CLI client or leave the
      method be generic and provide means that it could figure out, which client
      called it, thus initializing the proper environment variables but that could
      involve operations that might as well fail in certain circumstances and the
      caller should know that an error occurred.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      0ef07e19
    • D
      Refresh translations from zanata · 1db6908a
      Daniel P. Berrange 提交于
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1db6908a
    • M
      vshReadlineParse: Drop some unused variables · ea2ad171
      Michal Privoznik 提交于
      My compiler identified some variables that were set, but never
      actually used. For instance, opts_required, and data_acomplete.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ea2ad171
    • M
      vshCmddefGetOption: Change type of opt_index · 2bc97f27
      Michal Privoznik 提交于
      This function tries to look up desired option for a given parsed
      command. Upon successful return it also stores option position
      into passed *opt_index. Now, this variable is type of int, even
      though it is never ever used to store negative value. Moreover,
      the variable is set from a local variable which is type of
      size_t.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2bc97f27
    • D
    • D
      Fix RPM spec for wireshark on Fedora < 24 · 8035bf71
      Daniel P. Berrange 提交于
      This previous commit
      
        commit cd9fcc8b
        Author: Michal Privoznik <mprivozn@redhat.com>
        Date:   Wed Jul 27 16:58:32 2016 +0200
      
          libvirt.spec.in: Adapt to newest wireshark plugindir
      
      Adapted the libvirt spec for wireshark >= 2.1.0 but
      this ignored the fact that we enable wireshark from
      Fedora 21 and 2.1.0 was only added in Fedora 24
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8035bf71
    • 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
    • D
      virstoragefile: refactor virStorageFileMatchesNNN methods · 970f42ab
      Daniel P. Berrange 提交于
      Refactor the virStorageFileMatchesNNN methods so that
      they don't take a struct FileFormatInfo parameter, but
      instead get the actual raw dat items they needs. This
      will facilitate reuse in other contexts.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      970f42ab
  7. 27 7月, 2016 10 次提交