1. 21 7月, 2011 12 次提交
    • W
      doc: Add documentation for new cputune elements period and quota · fbdea7cb
      Wen Congyang 提交于
      We have added element period and quota. Document them in formatdomain.html.in.
      fbdea7cb
    • W
      qemu: Implement cfs_period and cfs_quota's modification · 67a173c5
      Wen Congyang 提交于
      This patch implements cfs_period and cfs_quota's modification.
      We can use the command 'virsh schedinfo' to query or modify cfs_period and
      cfs_quota.
      If you query period or quota from config file, the value 0 means it does not set
      in the config file.
      If you set period or quota to config file, the value 0 means that delete current
      setting from config file.
      If you modify period or quota while vm is running, the value 0 means that use
      current value.
      67a173c5
    • W
      qemu: Implement period and quota tunable XML configuration and parsing · c4441fee
      Wen Congyang 提交于
      This patch implements period and quota tunable XML configuration and parsing.
      A quota or period of zero will be simply ignored.
      c4441fee
    • W
      Update XML Schema for new entries · f27f62ca
      Wen Congyang 提交于
      Define the element cputune's child elements 'period' and 'quota':
      <cputune>
        <period>100000</period>
        <quota>50000</quota>
      </cputune>
      f27f62ca
    • W
      cgroup: Implement cpu.cfs_period_us and cpu.cfs_quota_us tuning API · fd7c1723
      Wen Congyang 提交于
      This patch provides 4 APIs to get and set cpu.cfs_period_us and cpu.cfs_quota_us.
      fd7c1723
    • W
      Introduce the function virCgroupForVcpu · 8e64f873
      Wen Congyang 提交于
      Introduce the function virCgroupForVcpu() to create sub directory for each vcpu.
      8e64f873
    • L
      qemu: send-key: Implement the driver methods · e4072577
      Lai Jiangshan 提交于
      qemu driver just accept xt_kbd codeset's keycode, so the lib virtkey
      is used for translating keycodes from other codesets
      e4072577
    • L
      send-key: Expose the new API in virsh · 7818b7ef
      Lai Jiangshan 提交于
      Also support string names for the linux keycode(auto detect)
      * tools/virsh.c: add new command "send-key"
      * tools/virsh.pod: documents the new command
      7818b7ef
    • L
      util: add virtkeycode module · 0bbf87e9
      Lai Jiangshan 提交于
      Add virtkey lib for usage-improvment and keycode translating.
      Add 4 internal API for the aim
      
      const char *virKeycodeSetTypeToString(int codeset);
      int virKeycodeSetTypeFromString(const char *name);
      int virKeycodeValueFromString(virKeycodeSet codeset, const char *keyname);
      int virKeycodeValueTranslate(virKeycodeSet from_codeset,
                                   virKeycodeSet to_offset,
                                   int key_value);
      
      * include/libvirt/libvirt.h.in: extend virKeycodeSet enum
      * src/Makefile.am: add new virtkeycode module and rule to generate
        virkeymaps.h
      * src/util/virkeycode.c src/util/virkeycode.h: new module
      * src/util/virkeycode-mapgen.py: python generator for virkeymaps.h
        out of keymaps.csv
      * src/libvirt_private.syms: extend private symbols for new module
      * .gitignore: add generated virkeymaps.h
      0bbf87e9
    • L
      util: Add keymaps.csv · 1151f0ee
      Lai Jiangshan 提交于
      Should keep it as the same as:
      http://git.gnome.org/browse/gtk-vnc/commit/src/keymaps.csv
      
      All master  keymaps are defined in a CSV file. THis covers
      Linux keycodes, OSX keycodes, AT set1, 2 & 3, XT keycodes,
      the XT encoding used by the Linux KBD driver, USB keycodes,
      Win32 keycodes, the XT encoding used by Xorg on Cygwin,
      the XT encoding used by Xorg on Linux with kbd driver.
      
      * src/Makefile.am: added to EXTRA_DIST
      * src/util/keymaps.csv: new file
      1151f0ee
    • E
      maint: fix typos on guaranteed · a7143405
      Eric Blake 提交于
      * src/conf/domain_event.c (virDomainEventDispatch): Fix typo.
      * src/internal.h (ATTRIBUTE_FMT_PRINTF): Likewise.
      * src/libvirt.c (virStreamEventUpdateCallback): Likewise.
      * src/remote/remote_driver.c (doRemoteOpen): Likewise.
      * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
      Likewise.
      * src/util/virterror.c (virConnCopyLastError, virCopyLastError):
      Likewise.
      * src/xen/xend_internal.h (xend_wait_for_devices): Likewise.
      a7143405
    • C
      rpc: Pass through DISPLAY so ssh can launch askpass · e0a21dfe
      Cole Robinson 提交于
      Though we prefer users to have SSH keys setup, virt-manager users still
      depend on remote SSH connections to launch a password dialog. This fixes
      launch ssh-askpass
      
      Fix suggested by danpb
      e0a21dfe
  2. 20 7月, 2011 14 次提交
    • M
      sysinfo: Don't try to run dmidecode on archs missing it · 670c9f77
      Michal Privoznik 提交于
      DMI table is Intel & Intel-compatible specific. Therefore other
      architectures miss dmidecode command. So we always fail in searching
      for that command on non-Intel architectures.
      670c9f77
    • G
      Don't try to close a NULL virNetClientPtr · b14800af
      Guannan Ren 提交于
      * src/rpc/virnetclient.c: Skip close attempt if virNetClientPtr
        is NULL
      b14800af
    • D
      Honour key usage/purpose criticality flag · 14800d49
      Daniel P. Berrange 提交于
      If a key purpose or usage field is marked as non-critical in the
      certificate, then a data mismatch is not (ordinarily) a cause for
      rejecting the connection
      
      * src/rpc/virnettlscontext.c: Honour key usage/purpose criticality
      14800d49
    • D
      Fix checking of key usage/purpose data · f53cc36f
      Daniel P. Berrange 提交于
      If key usage or purpose data is not present in the cert, the
      RFC recommends that access be allowed. Also fix checking of
      key usage to include requirements for client/server certs,
      and fix key purpose checking to treat data as a list of bits
      f53cc36f
    • D
      Fix mixed up error messages when reporting TLS certificate problems · 3ea04325
      Daniel P. Berrange 提交于
      * src/rpc/virnettlscontext.c: Fix mixed up error messages
      3ea04325
    • M
      udev: Don't try to dump DMI on non-intel archs · 4f550a12
      Michal Privoznik 提交于
      DMI is Intel & Intel-compatible specific. Don't try to dump information
      on non-compatible architectures, which results only in error message in
      logs.
      4f550a12
    • E
      build: fix broken build · 57495330
      Eric Blake 提交于
      * src/libxl/libxl_driver.c (libxlDomainUndefineFlags): Use correct
      enum value.
      * src/remote_protocol-structs (remote_procedure): Likewise.
      57495330
    • O
      undefine: Extend virsh undefine to support the new flag · 83e849c1
      Osier Yang 提交于
      If the domain has managed save image, and --managed-save is
      not specified, then it fails with an error telling the user
      that a managed save image still exists.
      
      If the domain has managed save image, and --managed-save is
      specified, it invokes virDomainUndefineFlags. If
      virDomainUndefineFlags fails, then it tries to remove the managed
      save image using virDomainManagedSaveRemove first, with
      invoking virDomainUndefine following. (For compatibility between
      new virsh with this patch and older libvirt without this patch).
      
      Similarly if the domain has no managed save image. See the codes for
      detail.
      
      NOTE: Have not removing the codes checking if the domain is running
      in function "cmdUndefine", it will go along with qemu driver's fix
      (allow to undefine a running domain).
      83e849c1
    • O
      39babffb
    • O
      undefine: Implement internal API for libxl driver · 67d33735
      Osier Yang 提交于
      * src/libxl/libxl_driver.c: New callback for libxl_driver,
      new function libxlDomainUndefineFlags, and changes libxlDomainUndefine
      as a wrapper of libxlDomainUndefineFlags.
      67d33735
    • O
      undefine: Implement internal API for qemu driver · ae8e08aa
      Osier Yang 提交于
      * src/qemu/qemu_driver.c: New call back for qemu_driver,
      New function qemudDomainUndefineFlags, and changes on
      qemudDomainUndefine.
      ae8e08aa
    • O
      undefine: Wire up the remote protocol · 0f8552a2
      Osier Yang 提交于
      0f8552a2
    • O
      undefine: Define the new API · b26a9fa9
      Osier Yang 提交于
      This introduces a new API virDomainUndefineFlags to control the
      domain undefine process, as the existing API virDomainUndefine
      doesn't support flags.
      
      Currently only flag VIR_DOMAIN_UNDEFINE_MANAGED_SAVE is supported.
      If the domain has a managed save image, including
      VIR_DOMAIN_UNDEFINE_MANAGED_SAVE in @flags will also remove that
      file, and omitting the flag will cause undefine process to fail.
      
      This patch also changes the behavior of virDomainUndefine, if the
      domain has a managed save image, the undefine will be refused.
      b26a9fa9
    • E
      maint: fix spelling of Red Hat · f81f63cd
      Eric Blake 提交于
      * cfg.mk (sc_copyright_format): Add to rule.
      * src/util/files.h: Fix offenders.
      * src/util/files.c: Likewise.
      f81f63cd
  3. 19 7月, 2011 14 次提交
    • D
      Add sanity checking of basic constraints, key purpose & key usage · 79591d4f
      Daniel P. Berrange 提交于
      Gnutls requires that certificates have basic constraints present
      to be used as a CA certificate. OpenSSL doesn't add this data
      by default, so add a sanity check to catch this situation. Also
      validate that the key usage and key purpose constraints contain
      correct data
      
      * src/rpc/virnettlscontext.c: Add sanity checking of certificate
        constraints
      79591d4f
    • D
      Add some basic sanity checking of certificates before use · 543c266d
      Daniel P. Berrange 提交于
      If the libvirt daemon or libvirt client is configured with bogus
      certificates, it is very unhelpful to only find out about this
      when a TLS connection is actually attempted. Not least because
      the error messages you get back for failures are incredibly
      obscure.
      
      This adds some basic sanity checking of certificates at the
      time the virNetTLSContext object is created. This is at libvirt
      startup, or when creating a virNetClient instance.
      
      This checks that the certificate expiry/start dates are valid
      and that the certificate is actually signed by the CA that is
      loaded.
      
      * src/rpc/virnettlscontext.c: Add certificate sanity checks
      543c266d
    • D
      Fix reporting of errors for p2p migration · 789fc4ae
      Daniel P. Berrange 提交于
      Starting/ending jobs when closing the connection may reset any
      error which was reported earlier in p2p migration. We must
      save the original error before doing so. This means we can also
      just call virConnectClose as normal, instead of virUnrefConnect
      
      * src/qemu/qemu_migration.c: Preserve errors in p2p migration
      789fc4ae
    • D
      Add an explicit virNetClientClose method · e06c8ede
      Daniel P. Berrange 提交于
      Since the I/O callback registered against virNetSocket will
      hold a reference on the virNetClient, we can't rely on the
      virNetClientFree to be able to close the network connection.
      The last reference will only go away when the event callback
      fires (likely due to EOF from the server).
      
      This is sub-optimal and can potentially cause a leak of the
      virNetClient object if the server were to not explicitly
      close the socket itself
      
      * src/remote/remote_driver.c: Explicitly close the client
        object when disconnecting
      * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add a
        virNetClientClose method
      e06c8ede
    • D
      Use a virFreeCallback on virNetSocket to ensure safe release · 7ea2ef4c
      Daniel P. Berrange 提交于
      When unregistering an I/O callback from a virNetSocket object,
      there is still a chance that an event may come in on the callback.
      In this case it is possible that the virNetSocket might have been
      freed already. Make use of a virFreeCallback when registering
      the I/O callbacks and hold a reference for the entire time the
      callback is set.
      
      * src/rpc/virnetsocket.c: Register a free function for the
        file handle watch
      * src/rpc/virnetsocket.h, src/rpc/virnetserverservice.c,
        src/rpc/virnetserverclient.c, src/rpc/virnetclient.c: Add
        a free function for the socket I/O watches
      7ea2ef4c
    • D
      Add mutex locking and reference counting to virNetSocket · 6198f3a1
      Daniel P. Berrange 提交于
      Remove the need for a virNetSocket object to be protected by
      locks from the object using it, by introducing its own native
      locking and reference counting
      
      * src/rpc/virnetsocket.c: Add locking & reference counting
      6198f3a1
    • D
      Add some debugging for virNetClient reference counting · 06c0d184
      Daniel P. Berrange 提交于
      * src/rpc/virnetclient.c: Add debugging of ref counts
      06c0d184
    • E
      build: detect doc generation failure · 97ee0953
      Eric Blake 提交于
      Commit 8665f855 introduced a slight regression in doc generation,
      since make only quits a rule on the first failed command ending
      with a newline rather than a semicolon.
      
      * docs/Makefile.am (html/index.html): Don't use xmllint unless
      xsltproc succeeded.
      * .gitignore: Ignore recently updated stamp file name.
      97ee0953
    • A
      util: avoid fds leak when virEventPollAddHandle fail · 463e8c2f
      Alex Jia 提交于
      * src/util/event_poll.c: avoid file descriptors leak when
        virEventPollAddHandle fail on virEventPollInit function.
      463e8c2f
    • E
      Revert "virsh: make migrate --tunnelled imply --p2p" · 74594c57
      Eric Blake 提交于
      This reverts commit 40143fb6.
      
      The patch prevents future compatibility if migration ever learns
      how to do tunnelled without p2p.
      74594c57
    • D
      Unregister event callback if a fatal error occurs during dispatch · 07b39a94
      Daniel P. Berrange 提交于
      If we get an I/O error in the async event callback for an RPC
      client, we might not have consumed all pending data off the
      wire. This could result in the callback being immediately
      invoked again. At which point the same I/O might occur. And
      we're invoked again. And again...And again...
      
      Unregistering the async event callback if an error occurs is
      a good safety net. The real error will be seen when the next
      RPC method is invoked
      
      * src/rpc/virnetclient.c: Unregister event callback on error
      07b39a94
    • D
      Quieten build & ensure API build scripts exit with non-zero status · 8665f855
      Daniel P. Berrange 提交于
      The current API build scripts will continue and exit with a zero
      status even if they find problems. This has been the cause of many
      build problems, or hidden build errors, in the past. Change the
      scripts so they always exit with a non-zero status for any problems
      they do not understand. Also turn off all debug output by default
      so they respect $(AM_V_GEN)
      
      * docs/Makefile.am: Use $(AM_V_GEN) for API/HTML scripts
      * docs/apibuild.py, python/generator.py: Exit with non-zero status
        if problems are found. Also be silent, not outputting any debug
        messages.
      * src/Makefile.am: Use $(AM_V_GEN) for ESX generator
      * python/Makefile.am: Tweak rule
      8665f855
    • O
      tests: Fix virshtest failure after dominfo changed · fff9d71a
      Osier Yang 提交于
      Caused by the new changed "dominfo" command.
      fff9d71a
    • O
      virsh: Extend virsh dominfo to display if managed save image exists · 73d4625a
      Osier Yang 提交于
      * tools/virsh.c: new column "Managed save" for "cmdDominfo".
      * tools/virsh.pod: Update document of "managedsave" to tell one can
        use "dominfo" to query whether a domain has any managed save image.
      73d4625a