1. 10 12月, 2013 3 次提交
  2. 03 12月, 2013 1 次提交
  3. 22 11月, 2013 1 次提交
  4. 20 11月, 2013 3 次提交
  5. 18 11月, 2013 3 次提交
  6. 13 11月, 2013 3 次提交
    • J
      Disable nwfilter driver when running unprivileged · 22a1dd95
      Ján Tomko 提交于
      When opening a new connection to the driver, nwfilterOpen
      only succeeds if the driverState has been allocated.
      
      Move the privilege check in driver initialization before
      the state allocation to disable the driver.
      
      This changes the nwfilter-define error from:
      error: cannot create config directory (null): Bad address
      To:
      this function is not supported by the connection driver:
      virNWFilterDefineXML
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1029266
      (cherry picked from commit b7829f95)
      22a1dd95
    • J
      qemu: don't use deprecated -no-kvm-pit-reinjection · e20a2c77
      Ján Tomko 提交于
      Since qemu-kvm 1.1 [1] (since 1.3. in upstream QEMU [2])
      '-no-kvm-pit-reinjection' has been deprecated.
      Use -global kvm-pit.lost_tick_policy=discard instead.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=978719
      
      [1] http://git.kernel.org/cgit/virt/kvm/qemu-kvm.git/commit/?id=4e4fa39
      [2] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=c21fb4f
      
      (cherry picked from commit 1569fa14)
      
      Conflicts:
      	tests/qemucapabilitiesdata/caps_1.2.2-1.caps
      	tests/qemucapabilitiesdata/caps_1.2.2-1.replies
      	tests/qemucapabilitiesdata/caps_1.3.1-1.caps
      	tests/qemucapabilitiesdata/caps_1.3.1-1.replies
      	tests/qemucapabilitiesdata/caps_1.4.2-1.caps
      	tests/qemucapabilitiesdata/caps_1.4.2-1.replies
      	tests/qemucapabilitiesdata/caps_1.5.3-1.caps
      	tests/qemucapabilitiesdata/caps_1.5.3-1.replies
      	tests/qemucapabilitiesdata/caps_1.6.0-1.caps
      	tests/qemucapabilitiesdata/caps_1.6.0-1.replies
      	tests/qemucapabilitiesdata/caps_1.6.50-1.caps
      	tests/qemucapabilitiesdata/caps_1.6.50-1.replies
      (qemucapabilitiestest is not backported)
      e20a2c77
    • M
      qemu: Don't access vm->priv on unlocked domain · cc16220d
      Michal Privoznik 提交于
      Since 86d90b3a (yes, my patch; again) we are supporting NBD storage
      migration. However, on error recovery path we got the steps reversed.
      The correct order is: return NBD port to the virPortAllocator and then
      either unlock the vm or remove it from the driver. Not vice versa.
      
      ==11192== Invalid write of size 4
      ==11192==    at 0x11488559: qemuMigrationPrepareAny (qemu_migration.c:2459)
      ==11192==    by 0x11488EA6: qemuMigrationPrepareDirect (qemu_migration.c:2652)
      ==11192==    by 0x114D1509: qemuDomainMigratePrepare3Params (qemu_driver.c:10332)
      ==11192==    by 0x519075D: virDomainMigratePrepare3Params (libvirt.c:7290)
      ==11192==    by 0x1502DA: remoteDispatchDomainMigratePrepare3Params (remote.c:4798)
      ==11192==    by 0x12DECA: remoteDispatchDomainMigratePrepare3ParamsHelper (remote_dispatch.h:5741)
      ==11192==    by 0x5212127: virNetServerProgramDispatchCall (virnetserverprogram.c:435)
      ==11192==    by 0x5211C86: virNetServerProgramDispatch (virnetserverprogram.c:305)
      ==11192==    by 0x520A8FD: virNetServerProcessMsg (virnetserver.c:165)
      ==11192==    by 0x520A9E1: virNetServerHandleJob (virnetserver.c:186)
      ==11192==    by 0x50DA78F: virThreadPoolWorker (virthreadpool.c:144)
      ==11192==    by 0x50DA11C: virThreadHelper (virthreadpthread.c:161)
      ==11192==  Address 0x1368baa0 is 576 bytes inside a block of size 688 free'd
      ==11192==    at 0x4A07F5C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==11192==    by 0x5079A2F: virFree (viralloc.c:580)
      ==11192==    by 0x11456C34: qemuDomainObjPrivateFree (qemu_domain.c:267)
      ==11192==    by 0x50F41B4: virDomainObjDispose (domain_conf.c:2034)
      ==11192==    by 0x50C2991: virObjectUnref (virobject.c:262)
      ==11192==    by 0x50F4CFC: virDomainObjListRemove (domain_conf.c:2361)
      ==11192==    by 0x1145C125: qemuDomainRemoveInactive (qemu_domain.c:2087)
      ==11192==    by 0x11488520: qemuMigrationPrepareAny (qemu_migration.c:2456)
      ==11192==    by 0x11488EA6: qemuMigrationPrepareDirect (qemu_migration.c:2652)
      ==11192==    by 0x114D1509: qemuDomainMigratePrepare3Params (qemu_driver.c:10332)
      ==11192==    by 0x519075D: virDomainMigratePrepare3Params (libvirt.c:7290)
      ==11192==    by 0x1502DA: remoteDispatchDomainMigratePrepare3Params (remote.c:4798)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit 1f2f879e)
      cc16220d
  7. 12 11月, 2013 2 次提交
    • M
      virpci: Don't error on unbinded devices · 79d347c9
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1018897
      
      If a PCI deivce is not binded to any driver (e.g. there's yet no PCI
      driver in the linux kernel) but still users want to passthru the device
      we fail the whole operation as we fail to resolve the 'driver' link
      under the PCI device sysfs tree. Obviously, this is not a fatal error
      and it shouldn't be error at all.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit df4283a5)
      79d347c9
    • M
      virSecurityLabelDefParseXML: Don't parse label on model='none' · 13cfcad6
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1027096
      
      If there's the following snippet in the domain XML, the domain will be
      lost upon the daemon restart (if the domain is started prior restart):
      
          <seclabel type='dynamic' relabel='yes'/>
      
      The problem is, the 'label', 'imagelabel' and 'baselabel' are parsed
      whenever the VIR_DOMAIN_XML_INACTIVE is *not* present or the label is
      static. The latter is not our case, obviously. So, when libvirtd starts
      up, it finds domain state xml and parse it. During parsing, many XML
      flags are enabled but VIR_DOMAIN_XML_INACTIVE. Hence, our parser tries
      to extract 'label', 'imagelabel' and 'baselabel' from the XML which
      fails for model='none'. Err, this model - even though not specified in
      XML - can be taken from qemu wide config file: /etc/libvirtd/qemu.conf.
      
      However, in order to know we are dealing with model='none' the code in
      question must be moved forward a bit. Then a new check must be
      introduced. This is what the first two chunks are doing.
      
      But this alone is not sufficient. The domain state XML won't contain the
      model attribute without slight modification. The model should be
      inserted into the XML even if equal to 'none' and the state XML is being
      generated - what if the origin (the @security_driver variable in
      qemu.conf) changes during libvirtd restarts?
      
      At the end, a test to catch this scenario is introduced.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit 9fb3f957)
      13cfcad6
  8. 07 11月, 2013 5 次提交
    • C
      Prep for release 1.1.3.1 · 9c9588b6
      Cole Robinson 提交于
      9c9588b6
    • D
      Push RPM deps down into libvirt-daemon-driver-XXXX sub-RPMs · e25e2b2f
      Daniel P. Berrange 提交于
      For inexplicable reasons, many of the 3rd party package deps
      were left against the 'libvirt-daemon' RPM when the drivers
      were split out. This makes a minimal install heavier that
      it should be. Push them all down into libvirt-daemon-driver-XXX
      so they're only pulled in when truly needed
      
      With this change applied, a minimal install of just the
      libvirt-daemon-driver-lxc RPM is reduced by 41 MB on a
      Fedora 19 host.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit 23142ac9)
      e25e2b2f
    • D
      Fix race condition reconnecting to vms & loading configs · b044210e
      Daniel P. Berrange 提交于
      The following sequence
      
       1. Define a persistent QMEU guest
       2. Start the QEMU guest
       3. Stop libvirtd
       4. Kill the QEMU process
       5. Start libvirtd
       6. List persistent guests
      
      At the last step, the previously running persistent guest
      will be missing. This is because of a race condition in the
      QEMU driver startup code. It does
      
       1. Load all VM state files
       2. Spawn thread to reconnect to each VM
       3. Load all VM config files
      
      Only at the end of step 3, does the 'virDomainObjPtr' get
      marked as "persistent". There is therefore a window where
      the thread reconnecting to the VM will remove the persistent
      VM from the list.
      
      The easy fix is to simply switch the order of steps 2 & 3.
      
      In addition to this though, we must only attempt to reconnect
      to a VM which had a non-zero PID loaded from its state file.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit f26701f5)
      b044210e
    • D
      Fix leak of objects when reconnecting to QEMU instances · 5ddb57e0
      Daniel P. Berrange 提交于
      The 'error' cleanup block in qemuProcessReconnect() had a
      'return' statement in the middle of it. This caused a leak
      of virConnectPtr & virQEMUDriverConfigPtr instances. This
      was identified because netcf recently started checking its
      refcount in libvirtd shutdown:
      
      netcfStateCleanup:109 : internal error: Attempt to close netcf state driver with open connections
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit 54a24112)
      5ddb57e0
    • D
      Don't update dom->persistent without lock held · 9311f8c6
      Daniel P. Berrange 提交于
      virDomainObjListLoadAllConfigs sets dom->persistent after
      having released its lock on the domain object. This exposes
      a possible race condition.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit b260a77e)
      9311f8c6
  9. 30 10月, 2013 10 次提交
  10. 23 10月, 2013 6 次提交
    • D
      Move virt-login-shell into libvirt-login-shell sub-RPM · 3f37b8eb
      Daniel P. Berrange 提交于
      Many people will not want the setuid virt-login-shell binary
      installed by default, so move it into a separate sub-RPM
      named libvirt-login-shell. This RPM is only generated if
      LXC is enabled
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit 8adc9269)
      3f37b8eb
    • D
      Set a sane $PATH for virt-login-shell · 3a88faeb
      Daniel P. Berrange 提交于
      The virt-login-shell binary shouldn't need to execute programs
      relying on $PATH, but just in case set a fixed $PATH value
      of /bin:/usr/bin
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit d665003d)
      3a88faeb
    • Z
      remote: fix regression in event deregistration · f6f82900
      Zhou Yimin 提交于
      Introduced by 7b87a3
      When I quit the process which only register VIR_DOMAIN_EVENT_ID_REBOOT,
      I got error like:
      "libvirt: XML-RPC error : internal error: domain event 0 not registered".
      Then I add the following code, it fixed.
      Signed-off-by: NZhou Yimin <zhouyimin@huawei.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 9712c251)
      f6f82900
    • M
      python: Fix Create*WithFiles filefd passing · 10a43d20
      Marian Neagul 提交于
      Commit d76227be added functions virDomainCreateWithFiles and
      virDomainCreateXMLWithFiles, but there was a little piece missing in
      python bindings.  This patch fixes proper passing of file descriptors
      in the overwrites of these functions.
      10a43d20
    • J
      build: fix build of virt-login-shell on systems with older gnutls · 49e826bd
      Jim Fehlig 提交于
      On systems where gnutls uses libgcrypt, I'm seeing the following
      build failure
      
      libvirt.c:314: error: variable 'virTLSThreadImpl' has initializer but incomplete type
      libvirt.c:319: error: 'GCRY_THREAD_OPTION_PTHREAD' undeclared here (not in a function)
      ...
      
      Fix by undefining WITH_GNUTLS_GCRYPT in config-post.h
      49e826bd
    • J
      build: fix linking virt-login-shell · de57881e
      Jim Fehlig 提交于
      After commit 3e2f27e1, I've noticed build failures of virt-login-shell
      when libapparmor-devel is installed on the build host
      
      CCLD     virt-login-shell
      ../src/.libs/libvirt-setuid-rpc-client.a(libvirt_setuid_rpc_client_la-vircommand.o):
      In function `virExec':
      /home/jfehlig/virt/upstream/libvirt/src/util/vircommand.c:653: undefined
      reference to `aa_change_profile'
      collect2: error: ld returned 1 exit status
      
      I was about to commit an easy fix under the build-breaker rule
      (build-fix-1.patch), but thought to extend the notion of SECDRIVER_LIBS
      to SECDRIVER_CFLAGS, and use both throughout src/Makefile.am where it
      makes sense (build-fix-2.patch).
      
      Should I just stick with the simple fix, or is something along the lines
      of patch 2 preferred?
      
      Regards,
      Jim
      
      >From a0f35945f3127ab70d051101037e821b1759b4bb Mon Sep 17 00:00:00 2001
      From: Jim Fehlig <jfehlig@suse.com>
      Date: Mon, 21 Oct 2013 15:30:02 -0600
      Subject: [PATCH] build: fix virt-login-shell build with apparmor
      
      With libapparmor-devel installed, virt-login-shell fails to link
      
      CCLD     virt-login-shell
      ../src/.libs/libvirt-setuid-rpc-client.a(libvirt_setuid_rpc_client_la-vircommand.o): In function `virExec':
      /home/jfehlig/virt/upstream/libvirt/src/util/vircommand.c:653: undefined reference to `aa_change_profile'
      collect2: error: ld returned 1 exit status
      
      Fix by linking libvirt_setuid_rpc_client with previously determined
      SECDRIVER_LIBS in src/Makefile.am.  While at it, introduce SECDRIVER_CFLAGS
      and use both throughout src/Makefile.am where it makes sense.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      de57881e
  11. 21 10月, 2013 3 次提交