1. 15 12月, 2009 4 次提交
    • J
      qemu_driver.c: avoid double free on error path · dd160450
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemudDomainMigrateFinish2): Set
      "event" to NULL after qemuDomainEventQueue frees it, so a
      subsequent free (after endjob label) upon qemuMonitorStartCPUs
      failure does not cause a double free.
      dd160450
    • J
      libvirtd: avoid a NULL dereference on error path · 63a499d3
      Jim Meyering 提交于
      * daemon/libvirtd.c (qemudDispatchServer): Since "client" may be
      NULL in the "cleanup:" block, free client->rx only when it's not.
      63a499d3
    • M
      Fix and improve domain xml video element description · 52a18abd
      Matthias Bolte 提交于
      The description mismatched the actual structure since the video element
      was introduced. The nvram attribute is actually called vram. Specify the
      unit of the vram attribute.
      52a18abd
    • M
      Fix install location for Python bindings · d0857c01
      Matthias Bolte 提交于
      Commit 66137344 changed the Python detection
      mechanism in configure to use AM_PATH_PYTHON. This results in a changed
      install location for the Python bindings, at least on Fedora 12 64bit systems.
      
      Before this commit libvirt.py and libvirtmod.so were installed to
      
        /usr/lib64/python2.6/site-packages
      
      After this commit they are installed to
      
        /usr/lib/python2.6/site-packages
      
      Mixed Python packages (containing *.py and *.so files) should be installed to
      the pyexecdir directory detected by AM_PATH_PYTHON.
      
      This restores the install location from before the AM_PATH_PYTHON commit.
      
      * configure.in: remove unnecessary pythondir export
      * python/Makefile.am: switch from pythondir to pyexecdir
      d0857c01
  2. 14 12月, 2009 21 次提交
    • D
      Relax the allowed values for machine type in schema · 803d3204
      Daniel Veillard 提交于
      * docs/schemas/domain.rng: don't try to validate based on a list, open
        up the machine type to a regexp allowing a-z A-Z 0-9 _ - and .
      803d3204
    • J
      virsh: avoid double-free · 21a2eba4
      Jim Meyering 提交于
      * tools/virsh.c (vshCommandParse): Avoid double-free of "tkdata".
      Set it to NULL immediately after free in the (cmd == NULL) case,
      just as in the other case, in case the final free(tkdata) is
      triggered by a syntax error.
      21a2eba4
    • J
      node_device_driver.c: don't write beyond EOB for 4K-byte symlink · b1483189
      Jim Meyering 提交于
      * src/node_device/node_device_driver.c (update_driver_name): The
      previous code would write one byte beyond the end of the 4KiB
      stack buffer when presented with a symlink value of exactly that
      length (very unlikely).  Remove the automatic buffer and use
      virFileResolveLink in place of readlink.  Suggested by Daniel Veillard.
      b1483189
    • M
      Fix owner and group in example volume XML · 042956d5
      Matthew Booth 提交于
      The owner and group in the documentation examples were confusingly given as
      '0744'. They should be numeric uid and gid. Changed the examples to use the
      default uid and gid assigned to qemu in F12.
      
      * docs/formatstorage.html.in: Change example owner and group in volume XML
      042956d5
    • D
      add missing doc for device <shareable/> option · 2aec15bc
      Daniel Veillard 提交于
      2aec15bc
    • L
      Eliminate failure to delete empty storage pools · 22f3ec27
      Laine Stump 提交于
      * src/storage/storage_backend_fs.c: virStorageBackendFileSystemDelete
        was incorrectly calling unlink() in an attempt to remove a directory.
        It should be calling rmdir() instead.
      22f3ec27
    • J
      Fix use of virEventAddHandleImpl() · a645c8f0
      Jiri Denemark 提交于
      src/node_device/node_device_udev.c was using a function available only
      on the daemon code, fix this and use the function available globally
      
      * src/node_device/node_device_udev.c: replace use of virEventAddHandleImpl
        by virEventAddHandle
      a645c8f0
    • M
      Cleanup temporary #define after use · 057ad3a2
      Matthew Booth 提交于
      * src/qemu/qemu_driver.c: #undef LOOKUP_PTYS after use in
        qemudFindCharDevicePTYsMonitor()
      057ad3a2
    • D
      Implement --pool option for virsh vol-path · 94d599ec
      Dave Allan 提交于
      This patch fixes the problem reported in:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=509306
      
      The bug reporter says that vol-delete does not support the --pool
      option, but that's not the case in the current head.  This patch makes
      vol-path behave the same way as vol-delete
      
      * tools/virsh.c: Modified vol-path to use the same logic as vol-delete,
        allowing the syntax: virsh vol-path --pool testdirpool testvol0
      94d599ec
    • C
      nodedev: Add removable storage 'media_label' prop · deae2bb5
      Cole Robinson 提交于
      Provides the CDROM label for current media. Only implemented for the
      udev backend.
      deae2bb5
    • D
      expose SR IOV physical/virtual function relationships · a010165d
      Dave Allan 提交于
      exposes the relationships between physical
      and virtual functions on SR IOV capable devices.
      a010165d
    • P
      Fix possible NULL pointer dereference · 921d2225
      Paolo Bonzini 提交于
      If there are no references remaining to the object, vm is set to NULL
      and vm->persistent cannot be accessed.  Fixed by this trivial patch.
      
      * src/qemu/qemu_driver.c (qemudDomainCoreDump): Avoid possible
        NULL pointer dereference on --crash dump.
      921d2225
    • J
      add AppArmor test and examples to dist · ad905a19
      Jamie Strandboge 提交于
      tests/virt-aa-helper-test and examples/apparmor are not included in
      official tarballs, but should be. Attached is a patch to fix that
      which works when apparmor is and is not available.
      ad905a19
    • P
      add --live support to "virsh dump" · 1fb7af40
      Paolo Bonzini 提交于
      This is trivial for QEMU since you just have to not stop the vm before
      starting the dump.  And for Xen, you just pass the flag down to xend.
      
      * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): Add VIR_DUMP_LIVE.
      * src/qemu/qemu_driver.c (qemudDomainCoreDump): Support live dumping.
      * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support live dumping.
      * tools/virsh.c (opts_dump): Add --live. (cmdDump): Map it to VIR_DUMP_LIVE.
      1fb7af40
    • P
      add --crash support to "virsh dump" · b927aed8
      Paolo Bonzini 提交于
      This patch adds the --crash option (already present in "xm dump-core")
      to "virsh dump".  virDomainCoreDump already has a flags argument, so
      the API/ABI is untouched.
      
      * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): New flag for
        CoreDump
      * src/test/test_driver.c (testDomainCoreDump): Do not crash
        after dump unless VIR_DUMP_CRASH is given.
      * src/qemu/qemu_driver.c (qemudDomainCoreDump): Shutdown the domain
        instead of restarting it if --crash is passed.
      * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support --crash.
      * tools/virsh.c (opts_dump): Add --crash.
        (cmdDump): Map it to flags for virDomainCoreDump and pass them.
      b927aed8
    • P
      fix various breakages in qemu Dump command · f509e162
      Paolo Bonzini 提交于
      1) qemuMigrateToCommand uses ">>" so we have to truncate the file
      before starting the migration;
      
      2) the command wasn't updated to chown the driver and set/restore
      the security lavels;
      
      3) the VM does not have to be resumed if migration fails;
      
      4) the file is not removed when migration fails.
      
      * src/qemu/qemu_driver.c (qemuDomainCoreDump): Truncate file before
        dumping, set/restore ownership and security labels for the file.
      f509e162
    • D
      Fix a couple of problems in last patch · a7d1eb3c
      Daniel Veillard 提交于
      Those were pointed by DanB in his review but not yet fixed
      
      * src/qemu/qemu_driver.c: qemudWaitForMonitor() use EnterMonitorWithDriver()
        and ExitMonitorWithDriver() there
      * src/qemu/qemu_monitor_text.c: checking fro strdu failure and hash
        table add error in qemuMonitorTextGetPtyPaths()
      a7d1eb3c
    • M
      Get QEMU pty paths from the monitor · 60e8977f
      Matthew Booth 提交于
      This change makes the QEMU driver get pty paths from the output of the
      monitor 'info chardev' command. This output is structured, and contains
      both the name of the device and the path on the same line. This is
      considerably more reliable than parsing the startup log output, which
      requires the parsing code to know which order QEMU will print pty
      information in.
      
      Note that we still need to parse the log output as the monitor itself
      may be on a pty. This should be rare, however, and the new code will
      replace all pty paths parsed by the log output method once the monitor
      is available.
      
      * src/qemu/qemu_monitor.(c|h) src/qemu_monitor_text.(c|h): Implement
        qemuMonitorGetPtyPaths().
      * src/qemu/qemu_driver.c: Get pty path information using
        qemuMonitorGetPtyPaths().
      60e8977f
    • M
      Extract the assigned pty device for QEmu channels · 033eef43
      Matthew Booth 提交于
      * src/qemu/qemu_driver.c: Parse pty devices for channels
      033eef43
    • M
      Make QEMU driver use -chardev everywhere if available · a8eb010e
      Matthew Booth 提交于
      Change -monitor, -serial and -parallel output to use -chardev if it is
      available.
      * src/qemu/qemu_conf.c: Update qemudBuildCommandLine to use -chardev where
        available.
      * tests/qemuxml2argvtest.c tests/qemuxml2argvdata/: Add -chardev equivalents
        for all current serial and parallel tests.
      a8eb010e
    • R
      Suppress cgroup error message on sucess startup · 2597f8ec
      Ryota Ozaki 提交于
      Even if qemudStartVMDaemon suceeds, an error was logged such as
      'qemuRemoveCgroup:1778 : internal error Unable to find cgroup for'.
      This is because qemudStartVMDaemon calls qemuRemoveCgroup to
      ensure that old cgroup does not remain. This workaround makes
      sense but leaving an error message may confuse users.
      * src/qemu/qemu_driver.c: a an option to the function to suppress the
        error being logged
      2597f8ec
  3. 11 12月, 2009 9 次提交
  4. 10 12月, 2009 5 次提交
    • M
      remove iptablesReloadRules() and related code · 4ecf9c65
      Mark McLoughlin 提交于
      We don't use this method of reloading rules anymore, so we can just
      kill the code.
      
      This simplifies things a lot because we no longer need to keep a
      table of the rules we've added.
      
      * src/util/iptables.c: kill iptablesReloadRules()
      4ecf9c65
    • M
      remove all traces of lokkit support · 3b3305d8
      Mark McLoughlin 提交于
      Long ago we tried to use Fedora's lokkit utility in order to register
      our iptables rules so that 'service iptables restart' would
      automatically load our rules.
      
      There was one fatal flaw - if the user had configured iptables without
      lokkit, then we would clobber that configuration by running lokkit.
      
      We quickly disabled lokkit support, but never removed it. Let's do
      that now.
      
      The 'my virtual network stops working when I restart iptables' still
      remains. For all the background on this saga, see:
      
        https://bugzilla.redhat.com/227011
      
      * src/util/iptables.c: remove lokkit support
      
      * configure.in: remove --enable-lokkit
      
      * libvirt.spec.in: remove the dirs used only for saving rules for lokkit
      
      * src/Makefile.am: ditto
      
      * src/libvirt_private.syms, src/network/bridge_driver.c,
        src/util/iptables.h: remove references to iptablesSaveRules
      3b3305d8
    • M
      reload iptables rules on libvirtd restart · 534664c3
      Mark McLoughlin 提交于
      This is the expected behaviour, I think - reloading libvirtd should
      be a subset of restarting it.
      
      Note, we reload the rules after we've determined which networks
      are active (because we only add the rules for active networks)
      and before we start autostart networks (to avoid re-adding the
      rules).
      
      * src/network/bridge_driver.c: reload iptables rules on startup
      534664c3
    • M
      reload iptables rules simply by re-adding them · 98895e93
      Mark McLoughlin 提交于
      Currently, when we add iptables rules, we keep them on a list so that
      we can easily reload them on e.g. 'service libvirtd reload'.
      
      However, we don't save this list to disk, so if libvirtd is restarted
      we lose the ability to reload the rules.
      
      The fix is simple - just re-add the damn things on reload.
      
      Note, we delete the rules before re-adding them, just like the current
      behaviour of iptRulesReload().
      
      * src/network/bridge_driver.c: re-add the iptables rules on reload.
      98895e93
    • M
      Add virBufferFreeAndReset() and replace free() · 1b9d0744
      Matthias Bolte 提交于
      Replace free(virBufferContentAndReset()) with virBufferFreeAndReset().
      Update documentation and replace all remaining calls to free() with
      calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset()
      and virReportOOMError() in OOM error cases.
      1b9d0744
  5. 09 12月, 2009 1 次提交
    • J
      Plumb domain description tag in xend backend · 723bfda1
      Jim Fehlig 提交于
      xen-unstable changesets 20321 and 20521 added support for
      description in xend domain config.  This patch extends that
      support in xend backend.
      * src/xen/xend_internal.c: add parse and output of domain description
      723bfda1