1. 08 1月, 2013 20 次提交
  2. 07 1月, 2013 10 次提交
    • E
      build: install libvirt sysctl file correctly · a1fd56cb
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=887017 reports that
      even though libvirt attempts to set fs.aio-max-nr via sysctl,
      the file was installed with the wrong name and gets ignored by
      sysctl.  Furthermore, 'man systcl.d' recommends that packages
      install into hard-coded /usr/lib/sysctl.d (even when libdir is
      /usr/lib64), so that sysadmins can use /etc/sysctl.d for overrides.
      
      * daemon/Makefile.am (install-sysctl, uninstall-sysctl): Use
      correct location.
      * libvirt.spec.in (network_files): Reflect this.
      a1fd56cb
    • E
      build: .service files don't need to be executable · 5ec4b22b
      Eric Blake 提交于
      See also commit 66ff2ddc, where we avoided installing these files
      as executables.
      
      * daemon/Makefile.am (libvirtd.service): Drop chmod.
      * tools/Makefile.am (libvirt-guests.service): Likewise.
      * src/Makefile.am (virtlockd.service, virtlockd.socket):
      Likewise.
      5ec4b22b
    • E
      build: properly substitute virtlockd.socket · cb854b8f
      Eric Blake 提交于
      virtlockd.service could be installed to a configurable root,
      but virtlockd.socket was hardcoded to installation into a
      distro.
      
      * src/Makefile.am (virtlockd.service, virtlockd.socket): Drop
      unused substitutions.
      * src/locking/virtlockd.socket.in (ListenStream): Don't hard-code
      /var.
      cb854b8f
    • E
      build: use common .in replacement mechanism · 462a6962
      Eric Blake 提交于
      We had several different styles of .in conversion in our Makefiles:
      ALLCAPS, @ALLCAPS@, @lower@, ::lower::
      Canonicalize on one form, to make it easier to copy and paste
      between .in files.
      
      Also, we were using some non-portable sed constructs: \@ is an
      undefined escape sequence (it happens to be @ itself in GNU sed,
      but POSIX allows it to mean something else), as well as risky
      behavior (failure to consistently quote things means a space
      in $(sysconfdir) could throw things off; also, Autoconf recommends
      using | rather than , or ! in the s||| operator, because | has to
      be quoted in shell and is therefore less likely to appear in file
      names than , or !).
      
      Fix all of these uses to follow the same syntax.
      
      * daemon/libvirtd.8.in: Switch to @var@.
      * tools/virt-xml-validate.in: Likewise.
      * tools/virt-pki-validate.in: Likewise.
      * src/locking/virtlockd.init.in: Likewise.
      * daemon/Makefile.am: Prefer | over ! in sed.
      (libvirtd.8): Prefer consistent substitution.
      (libvirtd.init, libvirtd.service): Avoid non-portable sed.
      * tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
      (libvirt-guests.service): Likewise.
      (virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
      Prefer consistent capitalization.
      * src/Makefile.am (virtlockd.init, virtlockd.service)
      (virtlockd.socket): Prefer consistent substitution.
      462a6962
    • O
      qemu: Check if the shared disk's cdbfilter conflicts with others · 1279e421
      Osier Yang 提交于
      This prevents domain starting and disk attaching if the shared disk's
      setting conflicts with other active domain(s), E.g. A domain with
      "sgio" set as "filtered", however, another active domain is using
      it set as "unfiltered".
      1279e421
    • O
      qemu: set unpriv_sgio when starting domain and attaching disk · 278f87c4
      Osier Yang 提交于
      This ignores the default "filtered" if unpriv_sgio is not supported
      by kernel, but for explicit request "filtered", it error out for
      domain starting.
      278f87c4
    • O
      conf: Parse and format the new XML · 535aed56
      Osier Yang 提交于
      Like "rawio", "sgio" is only allowed for block disk of device
      type "lun".
      
      It doesn't default disk->sgio to "filtered" when parsing, as
      it won't be able to distinguish explicitly requested "filtered"
      and a default "filtered" in driver then. We have to error out for
      explicit request when the kernel doesn't support the new sysfs
      knob "unpriv_sgio", however, for defaulted "filtered", we can
      just ignore it if the kernel doesn't support "unpriv_sgio".
      535aed56
    • O
      docs: Add docs and rng schema for new XML tag sgio · b9c57e7b
      Osier Yang 提交于
      This introduces new XML tag "sgio" for disk, its valid values
      are "filtered" and "unfiltered", setting it as "filtered" will
      set the disk's unpriv_sgio to 0, and "unfiltered" to set it
      as 1, which allows the unprivileged SG_IO commands.
      b9c57e7b
    • O
      qemu: Add a hash table for the shared disks · d7ead3e1
      Osier Yang 提交于
      This introduces a hash table for qemu driver, to store the shared
      disk's info as (@major:minor, @ref_count). @ref_count is the number
      of domains which shares the disk.
      
      Since we only care about if the disk support unprivileged SG_IO
      commands, and the SG_IO commands only make sense for block disk,
      this patch only manages (add/remove hash entry) the shared disk for
      block disk.
      
      * src/qemu/qemu_conf.h: (Add member 'sharedDisks' of type
                               virHashTablePtr; Declare helpers
                               qemuGetSharedDiskKey, qemuAddSharedDisk
                               and qemuRemoveSharedDisk)
      * src/qemu/qemu_conf.c (Implement the 3 helpers)
      * src/qemu/qemu_process.c (Update 'sharedDisks' when domain
                                 starting and shutdown)
      * src/qemu/qemu_driver.c (Update 'sharedDisks' when attaching
                                or detaching disk).
      d7ead3e1
    • O
      util: Prepare helpers for unpriv_sgio setting · ba72cb12
      Osier Yang 提交于
      "virGetDeviceID" could be used across the sources, but it doesn't
      relate with this series, and could be done later.
      
      * src/util/virutil.h: (Declare virGetDeviceID, and
                             vir{Get,Set}DeviceUnprivSGIO)
      * src/util/virutil.c: (Implement virGetDeviceID and
                             vir{Get,Set}DeviceUnprivSGIO)
      * src/libvirt_private.syms: Export private symbols of upper helpers
      ba72cb12
  3. 05 1月, 2013 10 次提交
    • P
      snapshot: qemu: Allow redefinition of external snapshots · 731a5a4d
      Peter Krempa 提交于
      A redefinition of an external inactive snapshot/checkpoint wasn't
      possible without this change.
      731a5a4d
    • P
      snapshot: qemu: Fix segfault and vanishing snapshots when redefining · 709b0f37
      Peter Krempa 提交于
      When the disk alignment check done while redefining an existing snapshot
      failed, the qemu driver attempted to free the existing snapshot. As in
      the cleanup path the definition of the snapshot wasn't assigned, the
      cleanup code dereferenced a NULL pointer.
      
      This patch changes the behavior on error paths while redefining snapshot
      in two ways:
      
      1) On failure, modifications done on the snapshot definition object are
      rolled back.
      
      2) The previous definition of the data isn't freed until it's certain it
      won't be needed any more.
      
      This change avoids the segfault and additionally the snapshot doesn't
      vanish if redefinition fails for some reason.
      709b0f37
    • P
      snapshot: qemu: Separate logic blocks with newlines · 4494b11f
      Peter Krempa 提交于
      4494b11f
    • P
      snapshot: conf: Make virDomainSnapshotIsExternal more reusable · 51b12b8c
      Peter Krempa 提交于
      Allow to use definition objects with this predicate function.
      51b12b8c
    • J
      qemu: Implement virDomainOpenChannel API · 346e43ec
      John Eckersberg 提交于
      346e43ec
    • J
      conf: Add unix socket support to virChrdevOpen · 66a06649
      John Eckersberg 提交于
      This also changes the function signature to take a
      virDomainChrSourceDefPtr instead of just a path, since it needs to
      differentiate behavior based on source->type.
      66a06649
    • J
      conf: Rename console-specific identifiers to be more generic · 3c971c67
      John Eckersberg 提交于
      The functionality provided in virchrdev.c (previously virconsole.c) is
      applicable to other types of character devices besides consoles, such
      as channels.  This patch is just code motion, renaming things such as
      "console" or "pty", instead using more general terms such as
      "character device" or "device path".
      3c971c67
    • J
      conf: Rename virconsole.* to virchrdev.* · 4c85421c
      John Eckersberg 提交于
      This is just code motion, in preparation to rename identifiers to be
      less console-specific.
      4c85421c
    • J
      api: Add API to tunnel a guest channel via stream · d52add46
      John Eckersberg 提交于
      This patch adds a new API, virDomainOpenChannel, that uses streams to
      connect to a virtio channel on a guest.  This creates a secure
      communication channel between a guest and a libvirt client.
      
      This behaves the same as virDomainOpenConsole, except on channels
      instead of console/serial/parallel devices.
      d52add46
    • E
      build: fix mingw rpm build · 54df702e
      Eric Blake 提交于
      Commit d13155c2 changed which files get installed for the
      libvirt-guests service, but did not touch up the mingw spec
      file.  As a result, rpmbuild complained:
      
      RPM build errors:
          Installed (but unpackaged) file(s) found:
         /usr/i686-w64-mingw32/sys-root/mingw/libexec/libvirt-guests.sh
         /usr/x86_64-w64-mingw32/sys-root/mingw/libexec/libvirt-guests.sh
      
      which in turn breaks ./autobuild.sh when cross-compilers are present.
      
      * mingw-libvirt.spec.in: Remove files not relevant to mingw.
      54df702e