1. 01 3月, 2016 5 次提交
  2. 26 2月, 2016 2 次提交
    • J
      storage: Fix error path in virStoragePoolObjLoad · c53e4ae0
      John Ferlan 提交于
      While reviewing how storage driver used ObjListPtr's for reference
      in some recent secret driver patches to use the same mechanism, I came
      across an instance where the wrong API was called for error paths after
      successfully allocating the storage pool pointer and inserting into
      the driver pool list.
      
      The path is after virStoragePoolObjAssignDef succeeds - the 'def' passed
      in is assigned to pool->def (or newDef) so it shouldn't be the only thing
      deleted. The pool is now part of driver->pools.objs, so it would need to
      be removed (as happens in the storagePoolCreateXML error paths).
      
      Rather than calling virStoragePoolDefFree to free the def which is now
      assigned to the pool, call virStoragePoolObjRemove to ensure the pool
      element is removed from the driver list and that anything stored in pool
      is properly handled by virStoragePoolObjFree including the call to
      virStoragePoolDefFree for the pool->{def|newDef} element.
      c53e4ae0
    • J
      Revert "Error out on missing machine type in machine configs" · 5f265fa0
      Ján Tomko 提交于
      Revert commit 55e6d8cd.
      
      This fix for https://bugzilla.redhat.com/show_bug.cgi?id=1267256
      unconditionally required a machine type for all machine types
      even though qemu is the only emulator using them.
      
      Revert it to fix persistent configs for drivers with no machine type:
      https://www.redhat.com/archives/libvir-list/2016-February/msg01228.html
      5f265fa0
  3. 22 2月, 2016 2 次提交
  4. 19 2月, 2016 2 次提交
    • C
      domain: add implicit controllers from post parse · 4066c734
      Cole Robinson 提交于
      Seems like the natural fit, since we are already adding other XML bits
      in the PostParse routine.
      
      Previously AddImplicitControllers was only called at the end of XML
      parsing, meaning code that builds a DomainDef by hand had to manually
      call it. Now those PostParse callers get it for free.
      
      There's some test churn here; xen xm and sexpr test suite bits weren't
      calling this before, but now they are, so you'll see new IDE controllers.
      I don't think this will cause problems in practice, since the code already
      needs to handle these implicit controllers like in the case when a user
      defines their own XML.
      4066c734
    • J
      Check for active domain in virDomainObjWait · 5591ca50
      Jiri Denemark 提交于
      virDomainObjWait is designed to be called in a loop. Make sure we break
      the loop in case the domain dies to avoid waiting for an event which
      will never happen.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      5591ca50
  5. 18 2月, 2016 1 次提交
  6. 17 2月, 2016 2 次提交
    • E
      util: Add a return value to void hash iterators · cc48d3a1
      Erik Skultety 提交于
      Our existing virHashForEach method iterates through all items disregarding the
      fact, that some of the iterators might have actually failed. Errors are usually
      dispatched through an error element in opaque data which then causes the
      original caller of virHashForEach to return -1. In that case, virHashForEach
      could return as soon as one of the iterators fail. This patch changes the
      iterator return type and adjusts all of its instances accordingly, so the
      actual refactor of virHashForEach method can be dealt with later.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      cc48d3a1
    • A
      conf: Use a temporary int variable to store GIC version · cda1cc17
      Andrea Bolognani 提交于
      Since no value in the virGICVersion enumeration is negative, a clever
      enough compiler can report an error such as
      
        src/conf/domain_conf.c:15337:75: error: comparison of unsigned enum
        expression < 0 is always false [-Werror,-Wtautological-compare]
          if ((def->gic_version = virGICVersionTypeFromString(tmp)) < 0 ||
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      
      virGICVersionTypeFromString() can, however, return a negative value if
      the input string is not part of the enumeration, so we definitely need
      that check.
      
      Work around the problem by storing the return value in a temporary int
      variable.
      cda1cc17
  7. 16 2月, 2016 1 次提交
  8. 11 2月, 2016 4 次提交
  9. 10 2月, 2016 1 次提交
  10. 08 2月, 2016 9 次提交
  11. 05 2月, 2016 4 次提交
  12. 04 2月, 2016 4 次提交
    • J
      conf: add caps to virDomainSaveConfig · cd57b7c7
      Joao Martins 提交于
      virDomainSaveConfig calls virDomainDefFormat which was setting the caps
      to NULL, thus keeping the old behaviour (i.e. not looking at
      netprefix). This patch adds the virCapsPtr to the function and allows
      the configuration to be saved and skipping interface names that were
      registered with virCapabilitiesSetNetPrefix().
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      cd57b7c7
    • J
      conf: add caps to virDomainDefFormat* · d239a542
      Joao Martins 提交于
      And use the newly added caps->host.netprefix (if it exists) for
      interface names that match the autogenerated target names.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      d239a542
    • J
      conf: add prefix in virDomainNetDefParseXML · 481e9bd0
      Joao Martins 提交于
      And use the newly added caps->host.netprefix for free interface
      names that match the autogenerated target names.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      481e9bd0
    • J
      conf: add net device prefix to capabilities · 819d1d94
      Joao Martins 提交于
      In the reverted commit d2e5538b, the libxl driver was changed to copy
      interface names autogenerated by libxl to the corresponding network def
      in the domain's virDomainDef object. The copied name is freed when the
      domain transitions to the shutoff state. But when migrating a domain,
      the autogenerated name is included in the XML sent to the destination
      host.  It is possible an interface with the same name already exists on
      the destination host, causing migration to fail.
      
      This patch defines a new capability for setting the network device
      prefix that will be used in the driver. Valid prefixes are
      VIR_NET_GENERATED_PREFIX or the one announced by the driver.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      819d1d94
  13. 03 2月, 2016 3 次提交