1. 15 3月, 2010 2 次提交
  2. 13 3月, 2010 3 次提交
  3. 12 3月, 2010 8 次提交
    • C
      Make nodeGetInfo report the correct number of NUMA nodes. · 83988bd4
      Chris Lalancette 提交于
      The nodeGetInfo code was always assuming that machine had a
      single NUMA node, which is not correct.  The good news is that
      libnuma gives us this information pretty easily, so let's
      properly report it.
      
      NOTE: With recent hardware starting to support CPU hot-add
      and hot-remove, both this code and the nodeCapsInitNUMA()
      code are quickly going to become obsolete.  We'll have to
      think of a more dynamic solution for dealing with NUMA
      nodes and CPUs that can come and go at will.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      83988bd4
    • C
      Fix crash in virsh after bogus command · 3ebbc241
      Chris Lalancette 提交于
      If you ran virsh in interactive mode and ran a command
      that virsh could not parse, it would then SEGV
      on subsequent commands.  The problem is that we are
      freeing the vshCmd structure in the syntaxError label
      at the end of vshCommandParse, but forgetting to
      set ctl->cmd to NULL.  This means that on the next command,
      we would try to free the same structure again, leading
      to badness.
      
      * tools/virsh.c: Make sure to set ctl->cmd to NULL after
        freeing it in vshCommandParse()
      3ebbc241
    • C
      Fix virsh command 'cd' · be2a53e6
      Chris Lalancette 提交于
      * tools/virsh.c: cmdCd was returning a 0 on success and -1 on error,
        when the rest of the code expected a TRUE on success and a
        FALSE on error.
      be2a53e6
    • L
      Fix compiler warnings in virsh.c · 7fbc2e37
      Laine Stump 提交于
      No functional change. These all generated compiler warnings which, for
      some reason weren't converted to errors by
      --enable-compiler-warnings=error.
      
      * tools/virsh.c:
        - change return type from int to void on two functions that don't
          return a value.
        - remove unused variables/labels from two functions
        - eliminate non-literal format strings
        - typecast char* into xmlChar* when calling
        - xmlParseBalancedChunkMemory
      7fbc2e37
    • L
      Silence compiler complaints about non-literal format strings · ca842a6b
      Laine Stump 提交于
      * src/util/macvtap.c: replace _("....") with "%s", _("...") in two places
      ca842a6b
    • D
      Update commiters list · f60e0150
      Daniel Veillard 提交于
      f60e0150
    • C
      Fix hang in qemudDomainCoreDump. · d376b7d6
      Chris Lalancette 提交于
      Currently if you dump the core of a qemu guest with
      qemudDomainCoreDump, subsequent commands will hang
      up libvirtd.  This is because qemudDomainCoreDump
      uses qemuDomainWaitForMigrationComplete, which expects
      the qemuDriverLock to be held when it's called.  This
      patch does the simple thing and moves the qemuDriveUnlock
      to the end of the qemudDomainCoreDump so that the driver
      lock is held for the entirety of the call (as it is done
      in qemudDomainSave).  We will probably want to make the
      lock more fine-grained than that in the future, but
      we can fix both qemudDomainCoreDump and qemudDomainSave
      at the same time.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      d376b7d6
    • C
      Make sure qemudDomainSetVcpus doesn't hang. · 2c555d87
      Chris Lalancette 提交于
      The code to add job support into libvirtd caused a problem
      in qemudDomainSetVcpus.  In particular, a qemuDomainObjEndJob()
      call was added at the end of the function, but a
      corresponding qemuDomainObjBeginJob() was not.  Additionally,
      a call to qemuDomainObj{Enter,Exit}Monitor() was also missed
      in qemudDomainHotplugVcpus().  These missing calls conspired to
      cause a hang in the libvirtd process after the command was
      finished.  Fix this by adding the missing calls.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      2c555d87
  4. 11 3月, 2010 8 次提交
    • C
      Remove qemudDomainSetMaxMemory. · 8a7f4b8d
      Chris Lalancette 提交于
      As previously discussed[1], this patch removes the
      qemudDomainSetMaxMemory() function, since it doesn't
      work.  This means that instead of getting somewhat
      cryptic errors, you will now get:
      
      error: Unable to change MaxMemorySize
      error: this function is not supported by the hypervisor: virDomainSetMaxMemory
      
      Which describes the situation perfectly.
      
      [1] https://www.redhat.com/archives/libvir-list/2010-February/msg00928.htmlSigned-off-by: NChris Lalancette <clalance@redhat.com>
      8a7f4b8d
    • C
      Fix a JSON CPU information bug. · ed3d86c9
      Chris Lalancette 提交于
      When using the JSON monitor, qemuMonitorJSONExtractCPUInfo
      was returning 0 on success.  Unfortunately, higher levels of
      the cpuinfo code expect that it returns the number of CPUs
      it found on success.  This one-line patch fixes it so that
      it returns the correct number.  This makes "virsh vcpuinfo <domain>"
      work when using the JSON monitor.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      ed3d86c9
    • E
      Allow devices without a parent · e29439bd
      Ed Swierk 提交于
      * Allow devices without parent links to be created and set their parent to the root "computer" node
      e29439bd
    • E
      build: change to gnulib module list should rerun bootstrap · 3b04f3bb
      Eric Blake 提交于
      * autogen.sh (curr_status): Also include hash of bootstrap.conf
      when checking for changes that require bootstrap rerun.
      * cfg.mk (_update_required): Likewise.
      3b04f3bb
    • E
      build: enforce preprocessor indentation · 89a08ba6
      Eric Blake 提交于
      Since cppi is not part of Fedora Core 12, the check is conditional:
      without cppi, running 'make syntax-check' merely warns:
      
      $ make sc_preprocessor_indentation
      preprocessor_indentation
      maint.mk: skipping test sc_preprocessor_indentation: cppi not installed
      
      * cfg.mk (sc_preprocessor_indentation): New syntax-check rule.
      (preprocessor_exempt): New macro, with first exemption.
      89a08ba6
    • J
      build: update gnulib submodule to newer (but not latest) · 12023373
      Jim Meyering 提交于
      This is a stop-gap measure to make autogen.sh rerun ./bootstrap,
      (required due to recent bootstrap.conf addition) while we prepare
      the fix to automatically detect the case of an updated modules list.
      12023373
    • D
      Free resources on error in udev startup · b978f31a
      David Allan 提交于
      * The udev driver didn't properly free resources that it allocates when setting up the 'computer' device in the error case.
      b978f31a
    • D
      Make virsh reconnect when losing connection · 056623f3
      Daniel Veillard 提交于
      When the daemon libvirtd restarts, a connected virsh gets a SIGPIPE
      and dies. This change the behaviour to try to reconnect if the
      signal was received or command error indicated a connection or RPC
      failure. Note that the failing command is not restarted.
      
      * tools/virsh.c: catch SIGPIPE signals as well as connection related
        failures, add some automatic reconnection code and appropriate error
        messages.
      056623f3
  5. 10 3月, 2010 12 次提交
    • C
      Fix up nodeinfo parsing code. · 7be9270c
      Chris Lalancette 提交于
      As pointed out by eblake, I made a real hash of the
      nodeinfo code with commit
      aa2f6f96.  This patch
      cleans it up:
      
      1)  Do more work at compile time instead of runtime (minor)
      2)  Properly handle the hex digits that come from
      /sys/devices/system/cpu/cpu*/topology/thread_siblings
      3)  Fix up some error paths that could cause SEGV
      4)  Used unsigned's for the cpu numbers (cpu -1 doesn't
      make any sense)
      
      Along with the recent patch from jdenemar to zero out
      the nodeinfo structure, I've re-tested this on the
      machines having the problems, and it seems to be good.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      7be9270c
    • D
      Change logrotate to be per-hypervisor logs · 89bf843a
      Daniel Veillard 提交于
      Having a single logrotate configuration file for all hypervisors
      did not work as logrotate would get confused if an hypervisor not
      supported on that platform was still listed. Simplest is to split
      the logrotate as separate per hypervisor files and change the
      spec file to only install the ones compiled in.
      * daemon/libvirtd.lxc.logrotate.in daemon/libvirtd.qemu.logrotate.in
        daemon/libvirtd.uml.logrotate.in: copy and split the original
        daemon/libvirtd.logrotate.in file
      * daemon/Makefile.am: update to support the different files and
        cleanup in sed suggested by Eric Blake
      * libvirt.spec.in: only install the relevant logrotate configs
      * daemon/.gitignore: update logrotate generated list
      89bf843a
    • E
      build: consistently indent preprocessor directives · 36d8e7d8
      Eric Blake 提交于
      * global: patch created by running:
      for f in $(git ls-files '*.[ch]') ; do
          cppi $f > $f.t && mv $f.t $f
      done
      36d8e7d8
    • E
      virsh: use N_ rather than gettext_noop · 0c39adef
      Eric Blake 提交于
      With N_() in place, we can use it for a smaller file.
      
      * doc/api-extension/0008-Step-8-of-8-Add-virsh-support.patch:
      Replace all uses of gettext_noop with N_.
      * tools/virsh.c: Likewise, throughout the file.
      0c39adef
    • E
      virsh: fix existing N_ uses · f6876e10
      Eric Blake 提交于
      It is a bad idea to call gettext on an already-translated
      string.  In cases where a string must be translated separately
      from where it is exposed to xgettext, the gettext manual
      recommends the idiom of N_() wrapping gettext_noop for
      marking the string.
      
      * src/internal.h (N_): Fix definition to match gettext manual.
      * tools/virsh.c: (cmdHelp, cmdList, cmdDomstate, cmdDominfo)
      (cmdVcpuinfo, vshUsage): Replace incorrect use of N_ with _.
      (vshCmddefHelp): Likewise.  Mark C format strings appropriately.
      f6876e10
    • J
      doc: fix typos in hacking.html.in; mark HACKING as read-only · d1c75416
      Jim Meyering 提交于
      * HACKING: Mark as read-only.  Soon we'll generate it from...
      * docs/hacking.html.in: ... this file.  More typo fixes.
      d1c75416
    • J
      06b83560
    • J
      Wipe nodeinfo structure before filling it · 22e39d0e
      Jiri Denemark 提交于
      The nodeinfo structure wasn't initialized in qemu driver and with the
      recent change in CPU topology parsing, old value of nodeinfo->sockets
      could be used and incremented giving totally bogus results.
      
      Let's just wipe the structure completely.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      22e39d0e
    • J
      doc: fix more typos in HACKING · 2a13ecc9
      Jim Meyering 提交于
      * HACKING: More spelling/typo fixes.
      2a13ecc9
    • E
      AUTHORS: add recent contributors · e839e33a
      Eric Blake 提交于
      e839e33a
    • E
      hacking: add a section on preprocessor conventions · 09537592
      Eric Blake 提交于
      * doc/hacking.html.in (preprocessor): New section to document
      recently-discussed style issues.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      09537592
    • E
      hacking: fix typos · 0be37833
      Eric Blake 提交于
      * docs/hacking.html.in (committers): Fix spelling and grammar.
      0be37833
  6. 09 3月, 2010 3 次提交
    • L
      Fix format string warnings · 618dc80c
      Laine Stump 提交于
      A few more non-literal format strings in error log messages have crept
      in. Fix them in the standard way - turn the format string into "%s"
      with the original string as the arg.
      618dc80c
    • S
      macvtap build detection fix · d3b6fe5f
      Stefan Berger 提交于
      * configure.ac: fix the header test used for macvtap availability
        detection
      d3b6fe5f
    • S
      Fix virDomainGetXMLDesc cache settings output · 1c36d068
      Soren Hansen 提交于
      If a special cache strategy for a disk has been specified in a domain
      definition, but no driverName has been set, virDomainGetXMLDesc would not
      include the <driver> tag at all.
      
      * src/conf/domain_conf.c: make sure any <driver> tag setting is
        serialized if set.
      1c36d068
  7. 08 3月, 2010 4 次提交
    • D
      Update hacking.html.in · 785d8580
      David Allan 提交于
      * Added section on use of goto
      * Added missing content from HACKING document
      785d8580
    • C
      Get thread and socket information in virsh nodeinfo. · aa2f6f96
      Chris Lalancette 提交于
      The current code for "nodeinfo" is pretty naive
      about socket and thread information.  To determine the
      sockets, it just takes the number of cpus and divides
      by the number of cores.  For the thread count, it always
      sets it to 1.  With more recent Intel machines, however,
      hyperthreading is again an option, meaning that these
      heuristics no longer work and give bogus numbers.  This
      patch goes through /sys to get the additional
      information so we properly report it.
      
      Note that I had to edit the tests not to report on
      socket and thread counts, since these are determined
      dynamically now.
      
      v2: As pointed out by Eric Blake, gnulib provides
          count-one-bits (which is LGPLv2+).  Use it instead
          of a hand-coded popcnt.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      aa2f6f96
    • A
      Fix locking in qemudDomainMemoryStats · 5140a2f6
      Adam Litke 提交于
      When adding domainMemoryStats API support for the qemu driver, I didn't
      follow the locking rules exactly.  The job condition must be held when
      executing monitor commands.  This corrects the segfaults I was seeing
      when calling domainMemoryStats in a multi-threaded environment.
      
      * src/qemu/qemu_driver.c: in qemudDomainMemoryStats() add missing
        calls to qemuDomainObjBeginJob/qemuDomainObjEndJob
      5140a2f6
    • L
      Eliminate large stack buffer in doTunnelSendAll · ecb5cf7c
      Laine Stump 提交于
      doTunnelSendAll function (used by QEMU migration) uses a 64k buffer on
      the stack, which could be problematic. This patch replaces that with a
      buffer from the heap.
      
      While in the neighborhood, this patch also improves error reporting in
      the case that saferead fails - previously, virStreamAbort() was called
      (resetting errno) before reporting the error. It's been changed to
      report the error first.
      
      * src/qemu/qemu_driver.c: fix doTunnelSendAll() to use a malloc'ed
        buffer
      ecb5cf7c