1. 18 3月, 2014 17 次提交
  2. 17 3月, 2014 3 次提交
    • D
      Fix mistakes in checking return values · cb873e9d
      Daniel P. Berrange 提交于
      Thre was a syntax error in checking virRegisterStateDriver in
      the remote driver, and bogus checking of a void return type
      of virDomainConfNWFilterRegister in nwfilter.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cb873e9d
    • M
      spec: move some dirs into appropriate subpackages · 9add02a0
      Michael Chapman 提交于
      This commit moves a few directories into more appropriate subpackages.
      In a few cases a directory is owned by two subpackages, however this is
      OK as long as the permissions and ownership for the directory are
      consistent between them.
      
      - %{_sysconfdir}/libvirt/qemu/
      
        Used by the qemu and network drivers.
      
        When building with separate driver modules, this directory is only
        owned by l-d-d-network. l-d-d-qemu has a hard dependency on
        l-d-d-network, which means this directory is created with the
        correct permissions and ownership, however it's clearer if both
        subpackages own the directory independently.
      
      - %{_sysconfdir}/libvirt/nwfilter/
      
        Used by the nwfilter driver only.
      
        This directory is currently always owned by libvirt-daemon. This
        commit moves it into l-d-d-nwfilter when building with separate
        driver modules.
      
      - %{_localstatedir}/run/libvirt/network/
      
        Used by the network and nwfilter drivers.
      
        When building without separate driver modules, this directory is
        should be owned by libvirt-daemon only if either of these drivers
        are enabled. When building with separate driver modules, this
        directory should be owned by l-d-d-nwfilter in addition to
        l-d-d-network.
      
      - %{_datadir}/libvirt/networks/ and
        %{_datadir}/libvirt/networks/default.xml
      
        Used only by the %post scriptlet in libvirt-daemon-config-network.
      Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
      9add02a0
    • P
      Fix issue found by coverity and cleanup · b396fae9
      Pavel Hrdina 提交于
      Coverity found an issue in lxc_driver and uml_driver that we don't
      check the return value of register functions.
      
      I've also updated all other places and unify the way we check the
      return value.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b396fae9
  3. 15 3月, 2014 3 次提交
    • C
      XMLToNative: Parse XML as INACTIVE · fbf14e82
      Cole Robinson 提交于
      Right now we are parsing the XML as though it's live, which for example
      will choke on hardcoded XML like:
      
        <seclabel type='dynamic' model='selinux' relabel='yes'/>
      
      Erroring with:
      
        $ sudo virsh domxml-to-native qemu-argv f
        error: XML error: security label is missing
      
      All drivers are fixed, but only qemu was tested.
      fbf14e82
    • C
      qemu: XMLToNative: Don't open vhostfd · 3b79321a
      Cole Robinson 提交于
      Just skip the vhost command line generation, since this won't work if
      attempting to run manually.
      3b79321a
    • C
      qemu: XMLToNative: Don't show -S · e8400564
      Cole Robinson 提交于
      -S causes qemu to start in the paused state. Since XML2Native is intended
      to generate something that users can run directly, this will trip them up.
      e8400564
  4. 14 3月, 2014 17 次提交
    • R
      qemu: cleanup tap devices on FreeBSD · 075650ff
      Roman Bogorodskiy 提交于
      We have to explicitly destroy TAP devices on FreeBSD because
      they're not freed after being closed, otherwise we end up with
      orphaned TAP devices after destroying a domain.
      075650ff
    • R
      Fix build with qemu driver disabled · d148a3e7
      Roman Bogorodskiy 提交于
      Do not include test_libvirt_lockd.aug when configured without qemu
      driver.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1071777
      d148a3e7
    • J
      openvzRegister: Check for error return · 759ca319
      John Ferlan 提交于
      A recent change to openvz_driver.c caused Coverity to make additional
      comparisons and find that the openvzRegister() was not checking the
      status of virRegisterDriver() call like other callers and thus generated
      a CHECKED_RETURN condition
      759ca319
    • L
      build: detect/prohibit hardcoded XML indent in syntax-check · c8d6cd85
      Laine Stump 提交于
      This rule wouldn't be able to find any case of a hardcoded indent that
      was in the middle of a string, but then virBuffer doesn't add
      indentation in the middle of a string either.
      c8d6cd85
    • L
      conf: eliminate hardcoded indentation in all remaining xml · 68d63c6b
      Laine Stump 提交于
      These last files had such a small change count I just put them into a
      single patch.
      68d63c6b
    • L
      0224039c
    • L
      util: eliminate hardcoded indent in virConnectSysInfo formatting · 3f05dc6d
      Laine Stump 提交于
      This same set of functions is used by the qemu, xen, and lxc drivers'
      connectSysInfo function.
      3f05dc6d
    • L
      qemu: eliminate hardcoded indent from migration cookie xml · acca9134
      Laine Stump 提交于
      This is also never seen by a human.
      acca9134
    • L
      virsh: eliminate hardcoded indentation in xml generated for commands · 64bb9024
      Laine Stump 提交于
      These are never seen externally, only passed into libvirt APIs, so in
      practice this makes no real difference, but it's good to be
      consistent.
      64bb9024
    • L
      conf: eliminate hardcoded indent in volume/pool xml · 5f845437
      Laine Stump 提交于
      Again completely mechanical, but a lot of lines.
      5f845437
    • L
      conf: eliminate hardcoded indentation in node device xml · f728155f
      Laine Stump 提交于
      Completely mechanical changes, but there were a lot of lines so I made
      it a separate patch.
      f728155f
    • L
      conf: eliminate hardcoded indentation in capabilities xml · 75f0b66c
      Laine Stump 提交于
      There were a lot of changes here, but all very mechanical. For some
      reason, the virBufferPtr had been named "xml" instead of "buf" in this
      file, so since the indentation changing touched almost every line
      using the buffer, I took this chance to change its name for "buf" for
      consistency with every other file.
      75f0b66c
    • L
      conf: eliminate hardcoded indentation in nwfilter xml · d3679928
      Laine Stump 提交于
      This file was using multiple virBuffers, inserting the contents of
      buf3 into buf2, then inserting the contents of buf2 into buf1, rather
      than the more conventional method of just passing around a single
      virBufferPtr and streaming everything into that single buffer. This
      was unnecessary, and also made it more difficult to make indentation
      relative, because when you insert a string into a buffer, the
      indentation of the buffer is only applied once at the beginning of the
      string, *not* each time a newline is encountered in the string.
      d3679928
    • L
      conf: eliminate outmoded/odd indent method from interface xml · 257e62df
      Laine Stump 提交于
      These format functions needed the ability to be indented by an
      arbitrary amount, but were written before the introduction of
      virBufferAdjustIndent(). They instead used the much more clunky method
      of adding a "level" arg to every format function, and padding with
      spaces using the "%*s" printf format specifier (giving it the level,
      and "", which has the effect of adding level spaces to the output).
      
      While eliminating the hardcoded indentation in other xml, I decided it
      was finally time to also modernize the interface formatter code to
      make it more consistent.
      257e62df
    • L
      conf: eliminate hardcoded indent from network xml · b1258b27
      Laine Stump 提交于
      This was very simple, since the only place that had hardcoded
      indentation was a few items in the network status xml.
      b1258b27
    • L
      conf: eliminate hardcoded indent from domain snapshot xml · b9e9b76e
      Laine Stump 提交于
      All leading spaces in domain snapshot xml format functions have been
      replaced with appropriate calls to virBufferAdjustIndent(). This will
      make it easier to call other similarly fixed format functions
      (e.g. domain device format functions).
      b9e9b76e
    • L
      conf: eliminate hardcoded indent from domain xml · ca6dc7b5
      Laine Stump 提交于
      Many of the domain xml format functions (including all of the device
      format functions) had hard-coded spaces, which made for incorrect
      indentation when those functions were called in a different context
      (for example, commit 2122cf39 added <interface> XML into the document
      provided to a network hook script, and in this case it should have
      been indented by 2 spaces, but was instead indented by 6 spaces).
      
      To make it possible to insert a properly indented device anywhere into
      an XML document, this patch removes hardcoded spaces from the
      formatting functions, and calls virBufferAdjustIndent() at appropriate
      places instead. (a regex search of domain_conf.c was done to assure
      that all occurrences of hardcoded spaces were removed).
      
      virDomainDiskSourceDefFormatInternal() is also called from
      snapshot_conf.c, so two virBufferAdjustIndent() calls were temporarily
      added around that call - those functions will have hardcoded spaces
      removed in a separate patch.
      
      This could cause some conflicts when backporting future changes to the
      formatting functions to older branches, but fortunately the changes
      are almost all trivial, so conflict resolution will be obvious.
      ca6dc7b5