1. 16 12月, 2013 1 次提交
  2. 13 12月, 2013 1 次提交
  3. 12 12月, 2013 1 次提交
  4. 11 12月, 2013 1 次提交
  5. 10 12月, 2013 3 次提交
  6. 06 12月, 2013 1 次提交
  7. 29 11月, 2013 1 次提交
  8. 28 11月, 2013 2 次提交
  9. 26 11月, 2013 2 次提交
    • G
      LXC: don't unmount mounts for shared root · f575fda7
      Gao feng 提交于
      Also after commit 5ff9d8a65ce80efb509ce4e8051394e9ed2cd942
      vfs: Lock in place mounts from more privileged users,
      
      unprivileged user has no rights to umount the mounts that
      inherited from parent mountns.
      
      right now, I have no good idea to fix this problem, we need
      to do more research. this patch just skip unmounting these
      mounts for shared root.
      
      BTW, I think when libvirt lxc enables user namespace, the
      configuation that shares root with host is very rara.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      f575fda7
    • G
      LXC: fix the problem that libvirt lxc fail to start on latest kernel · 46f2d16f
      Gao feng 提交于
      After kernel commit 5ff9d8a65ce80efb509ce4e8051394e9ed2cd942
      vfs: Lock in place mounts from more privileged users,
      
      unprivileged user has no rights to move the mounts that
      inherited from parent mountns. we use this feature to move
      the /stateDir/domain-name.{dev, devpts} to the /dev/ and
      /dev/pts directroy of container. this commit breaks libvirt lxc.
      
      this patch changes the behavior to bind these mounts when
      user namespace is enabled and move these mounts when user
      namespace is disabled.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      46f2d16f
  10. 25 11月, 2013 1 次提交
  11. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: remaining drivers · 64b2335c
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/lxc/lxc_container.c: Consistently use commas.
      * src/openvz/openvz_driver.c: Likewise.
      * src/openvz/openvz_util.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      64b2335c
  12. 19 11月, 2013 1 次提交
  13. 18 11月, 2013 1 次提交
    • D
      Avoid async signal safety problem in glibc's setxid · 3563c51d
      Daniel P. Berrange 提交于
      The glibc setxid is supposed to be async signal safe, but
      libc developers confirm that it is not. This causes a problem
      when libvirt_lxc starts the FUSE thread and then runs clone()
      to start the container. If the clone() was done before the
      FUSE thread has completely started up, then the container
      will hang in setxid after clone().
      
      The fix is to avoid creating any threads until after the
      container has been clone()'d. By avoiding any threads in
      the parent, the child is no longer required to run in an
      async signal safe context, and we thus avoid the glibc
      bug.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3563c51d
  14. 12 11月, 2013 1 次提交
    • D
      Fix busy wait loop in LXC container I/O handling · 5087a5a0
      Daniel P. Berrange 提交于
      If the host side of an LXC container console disconnected
      and the guest side continued to write data, until the PTY
      buffer filled up, the LXC controller would busy wait. It
      would repeatedly see POLLHUP from poll() and not disable
      the watch.
      
      This was due to some bogus logic detecting blocking
      conditions. Upon seeing a POLLHUP we must disable all
      reading & writing from the PTY, and setup the epoll to
      wake us up again when the connection comes back.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5087a5a0
  15. 08 11月, 2013 1 次提交
    • P
      conf: Refactor storing and usage of feature flags · de7b5faf
      Peter Krempa 提交于
      Currently we were storing domain feature flags in a bit field as the
      they were either enabled or disabled. New features such as paravirtual
      spinlocks however can be tri-state as the default option may depend on
      hypervisor version.
      
      To allow storing tri-state feature state in the same place instead of
      having to declare dedicated variables for each feature this patch
      refactors the bit field to an array.
      de7b5faf
  16. 05 11月, 2013 5 次提交
  17. 29 10月, 2013 2 次提交
  18. 28 10月, 2013 1 次提交
  19. 21 10月, 2013 3 次提交
  20. 16 10月, 2013 3 次提交
  21. 15 10月, 2013 3 次提交
    • H
      fix typo in lxc_driver.c and virsh-nodedev.c · dcd0f6d7
      Hongwei Bi 提交于
      dcd0f6d7
    • E
      maint: avoid 'const fooPtr' in all remaining places · 33aec506
      Eric Blake 提交于
      'const fooPtr' is the same as 'foo * const' (the pointer won't
      change, but it's contents can).  But in general, if an interface
      is trying to be const-correct, it should be using 'const foo *'
      (the pointer is to data that can't be changed).
      
      Fix up all remaining offenders.
      
      * src/lxc/lxc_process.c (virLXCProcessSetupInterfaceBridged): Drop
      needless const.
      * src/uml/uml_driver.c (umlMonitorCommand): Use intended type.
      (umlMonitorAddress): Fix fallout.
      * src/xen/xm_internal.c (xenXMDomainSearchForUUID): Use intended type.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      33aec506
    • E
      maint: avoid 'const fooPtr' in domain_conf · d2467709
      Eric Blake 提交于
      'const fooPtr' is the same as 'foo * const' (the pointer won't
      change, but it's contents can).  But in general, if an interface
      is trying to be const-correct, it should be using 'const foo *'
      (the pointer is to data that can't be changed).
      
      Fix up offenders in src/conf/domain_conf, and their fallout.
      
      Several things to note: virObjectLock() requires a non-const
      argument; if this were C++, we could treat the locking field
      as 'mutable' and allow locking an otherwise 'const' object, but
      that is a more invasive change, so I instead dropped attempts
      to be const-correct on domain lookup.  virXMLPropString and
      friends require a non-const xmlNodePtr - this is because libxml2
      is not a const-correct library.  We could make the src/util/virxml
      wrappers cast away const, but I figured it was easier to not
      try to mark xmlNodePtr as const.  Finally, virDomainDeviceDefCopy
      was a rather hard conversion - it calls virDomainDeviceDefPostParse,
      which in turn in the xen driver was actually modifying the domain
      outside of the current device being visited.  We should not be
      adding a device on the first per-device callback, but waiting until
      after all per-device callbacks are complete.
      
      * src/conf/domain_conf.h (virDomainObjListFindByID)
      (virDomainObjListFindByUUID, virDomainObjListFindByName)
      (virDomainObjAssignDef, virDomainObjListAdd): Drop attempt at
      const.
      (virDomainDeviceDefCopy): Use intended type.
      (virDomainDeviceDefParse, virDomainDeviceDefPostParseCallback)
      (virDomainVideoDefaultType, virDomainVideoDefaultRAM)
      (virDomainChrGetDomainPtrs): Make const-correct.
      * src/conf/domain_conf.c (virDomainObjListFindByID)
      (virDomainObjListFindByUUID, virDomainObjListFindByName)
      (virDomainDeviceDefCopy, virDomainObjListAdd)
      (virDomainObjAssignDef, virDomainHostdevSubsysUsbDefParseXML)
      (virDomainHostdevSubsysPciOrigStatesDefParseXML)
      (virDomainHostdevSubsysPciDefParseXML)
      (virDomainHostdevSubsysScsiDefParseXML)
      (virDomainControllerModelTypeFromString)
      (virDomainTPMDefParseXML, virDomainTimerDefParseXML)
      (virDomainSoundCodecDefParseXML, virDomainSoundDefParseXML)
      (virDomainWatchdogDefParseXML, virDomainRNGDefParseXML)
      (virDomainMemballoonDefParseXML, virDomainNVRAMDefParseXML)
      (virSysinfoParseXML, virDomainVideoAccelDefParseXML)
      (virDomainVideoDefParseXML, virDomainHostdevDefParseXML)
      (virDomainRedirdevDefParseXML)
      (virDomainRedirFilterUsbDevDefParseXML)
      (virDomainRedirFilterDefParseXML, virDomainIdMapEntrySort)
      (virDomainIdmapDefParseXML, virDomainVcpuPinDefParseXML)
      (virDiskNameToBusDeviceIndex, virDomainDeviceDefCopy)
      (virDomainVideoDefaultType, virDomainHostdevAssignAddress)
      (virDomainDeviceDefPostParseInternal, virDomainDeviceDefPostParse)
      (virDomainChrGetDomainPtrs, virDomainControllerSCSINextUnit)
      (virDomainSCSIDriveAddressIsUsed)
      (virDomainDriveAddressIsUsedByDisk)
      (virDomainDriveAddressIsUsedByHostdev): Fix fallout.
      * src/openvz/openvz_driver.c (openvzDomainDeviceDefPostParse):
      Likewise.
      * src/libxl/libxl_domain.c (libxlDomainDeviceDefPostParse):
      Likewise.
      * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse)
      (qemuDomainDefaultNetModel): Likewise.
      * src/lxc/lxc_domain.c (virLXCDomainDeviceDefPostParse):
      Likewise.
      * src/uml/uml_driver.c (umlDomainDeviceDefPostParse): Likewise.
      * src/xen/xen_driver.c (xenDomainDeviceDefPostParse): Split...
      (xenDomainDefPostParse): ...since per-device callback is not the
      time to be adding a device.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d2467709
  22. 14 10月, 2013 4 次提交
    • D
      Improve log filtering in virLXCProcessReadLogOutputData · 5a1cb107
      Daniel P. Berrange 提交于
      Make the virLXCProcessReadLogOutputData method ignore the log
      lines about the container startup argv, ignore the generic
      error message from libvirt_lxc when lxcContainerMain fails
      and skip over blank lines.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5a1cb107
    • D
      Ensure lxcContainerResolveSymlinks reports errors · 01100c7f
      Daniel P. Berrange 提交于
      The lxcContainerResolveSymlinks method merely logged some errors
      as debug messages, rather than reporting them as proper errors.
      This meant startup failures were not diagnosed at all.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      01100c7f
    • D
      Ensure lxcContainerMain reports errors on stderr · 558546fb
      Daniel P. Berrange 提交于
      Ensure the lxcContainerMain method reports any errors that
      occur during setup to stderr, where libvirtd will pick them
      up.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      558546fb
    • D
      Initialize threading & error layer in LXC controller · 97973ebb
      Daniel P. Berrange 提交于
      In Fedora 20, libvirt_lxc crashes immediately at startup with a
      trace
      
       #0  0x00007f0cddb653ec in free () from /lib64/libc.so.6
       #1  0x00007f0ce0e16f4a in virFree (ptrptr=ptrptr@entry=0x7f0ce1830058) at util/viralloc.c:580
       #2  0x00007f0ce0e2764b in virResetError (err=0x7f0ce1830030) at util/virerror.c:354
       #3  0x00007f0ce0e27a5a in virResetLastError () at util/virerror.c:387
       #4  0x00007f0ce0e28858 in virEventRegisterDefaultImpl () at util/virevent.c:233
       #5  0x00007f0ce0db47c6 in main (argc=11, argv=0x7fff4596c328) at lxc/lxc_controller.c:2352
      
      Normally virInitialize calls virErrorInitialize and
      virThreadInitialize, but we don't link to libvirt.so
      in libvirt_lxc, and nor did we ever call the error
      or thread initializers.
      
      I have absolutely no idea how this has ever worked, let alone
      what caused it to stop working in Fedora 20.
      
      In addition not all code paths from virLogSetFromEnv will
      ensure virLogInitialize is called correctly, which is another
      possible crash scenario.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      97973ebb