1. 26 3月, 2015 7 次提交
  2. 25 3月, 2015 9 次提交
    • P
      qemu: domain: Don't leak device alias list · 9d574aa2
      Peter Krempa 提交于
      While adding tests for status XML parsing and formatting I've noticed
      that the device alias list is leaked.
      
      ==763001== 81 (48 direct, 33 indirect) bytes in 1 blocks are definitely lost in loss record 414 of 514
      ==763001==    at 0x4C2B8F0: calloc (vg_replace_malloc.c:623)
      ==763001==    by 0x6ACF70F: virAllocN (viralloc.c:191)
      ==763001==    by 0x447B64: qemuDomainObjPrivateXMLParse (qemu_domain.c:727)
      ==763001==    by 0x6B848F9: virDomainObjParseXML (domain_conf.c:15491)
      ==763001==    by 0x6B84CAC: virDomainObjParseNode (domain_conf.c:15608)
      9d574aa2
    • L
      qemu: Report better error when memory device source has wrong NUMA node · 726072f0
      Luyao Huang 提交于
      When starting a VM with hotpluggable memory devices the user may specify
      an invalid source NUMA node. Libvirt would pass through the error from
      qemu:
      
       # virsh start test3
       error: Failed to start domain test3
       error: internal error: process exited while connecting to monitor:
       2015-03-25T01:12:17.205913Z qemu-kvm: -object memory-backend-ram,id=memdimm0
       ,size=536870912,host-nodes=1-3,policy=bind: cannot bind memory to host NUMA nodes:
       Invalid argument
      
      This patch adds a check that allows to report better error:
      
       # virsh start test3
       error: Failed to start domain test3
       error: configuration unsupported: NUMA node 1 is unavailable
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      726072f0
    • J
      qemu: Add timing to domain jobs · f6fbd36f
      Jiri Denemark 提交于
      Whenever we fail to acquire a job, we can report how long ago it was
      locked by another API.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=853839Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      f6fbd36f
    • J
      qemu: Track the API which started the current job · b79f25e8
      Jiri Denemark 提交于
      This is very helpful when we want to log and report why we could not
      acquire a state change lock. Reporting what job keeps it locked helps
      with understanding the issue. Moreover, after calling
      virDomainGetControlInfo, it's possible to tell whether libvirt is just
      stuck somewhere within the API (or it just forgot to cleanup the job) or
      whether libvirt is waiting for QEMU to reply.
      
      The error message will look like the following:
      
          # virsh resume cd
          error: Failed to resume domain cd
          error: Timed out during operation: cannot acquire state change lock
          (held by remoteDispatchDomainSuspend)
      
      https://bugzilla.redhat.com/show_bug.cgi?id=853839Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      b79f25e8
    • J
      Set thread job for every RPC call · 667cce7b
      Jiri Denemark 提交于
      Since all APIs are also RPC calls, we automatically get all APIs covered
      with thread jobs.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      667cce7b
    • P
      qemu: fix set vcpus on host without NUMA · 6cf1e11c
      Pavel Hrdina 提交于
      We don't have to modify cpuset.mems on hosts without NUMA.  It also
      fixes an error message that you get instead of success if you trying
      update vcpus of a guest on a host without NUMA.
      
      error: internal error: NUMA isn't available on this host
      Signer-off-by: NPavel Hrdina <phrdina@redhat.com>
      6cf1e11c
    • P
      qemu: cleanup setvcpus · 5cd3c501
      Pavel Hrdina 提交于
      Remove unnecessary maximum variable.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      5cd3c501
    • P
      qemu: move virDomainLiveConfigHelperMethod right after BeginJob · 5bb06665
      Pavel Hrdina 提交于
      We should call virDomainLiveConfigHelperMethod ASAP because this
      function transfers VIR_DOMAIN_AFFECT_CURRENT to VIR_DOMAIN_AFFECT_LIVE
      or VIR_DOMAIN_AFFECT_CONFIG.  All other additional checks for those two
      flags should consider that the user give us VIR_DOMAIN_AFFECT_CURRENT.
      
      Remove the unnecessary check whether the domain is live in case of
      VIR_DOMAIN_VCPU_GUEST because this check is done by
      virDomainLiveConfigHelperMethod.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      5bb06665
    • J
      Fix typo in error message · 68545ea6
      Ján Tomko 提交于
      by rewriting it completely from:
      error: unsupported configuration: virtio only support device address
      type 'PCI'
      
      to:
      
      error: unsupported configuration: virtio disk cannot have an address of type
      drive
      
      Since we now support CCW addresses as well.
      68545ea6
  3. 24 3月, 2015 1 次提交
    • L
      qemu: change accidental VIR_WARNING back to VIR_DEBUG · dae3e246
      Laine Stump 提交于
      While debugging the support for responding to qemu RX_FILTER_CHANGED
      events, I had changed the "ignoring this event" log message from
      VIR_DEBUG to VIR_WARN, but forgot to change it back before
      pushing. Since many guest OSes make enough changes to multicast lists
      and/or promiscuous mode settings to trigger this message, it's
      starting to show up as a red herring in bug reports.
      dae3e246
  4. 23 3月, 2015 14 次提交
  5. 20 3月, 2015 1 次提交
  6. 19 3月, 2015 5 次提交
    • L
      qemu: do not overwrite the error in qemuDomainObjExitMonitor · 4f068209
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1196934
      
      When qemu exits during startup, libvirt includes the error from
      /var/log/libvirt/qemu/vm.log in the error message:
      
      $ virsh start test3
      error: Failed to start domain test3
      error: internal error: early end of file from monitor: possible problem:
      2015-02-27T03:03:16.985494Z qemu-kvm: -numa memdev is not supported by
      machine rhel6.5.0
      
      The check for domain liveness added to qemuDomainObjExitMonitor
      in commit dc2fd51f sometimes overwrites this error:
      $ virsh start test3
      error: Failed to start domain test3
      error: operation failed: domain is no longer running
      
      Fix the check to only report an error if there is none set.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      4f068209
    • J
      qemu: Fix two issues in qemuDomainSetVcpus error handling · e06e6f1e
      John Ferlan 提交于
      Issue #1 - A call to virBitmapNew did not check if the allocation
      failed which could lead to a NULL dereference
      
      Issue #2 - When deleting the pin entries from the config file, the
      code loops from the number of elements down to the "new" vcpu count;
      however, the pin id values are numbered 0..n-1 not 1..n, so the "first"
      pin attempt would never work. Luckily the check was for whether the
      incoming 'n' (vcpu id) matched the entry in the array from 0..arraysize
      rather than a dereference of the 'n' entry
      e06e6f1e
    • E
      qemu: track 'cancelling' migration state · e2660cb8
      Eric Blake 提交于
      In qemu 2.3, the migration status will include 'cancelling' in the
      window between when an asynchronous cancel has been requested and
      when the migration is actually halted.  Previously, qemu hid this
      state and reported 'active'.  Libvirt manages the sequence okay
      even when the string is unrecognized (that is, it will report an
      unknown state:
      
      Migration: [ 69 %]^Cerror: internal error: unexpected migration status in cancelling.
      
      but the migration is still cancelled), but recognizing the string
      makes for a smoother user experience.
      
      * src/qemu/qemu_monitor.h
      (QEMU_MONITOR_MIGRATION_STATUS_CANCELLING): Add enum.
      * src/qemu/qemu_monitor.c (qemuMonitorMigrationStatus): Map it.
      * src/qemu/qemu_migration.c (qemuMigrationUpdateJobStatus): Adjust
      clients.
      * src/qemu/qemu_monitor_json.c
      (qemuMonitorJSONGetMigrationStatusReply): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e2660cb8
    • L
      util: clean up #includes of virnetdevopenvswitch.h · 451547a4
      Laine Stump 提交于
      virnetdevopenvswitch.h declares a few functions that can be called to
      add ports to and remove them from OVS bridges, and retrieve the
      migration data for a port. It does not contain any data definitions
      that are used by domain_conf.h. But for some reason, domain_conf.h
      virnetdevopenvswitch.h should be directly #including it. This adds a
      few lines to the project, but saves all the files that don't need it
      from the extra computing, and makes the dependencies more clear cut.
      451547a4
    • Z
      util: vhost user: support for bootindex · 39ac3230
      zhang bo 提交于
      Problem Description:
      When we set boot order for a vhost-user network interface, we found the boot index
      doesn't work.
      
      Cause of the Problem:
      In the function qemuBuildVhostuserCommandLine(), it forcely set the arg bootindex of
      function qemuBuildNicDevStr() to 0. Thus, the bootindex parameter got missing.
      
      Solution:
      Trans the arg bootindex down.
      Signed-off-by: NGao Haifeng <gaohaifeng.gao@huawei.com>
      Signed-off-by: NZhang Bo <oscar.zhangbo@huawei.com>
      39ac3230
  7. 18 3月, 2015 3 次提交