1. 07 1月, 2013 8 次提交
    • 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
  2. 05 1月, 2013 15 次提交
  3. 04 1月, 2013 6 次提交
  4. 03 1月, 2013 3 次提交
    • M
      qemu: Don't parse log output when starting up a domain · b3f2b4ca
      Michal Privoznik 提交于
      Despite our great effort we still parsed qemu log output.
      We wouldn't notice unless upcoming qemu 1.4 changed the
      format of the logs slightly. Anyway, now we should gather
      all interesting knobs like pty paths from monitor. Moreover,
      since for historical reasons the first console can be just
      an alias to the first serial port, we need to check this and
      copy the pty path if that's the case to the first console.
      b3f2b4ca
    • E
      build: use autobuild module to make build logs nicer · 83aca30f
      Eric Blake 提交于
      A recent build failure made me realize that we could usefully add
      a bit more information to configure output, for aid in analysis of
      failed builds.  Pulling in the autobuild module merely adds these
      four lines to configure output:
      
      configure: autobuild project... libvirt
      configure: autobuild revision... v1.0.1-113-g7a74eeaf
      configure: autobuild hostname... myhost
      configure: autobuild timestamp... 20130102T233543Z
      
      which can be useful even if not using the Autobuild project to parse
      build logs.
      
      * bootstrap.conf (gnulib_modules): Add autobuild.
      * configure.ac: Favor git version over release version, when available.
      83aca30f
    • E
      maint: update to latest gnulib · 7a74eeaf
      Eric Blake 提交于
      'make syntax-check' warned that gnulib's copyright is now out of date.
      
      * .gnulib: Update to latest, for copyright year bump.
      * gnulib/local/m4/ssize_t.m4.diff: Regenerate.
      * bootstrap: Synchronize from upstream.
      7a74eeaf
  5. 02 1月, 2013 3 次提交
  6. 30 12月, 2012 1 次提交
    • M
      qemu: Adapt to new log format · 28224c4d
      Michal Privoznik 提交于
      Since 586502189edf9fd0f89a83de96717a2ea826fdb0 qemu commit, the log
      lines reporting chardev's path has changed from:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device redirected to /dev/pts/5
      char device redirected to /dev/pts/6
      char device redirected to /dev/pts/7
      
      to:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device compat_monitor0 redirected to /dev/pts/5
      char device serial0 redirected to /dev/pts/6
      char device serial1 redirected to /dev/pts/7
      
      However, with current code we are not prepared for such change, which
      results in us being unable to start any domain.
      28224c4d
  7. 28 12月, 2012 2 次提交
    • M
      sanlock: Chown lease files as well · ce753ec5
      Michal Privoznik 提交于
      Since sanlock doesn't run under root:root, we have chown()'ed the
      __LIBVIRT__DISKS__ lease file to the user:group defined in the
      sanlock config. However, when writing the patch I've forgot about
      lease files for each disk (this is the
      /var/lib/libvirt/sanlock/<md5>) file.
      ce753ec5
    • M
      python: Adapt to virevent rename · e2d7e7c6
      Michal Privoznik 提交于
      With our recent renames under src/util/* we forgot to adapt
      python wrapper code generator. This results in some methods being
      not exposed:
      
      $ python examples/domain-events/events-python/event-test.py
      Using uri:qemu:///system
      Traceback (most recent call last):
        File "examples/domain-events/events-python/event-test.py", line 585, in <module>
          main()
        File "examples/domain-events/events-python/event-test.py", line 543, in main
          virEventLoopPureStart()
        File "examples/domain-events/events-python/event-test.py", line 416, in virEventLoopPureStart
          virEventLoopPureRegister()
        File "examples/domain-events/events-python/event-test.py", line 397, in virEventLoopPureRegister
          libvirt.virEventRegisterImpl(virEventAddHandleImpl,
      AttributeError: 'module' object has no attribute 'virEventRegisterImpl'
      e2d7e7c6
  8. 24 12月, 2012 2 次提交