1. 20 7月, 2015 1 次提交
    • M
      qemu: Reject updating unsupported disk information · 717c99f3
      Martin Kletzander 提交于
      If one calls update-device with information that is not updatable,
      libvirt reports success even though no data were updated.  The example
      used in the bug linked below uses updating device with <boot order='2'/>
      which, in my opinion, is a valid thing to request from user's
      perspective.  Mainly since we properly error out if user wants to update
      such data on a network device for example.
      
      And since there are many things that might happen (update-device on disk
      basically knows just how to change removable media), check for what's
      changing and moreover, since the function might be usable in other
      drivers (updating only disk path is a valid possibility) let's abstract
      it for any two disks.
      
      We can't possibly check for everything since for many fields our code
      does not properly differentiate between default and unspecified values.
      Even though this could be changed, I don't feel like it's worth the
      complexity so it's not the aim of this patch.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1007228
      717c99f3
  2. 10 7月, 2015 3 次提交
  3. 09 7月, 2015 1 次提交
  4. 08 7月, 2015 1 次提交
  5. 01 7月, 2015 1 次提交
    • P
      conf: qemu: Taint VMs using custom device tree blob · 4b48ba4a
      Peter Krempa 提交于
      Using a custom device tree image may cause unexpected behavior in
      architectures that use this approach to detect platform devices. Since
      usually the device tree is generated by qemu and thus it's not normally
      used let's taint VMs using it to make it obvious as a possible source of
      problems.
      4b48ba4a
  6. 30 6月, 2015 1 次提交
    • J
      conf: Validate disk lun using correct types · c79ebf53
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1201143
      
      The formatdomain.html description for <disk> device 'lun' indicates that
      it must be either a type 'block' or type 'network' with protocol 'iscsi';
      however, we did not make that check until domain startup.
      
      This caused issues for virt-manager which had an unexpected failure at
      run time rather config time.
      
      This patch adds a check in post part disk device checking for the specific
      and supported lun types as well as adjusting the test failure to be for
      parse config rather than run time.
      c79ebf53
  7. 26 6月, 2015 1 次提交
  8. 24 6月, 2015 5 次提交
  9. 23 6月, 2015 3 次提交
  10. 19 6月, 2015 2 次提交
  11. 18 6月, 2015 5 次提交
  12. 15 6月, 2015 1 次提交
    • J
      storage: Need to set secrettype for direct iscsi disk volume · 1feaccf0
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1200206
      
      Commit id '1b4eaa61' added the ability to have a mode='direct' for
      an iscsi disk volume.  It relied on virStorageTranslateDiskSourcePool
      in order to copy any disk source pool authentication information to
      the direct disk volume, but it neglected to also copy the 'secrettype'
      field which ends up being used in the domain volume formatting code.
      Adding a secrettype for this case will allow for proper formatting later
      and allow disk snapshotting to work properly
      
      Additionally libvirtd restart processing would fail to find the domain
      since the translation processing code is run after domain xml processing,
      so handle the the case where the authdef could have an empty secrettype
      field when processing the auth and additionally ignore performing the
      actual and expected auth secret type checks for a DISK_VOLUME since that
      data will be reassembled later during translation processing of the
      running domain.
      1feaccf0
  13. 12 6月, 2015 3 次提交
    • M
      virsysinfo: s/system/sysdef/ · c1dff918
      Michal Privoznik 提交于
      A variable can't be named system, obviously. Well, it can if the
      compiler is new enough to distinguish a variable named system and a
      function call system(). And some older systems, don't have wise
      compiler.
      
        CC     util/libvirt_util_la-virsysinfo.lo
      cc1: warnings being treated as errors
      ../../src/util/virsysinfo.c: In function 'virSysinfoParseSystem':
      ../../src/util/virsysinfo.c:649: error: declaration of 'system' shadows a global declaration [-Wshadow]
      /usr/include/stdlib.h:717: error: shadowed declaration is here [-Wshadow]
      make[3]: *** [util/libvirt_util_la-virsysinfo.lo] Error 1
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c1dff918
    • M
      virSysinfoDef: Exempt SYSTEM variables · 0b92974c
      Michal Privoznik 提交于
      Move all the system_* fields into a separate struct. Not only this
      simplifies the code a bit it also helps us to identify whether BIOS
      info is present. We don't have to check all the four variables for
      being not-NULL, but we can just check the pointer to the struct.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0b92974c
    • M
      virSysinfoDef: Exempt BIOS variables · 3f9cae18
      Michal Privoznik 提交于
      Move all the bios_* fields into a separate struct. Not only this
      simplifies the code a bit it also helps us to identify whether BIOS
      info is present. We don't have to check all the four variables for
      being not-NULL, but we can just check the pointer to the struct.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3f9cae18
  14. 11 6月, 2015 1 次提交
  15. 04 6月, 2015 4 次提交
    • P
      conf: Fix mistakes in pointer usage in virDomainObjGetDefs · f9ab9eff
      Peter Krempa 提交于
      Coverity rightfully determined that in commit 3d021381
      I made a mistake in the first check if @persDef is not NULL is
      dereferencing it rather than checking.
      
      Additionally if the vm is online the code would set @liveDef twice
      rather than modifying @persDef. Fix both mistakes.
      f9ab9eff
    • P
      conf: Add new helpers to resolve virDomainModificationImpact to domain defs · 3d021381
      Peter Krempa 提交于
      virDomainLiveConfigHelperMethod that is used for this job now does
      modify the flags but still requires the callers to extract the correct
      definition objects.
      
      In addition coverity and other static analyzers are usually unhappy as
      they don't grasp the fact that @flags are upadted according to the
      correct def to be present.
      
      To work this issue around and simplify the calling chain let's add a new
      helper that will work only on drivers that always copy the persistent
      def to a transient at start of a vm. This will allow to drop a few
      arguments. The new function syntax will also fill two definition
      pointers rather than modifying the @flags parameter.
      3d021381
    • P
      conf: Store cpu count as unsigned int · fbbea798
      Peter Krempa 提交于
      While we probably won't see machines with more than 65536 cpus for a
      while lets store the cpu count as an integer so that we can avoid quite
      a lot of overflow checks in our code.
      fbbea798
    • J
      Always add 'console' matching the 'serial' device · 8728a78e
      Ján Tomko 提交于
      We have been formatting the first serial device also
      as a console device, but only if there were no other consoles.
      
      If there is a <serial> device present in the XML, but no serial
      <console>, or if there isn't any <console> at all but the domain
      definition hasn't gone through a parse->format->parse round-trip,
      the <console> device would not be formatted.
      
      Change the code to always add the stub device for the first
      serial device.
      
      Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1089914
      8728a78e
  16. 03 6月, 2015 3 次提交
  17. 27 5月, 2015 1 次提交
  18. 26 5月, 2015 1 次提交
    • J
      conf: Resolve Coverity NEGATIVE_RETURNS · c214f56a
      John Ferlan 提交于
      Commit id '73eda710' added virDomainKeyWrapDefParseXML which uses
      virXPathNodeSet, but does not handle a -1 return thus causing a possible
      loop condition exit problem later when the return value is used.
      
      Change the logic to return the value from virXPathNodeSet if <= 0
      c214f56a
  19. 24 5月, 2015 1 次提交
  20. 21 5月, 2015 1 次提交