1. 01 12月, 2014 4 次提交
  2. 25 11月, 2014 3 次提交
    • C
      lxc: be more patient while resolving symlinks · 72fecf18
      Cédric Bosdonnat 提交于
      Resolving symlinks can fail before mounting any file system if one file
      system depends on another being mounted. Symlinks are now resolved in
      two passes:
      
        * Before any file system is mounted, but then we are more gentle if
          the source path can't be accessed
        * Right before mounting a file system, so that we are sure that we
          have the resolved path... but then if it can't be accessed we raise
          an error.
      72fecf18
    • P
      qemu-command: introduce new vgamem attribute for QXL video device · 742d49fa
      Pavel Hrdina 提交于
      Add attribute to set vgamem_mb parameter of QXL device for QEMU. This
      value sets the size of VGA framebuffer for QXL device. Default value in
      QEMU is 8MB so reuse it also in libvirt to not break things.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      742d49fa
    • P
      video: cleanup usage of vram attribute and update documentation · 81ba2298
      Pavel Hrdina 提交于
      The vram attribute was introduced to set the video memory but it is
      usable only for few hypervisors excluding QEMU/KVM and the old XEN
      driver. Only in case of QEMU the vram was used for QXL.
      
      This patch updates the documentation to reflect current code in libvirt
      and also changes the cases when we will set the default vram attribute.
      It also fixes existing strange default value for VGA devices 9MB to 16MB
      because the video ram should be rounded to power of two.
      
      The change of default value could affect migrations but I found out that
      QEMU always round the video ram to power of two internally so it's safe
      to change the default value to the next closest power of two and also
      silently correct every domain XML definition. And it's also safe because
      we don't pass the value to QEMU.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      81ba2298
  3. 24 11月, 2014 2 次提交
  4. 21 11月, 2014 4 次提交
  5. 19 11月, 2014 2 次提交
    • E
      maint: forbid 'int foo = true' · eb909376
      Eric Blake 提交于
      I noticed this while working on qemuDomainGetBlockInfo.  Assigning
      a bool value to an int variable compiles fine, but raises red flags
      on the maintenance front as it becomes too easy to assign -1 or 2
      or any other non-bool value to the same variable.
      
      * cfg.mk (sc_prohibit_int_assign_bool): New rule.
      * src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix
      offenders.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo)
      (qemuDomainSnapshotCreateXML): Likewise.
      * src/test/test_driver.c (testDomainSnapshotAlignDisks):
      Likewise.
      * src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise.
      * src/util/virpci.c (virPCIDeviceBindToStub): Likewise.
      * src/util/virutil.c (virIsCapableVport): Likewise.
      * tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise.
      * tools/virsh-domain.c (cmdBlockResize, cmdScreenshot)
      (cmdInjectNMI, cmdSendKey, cmdSendProcessSignal)
      (cmdDetachInterface): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eb909376
    • A
      network: Add network bandwidth support to ethernet interfaces · 22cff52a
      Anirban Chakraborty 提交于
      Ethernet interfaces in libvirt currently do not support bandwidth setting.
      For example, following xml file for an interface will not apply these
      settings to corresponding qdiscs.
      
          <interface type="ethernet">
            <mac address="02:36:1d:18:2a:e4"/>
            <model type="virtio"/>
            <script path=""/>
            <target dev="tap361d182a-e4"/>
            <bandwidth>
              <inbound average="984" peak="1024" burst="64"/>
              <outbound average="2000" peak="2048" burst="128"/>
            </bandwidth>
          </interface>
      Signed-off-by: NAnirban Chakraborty <abchak@juniper.net>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      22cff52a
  6. 15 11月, 2014 1 次提交
  7. 12 11月, 2014 3 次提交
    • J
      storage: Introduce 'managed' for the fchost parent · 5530f248
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1160926
      
      Introduce a 'managed' attribute to allow libvirt to decide whether to
      delete a vHBA vport created via external means such as nodedev-create.
      The code currently decides whether to delete the vHBA based solely on
      whether the parent was provided at creation time. However, that may not
      be the desired action, so rather than delete and force someone to create
      another vHBA via an additional nodedev-create allow the configuration of
      the storage pool to decide the desired action.
      
      During createVport when libvirt does the VPORT_CREATE, set the managed
      value to YES if not already set to indicate to the deleteVport code that
      it should delete the vHBA when the pool is destroyed.
      
      If libvirtd is restarted all the memory only state was lost, so for a
      persistent storage pool, use the virStoragePoolSaveConfig in order to
      write out the managed value.
      
      Because we're now saving the current configuration, we need to be sure
      to not save the parent in the output XML if it was undefined at start.
      Saving the name would cause future starts to always use the same parent
      which is not the expected result when not providing a parent. By not
      providing a parent, libvirt is expected to find the best available
      vHBA port for each subsequent (re)start.
      
      At deleteVport, use the new managed value to decide whether to execute
      the VPORT_DELETE.  Since we no longer save the parent in memory or in
      XML when provided, if it was not provided, then we have to look it up.
      5530f248
    • J
      storage: Introduce virStoragePoolSaveConfig · 523c6908
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1160926
      
      Introduce the ability to save a configuration of a persistent configuration
      that may be changed by storage pool backend activity, such as start or stop
      523c6908
    • J
      storage: Don't use a stack copy of the adapter · 5b226fcd
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1160926
      
      Passing a copy of the storage pool adapter to a function just changes the
      copy of the fields in the particular function and then when returning to
      the caller those changes are discarded.  While not yet biting us in the
      storage clean-up case, it did cause an issue for the fchost storage pool
      startup case, createVport.  The issue was at startup, if no parent is found
      in the XML, the code will search for the 'best available' parent and then
      store that in the in memory copy of the adapter.  Of course, in this case
      it was a copy, so when returning to the virStorageBackendSCSIStartPool that
      change was discarded (or lost) from the pool->def->source.adapter which
      meant at shutdown (deleteVport), the code assumed no adapter was passed
      and skipped the deletion, leaving the vHBA created by libvirt still defined
      requiring an additional stop of a nodedev-destroy to remove.
      
      Adjusted the createVport to take virStoragePoolDefPtr instead of the
      adapter copy. Then use the virStoragePoolSourceAdapterPtr when processing.
      A future patch will need the 'def' anyway, so this just sets up for that.
      5b226fcd
  8. 11 11月, 2014 1 次提交
  9. 10 11月, 2014 3 次提交
  10. 08 11月, 2014 1 次提交
    • M
      domain_conf: Use virDomainParseMemory more widely · 01b4de2b
      Michal Privoznik 提交于
      As reviewing patches upstream it occurred to me, that we have two
      functions doing nearly the same: virDomainParseMemory which
      expects XML in the following format:
      
        <memory unit='MiB'>1337</memory>
      
      The other function being virDomainHugepagesParseXML expecting the
      following format:
      
        <someElement size='1337' unit='MiB'/>
      
      It wouldn't matter to have two functions handle two different
      scenarios like this if we could only not copy code that handles
      32bit arches around. So this code merges the common parts into
      one by inventing new @units_xpath argument to
      virDomainParseMemory which allows overriding the default location
      of @unit attribute in XML. With this change both scenarios above
      can be parsed with virDomainParseMemory.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      01b4de2b
  11. 07 11月, 2014 2 次提交
  12. 06 11月, 2014 1 次提交
  13. 05 11月, 2014 1 次提交
  14. 04 11月, 2014 1 次提交
  15. 01 11月, 2014 3 次提交
    • J
      Relax duplicate SCSI host pool checking · 59389231
      Ján Tomko 提交于
      Since commit 3f99d64d no new scsi_host pools can be defined
      if one of the already defined scsi_host pools does not refer
      to an accessible scsi_host adapter.
      
      Relax the check by skipping over these inaccessible pools
      when checking for duplicates.
      59389231
    • J
      Match scsi_host pools by parent address first · 77911d30
      Ján Tomko 提交于
      If both source adapters are specified by a parent address,
      just comparing the address is faster and catches even addresses
      that do not refer to valid adapters.
      77911d30
    • E
      domain: fix parsing of memory tunables on 32-bit machines · 9998a657
      Eric Blake 提交于
      Commit 6c9a8a49 (Oct 2014) exposed a long-standing issue on 32-bit
      machines: code related to virDomainSetMemoryParameters has always
      been documented as using a 64-bit limit, but it was implemented by
      calling virDomainParseMemory which enforced an 'unsigned long'
      limit.  Since VIR_DOMAIN_MEMORY_PARAM_UNLIMITED capped to a
      long is -1, but virDomainParseScaledValue no longer accepts
      negative values, an attempt to use 2^53-1 as a hard memory limit
      started failing the testsuite.  However, the problem with capping
      things artificially low has existed for much longer - ever since
      commits 4888f0fb and 2e22f23b (Mar 2012) switched internal tracking
      from 'unsigned long' to 'unsigned long long' (prior to that time,
      the cap was a side-effect of the choice of types).  We _have_ to
      cap the balloon memory values, (no thanks to baked in 'unsigned long'
      of API such as virDomainSetMaxMemory or virDomainGetInfo with no
      counterpart API that guarantees 64-bit access to those numbers)
      but memory parameters have never needed the artificial limit.
      
      At any rate, the solution is to make the parser function gain a
      parameter, and only do the reduced 32-bit cap for the values that
      are constrained due to API.
      
      * src/conf/domain_conf.h (_virDomainMemtune): Add comments.
      * src/conf/domain_conf.c (virDomainParseMemory): Add parameter.
      (virDomainDefParseXML): Adjust callers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9998a657
  16. 30 10月, 2014 1 次提交
  17. 29 10月, 2014 2 次提交
    • E
      maint: avoid static zero init in helpers · ff99c791
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/conf/nwfilter_conf.c: Fix initialization.
      * src/cpu/cpu_x86.c: Likewise.
      * src/interface/interface_backend_netcf.c: Likewise.
      * src/locking/lock_daemon.c: Likewise.
      * src/locking/lock_driver_lockd.c: Likewise.
      * src/locking/lock_driver_sanlock.c: Likewise.
      * src/network/bridge_driver.c: Likewise.
      * src/node_device/node_device_udev.c: Likewise.
      * src/nwfilter/nwfilter_learnipaddr.c: Likewise.
      * src/rpc/virnetserver.c: Likewise.
      * src/security/security_selinux.c
      (virSecuritySELinuxGenSecurityLabel): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ff99c791
    • J
      storage_conf: Resolve libvirtd crash matching scsi_host · 3f99d64d
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1146837
      
      Resolve a crash in libvirtd resulting from commit id 'a4bd62ad' (1.0.6)
      which added parentaddr and unique_id to allow unique identification of
      a scsi_host, but assumed that all the pool entries and the incoming
      definition would be similarly defined. If the existing pool uses the
      'name' attribute and an incoming pool is using the parentaddr/unique_id,
      then the code will attempt to compare the existing name string against
      the incoming name string which doesn't exist (is NULL) and results in
      a core (STREQ).
      
      Conversely, if the existing pool used the parentaddr/unique_id and the
      to be defined pool used the name, then the comparison would be against
      the parentaddr, but since the incoming pool doesn't have one - that would
      leave the comparison against a parentaddr of all 0's and a unique_id of 0,
      which will always comparison to fail. This means someone could define the
      same source adapter for two pools
      
      In order to resolve this, adjust the code to get the 'host#' to be used
      by the storage scsi backend in order to check/start the pool and make sure
      the incoming definition doesn't match any of the existing pool defs.
      3f99d64d
  18. 25 10月, 2014 1 次提交
  19. 20 10月, 2014 1 次提交
  20. 15 10月, 2014 3 次提交