1. 25 4月, 2013 2 次提交
  2. 24 4月, 2013 7 次提交
  3. 20 4月, 2013 1 次提交
    • E
      docs: fix usage of 'onto' · 1bf25ba2
      Eric Blake 提交于
      http://www.uhv.edu/ac/newsletters/writing/grammartip2009.07.01.htm
      (and several other sites) give hints that 'onto' is best used if
      you can also add 'up' just before it and still make sense. In many
      cases in the code base, we really want the two-word form, or even
      a simplification to just 'on' or 'to'.
      
      * docs/hacking.html.in: Use correct 'on to'.
      * python/libvirt-override.c: Likewise.
      * src/lxc/lxc_controller.c: Likewise.
      * src/util/virpci.c: Likewise.
      * daemon/THREADS.txt: Use simpler 'on'.
      * docs/formatdomain.html.in: Better usage.
      * docs/internals/rpc.html.in: Likewise.
      * src/conf/domain_event.c: Likewise.
      * src/rpc/virnetclient.c: Likewise.
      * tests/qemumonitortestutils.c: Likewise.
      * HACKING: Regenerate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1bf25ba2
  4. 19 4月, 2013 1 次提交
  5. 18 4月, 2013 1 次提交
  6. 17 4月, 2013 2 次提交
    • O
      qemu: Allow the disk wwn to have "0x" prefix · 09d2547f
      Osier Yang 提交于
      The recent qemu requires "0x" prefix for the disk wwn, this patch
      changes virValidateWWN to allow the prefix, and prepend "0x" if
      it's not specified. E.g.
      
      qemu-kvm: -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
      drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,wwn=6000c60016ea71ad:
      Property 'scsi-hd.wwn' doesn't take value '6000c60016ea71ad'
      
      Though it's a qemu regression, but it's nice to allow the prefix,
      and doesn't hurt for us to always output "0x".
      09d2547f
    • O
      cleanup: Only include testutils.h once · 2beae9c2
      Osier Yang 提交于
      No reason to include it in both "if" and "else" branches.
      2beae9c2
  7. 16 4月, 2013 9 次提交
    • J
      Resolve valgrind error · c3ad5a36
      John Ferlan 提交于
      Commit id '1acfc171' resulted in the following valgrind failure:
      
      ==25317== 136 (24 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4
      ==25317==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
      ==25317==    by 0x4C6F851: virAlloc (viralloc.c:124)
      ==25317==    by 0x4C71493: virBitmapNew (virbitmap.c:74)
      ==25317==    by 0x4C71B79: virBitmapNewData (virbitmap.c:434)
      ==25317==    by 0x402EF2: test8 (virbitmaptest.c:436)
      ==25317==    by 0x40499F: virtTestRun (testutils.c:157)
      ==25317==    by 0x402E8D: mymain (virbitmaptest.c:474)
      ==25317==    by 0x404FDA: virtTestMain (testutils.c:719)
      ==25317==    by 0x39D0821A04: (below main) (in /usr/lib64/libc-2.16.so)
      c3ad5a36
    • D
      Track symlinks for co-mounted cgroup controllers · 83336118
      Daniel P. Berrange 提交于
      If a cgroup controller is co-mounted with another, eg
      
         /sys/fs/cgroup/cpu,cpuacct
      
      Then it is a requirement that there exist symlinks at
      
         /sys/fs/cgroup/cpu
         /sys/fs/cgroup/cpuacct
      
      pointing to the real mount point. Add support to virCgroupPtr
      to detect and track these symlinks
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      83336118
    • D
      Remove non-functional code for setting up non-root cgroups · 767596bd
      Daniel P. Berrange 提交于
      The virCgroupNewDriver method had a 'bool privileged' param.
      If a false value was ever passed in, it would simply not
      work, since non-root users don't have any privileges to create
      new cgroups. Just delete this broken code entirely and make
      the QEMU driver skip cgroup setup in non-privileged mode
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      767596bd
    • D
      Add XML config for resource partitions · 8d4adf3e
      Daniel P. Berrange 提交于
      Allow VMs to be placed into resource groups using the
      following syntax
      
        <resource>
          <partition>/virtualmachines/production</partition>
        </resource>
      
      A resource cgroup will be backed by some hypervisor specific
      functionality, such as cgroups with KVM/LXC.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8d4adf3e
    • D
      Add a new virCgroupNewPartition for setting up resource partitions · aa8604dd
      Daniel P. Berrange 提交于
      A resource partition is an absolute cgroup path, ignoring the
      current process placement. Expose a virCgroupNewPartition API
      for constructing such cgroups
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      aa8604dd
    • D
      Refactor cgroups internal data structures · 8d1c141a
      Daniel P. Berrange 提交于
      Currently the virCgroupPtr struct contains 3 pieces of
      information
      
       - path - path of the cgroup, relative to current process'
         cgroup placement
       - placement - current process' placement in each controller
       - mounts - mount point of each controller
      
      When reading/writing cgroup settings, the path & placement
      strings are combined to form the file path. This approach
      only works if we assume all cgroups will be relative to
      the current process' cgroup placement.
      
      To allow support for managing cgroups at any place in the
      heirarchy a change is needed. The 'placement' data should
      reflect the absolute path to the cgroup, and the 'path'
      value should no longer be used to form the paths to the
      cgroup attribute files.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8d1c141a
    • D
      Add a test suite for cgroups functionality · d1452470
      Daniel P. Berrange 提交于
      Some aspects of the cgroups setup / detection code are quite subtle
      and easy to break. It would greatly benefit from unit testing, but
      this is difficult because the test suite won't have privileges to
      play around with cgroups. The solution is to use monkey patching
      via LD_PRELOAD to override the fopen, open, mkdir, access functions
      to redirect access of cgroups files to some magic stubs in the
      test suite.
      
      Using this we provide custom content for the /proc/cgroup and
      /proc/self/mounts files which report a fixed cgroup setup. We
      then override open/mkdir/access so that access to the cgroups
      filesystem gets redirected into files in a temporary directory
      tree in the test suite build dir.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d1452470
    • D
      Conditionally compile storagevolxml2argvtest · b7f1d218
      Daniel P. Berrange 提交于
      Only compile storagevolxml2argvtest if WITH_STORAGE is
      set, because it links to that driver
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b7f1d218
    • D
      Conditionalize use of symlink() function in test suite · c78a2b13
      Daniel P. Berrange 提交于
      On Win32 symlink() is not available, so virstoragetest.c
      must be conditionalized to avoid compile failures.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      c78a2b13
  8. 13 4月, 2013 1 次提交
  9. 12 4月, 2013 1 次提交
    • L
      Add USB option capability · a6e37aed
      Li Zhang 提交于
      To avoid the collision for creating USB controllers in machine->init()
      and -device xx command line, it needs to set usb=off to avoid one USB
      controller created in machine->init(). So that libvirt can use -device
      or -usb to create USB controller sucessfully.
      So QEMU_CAPS_MACHINE_USB_OPT capability is added, and it is for QEMU
      v1.3.0 onwards which supports USB option.
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      a6e37aed
  10. 09 4月, 2013 1 次提交
    • B
      Implement support for <hostdev caps=net> · 442d6a05
      Bogdan Purcareata 提交于
      This allows a container-type domain to have exclusive access to one of
      the host's NICs.
      
      Wire <hostdev caps=net> with the lxc_controller - when moving the newly
      created veth devices into a new namespace, also look for any hostdev
      devices that should be moved. Note: once the container domain has been
      destroyed, there is no code that moves the interfaces back to the
      original namespace. This does happen, though, probably due to default
      cleanup on namespace destruction.
      Signed-off-by: NBogdan Purcareata <bogdan.purcareata@freescale.com>
      442d6a05
  11. 08 4月, 2013 6 次提交
    • O
      Support seclabels for volume type disk · 664270b8
      Osier Yang 提交于
      "seclabels" is only valid for 'file' or 'block' type storage volume.
      664270b8
    • O
      Support startupPolicy for 'volume' disk · 43404fee
      Osier Yang 提交于
      "startupPolicy" is only valid for file type storage volume, otherwise
      it fails on starting the domain.
      43404fee
    • O
      Introduce new XMLs to specify disk source using libvirt storage · 4bc331c8
      Osier Yang 提交于
      With this patch, one can specify the disk source using libvirt
      storage like:
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw' cache='none'/>
          <source pool='default' volume='fc18.img'/>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      "seclabels" and "startupPolicy" are not supported for this new
      disk type ("volume"). They will be supported in later patches.
      
      docs/formatdomain.html.in:
        * Add documents for new XMLs
      docs/schemas/domaincommon.rng:
        * Add rng for new XMLs;
      src/conf/domain_conf.h:
        * New struct for 'volume' type disk source (virDomainDiskSourcePoolDef)
        * Add VIR_DOMAIN_DISK_TYPE_VOLUME for enum virDomainDiskType
      src/conf/domain_conf.c:
        * New helper virDomainDiskSourcePoolDefParse to parse the 'volume'
          type disk source.
        * New helper virDomainDiskSourcePoolDefFree to free the source def
          if 'volume' type disk.
      tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      tests/qemuxml2xmltest.c:
        * New test
      4bc331c8
    • O
      New XML attributes for storage pool source adapter · 9f781da6
      Osier Yang 提交于
      This introduces 4 new attributes for storage pool source adapter.
      E.g.
      
      <adapter type='fc_host' parent='scsi_host5' wwnn='20000000c9831b4b' wwpn='10000000c9831b4b'/>
      
      Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults
      to 'scsi_host' if attribute 'name' is specified. I.e. It's optional
      for 'scsi_host' adapter, for back-compat reason. However, mandatory
      for 'fc_host' adapter and any new future adapter types. Attribute
      'parent' is to specify the parent for the fc_host adapter.
      
      * docs/formatstorage.html.in:
        - Add documents for the 4 new attrs
      * docs/schemas/storagepool.rng:
        - Add RNG schema
      * src/conf/storage_conf.c:
        - Parse and format the new XMLs
      * src/conf/storage_conf.h:
        - New struct virStoragePoolSourceAdapter, replace "char *adapter" with it;
        - New enum virStoragePoolSourceAdapterType
      * src/libvirt_private.syms:
        - Export TypeToString and TypeFromString
      * src/phyp/phyp_driver.c:
        - Replace "adapter" with "adapter.data.name", which is member of the union
          of the new struct virStoragePoolSourceAdapter now. Later patch will
          add the checking, as "adapter.data.name" is only valid for "scsi_host"
          adapter.
      * src/storage/storage_backend_scsi.c:
        - Like above
      * tests/storagepoolxml2xmlin/pool-scsi-type-scsi-host.xml:
      * tests/storagepoolxml2xmlin/pool-scsi-type-fc-host.xml:
        - New test for 'fc_host' and "scsi_host" adapter
      * tests/storagepoolxml2xmlout/pool-scsi.xml:
        - Change the expected output, as the 'type' defaults to 'scsi_host' if 'name"
          specified now
      * tests/storagepoolxml2xmlout/pool-scsi-type-scsi-host.xml:
      * tests/storagepoolxml2xmlout/pool-scsi-type-fc-host.xml:
        - New test
      * tests/storagepoolxml2xmltest.c:
        - Include the test
      9f781da6
    • D
      Avoid cast alignment warnings in port allocator test · 2d777045
      Daniel P. Berrange 提交于
      To avoid
      
      virportallocatortest.c: In function 'bind':
      virportallocatortest.c:34:33: warning: cast increases required alignment of target type [-Wcast-align]
           struct sockaddr_in *saddr = (struct sockaddr_in *)addr;
                                       ^
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      2d777045
    • D
      Add a test suite for keycode mapping functions · 15d8511b
      Daniel P. Berrange 提交于
      Validate that translations between different keycode sets
      are functioning.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      15d8511b
  12. 06 4月, 2013 2 次提交
  13. 05 4月, 2013 6 次提交
    • D
      Ensure LD_PRELOAD exists before running test case · b1d3154a
      Daniel P. Berrange 提交于
      The linker will ignore LD_PRELOAD libraries which do not
      exist, just printing a warning message. This is not helpful
      for the test suite which will be utterly fubar without the
      preload library present. Add an explicit test for existence
      of the library to protect against this
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b1d3154a
    • P
      virCaps: get rid of defaultConsoleTargetType callback · 482e5f15
      Peter Krempa 提交于
      This patch refactors various places to allow removing of the
      defaultConsoleTargetType callback from the virCaps structure.
      
      A new console character device target type is introduced -
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was
      specified in the XML. This type is at the end converted to the standard
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are
      different from this default have to be processed separately in the
      device post parse callback.
      482e5f15
    • P
      virCaps: get rid of macPrefix field · 46becc18
      Peter Krempa 提交于
      Use the virDomainXMLConf structure to hold this data and tweak the code
      to avoid semantic change.
      
      Without configuration the KVM mac prefix is used by default. I chose it
      as it's in the privately administered segment so it should be usable for
      any purposes.
      46becc18
    • P
      virCaps: get rid of hasWideScsiBus · 8960d656
      Peter Krempa 提交于
      Use the virDomainXMLConf structure to hold this data.
      8960d656
    • P
      virCaps: get rid of defaultDiskDriverType · b2990849
      Peter Krempa 提交于
      Use the qemu specific callback to fill this data in the qemu driver as
      it's the only place where it was used and fix tests as the qemu test
      capability object didn't configure the defaults for the tests.
      b2990849
    • P
      virCaps: get rid of emulatorRequired · b5def001
      Peter Krempa 提交于
      This patch removes the emulatorRequired field and associated
      infrastructure from the virCaps object. Instead the driver specific
      callbacks are used as this field isn't enforced by all drivers.
      
      This patch implements the appropriate callbacks in the qemu and lxc
      driver and moves to check to that location.
      b5def001