1. 18 12月, 2015 15 次提交
  2. 17 12月, 2015 19 次提交
    • J
      mark virDomainVirtioSerialAddrSetAddController as static. · 22f9754f
      Ján Tomko 提交于
      This function is no longer used outside domain_addr.c
      22f9754f
    • J
      Remove dead code from qemuDomainAttachControllerDevice · 36d7a361
      Ján Tomko 提交于
      We only support hotplugging SCSI controllers.
      The USB and virtio-serial related code was never reachable because
      this function was only called for VIR_DOMAIN_CONTROLLER_TYPE_SCSI
      controllers.
      
      This reverts commit ee0d97a7 and parts of commits 16db8d2e
      and d6d54cd1.
      36d7a361
    • J
      qemu_hotplug: remove qemuDomainAttachDeviceControllerLive · aaa42d90
      Ján Tomko 提交于
      This function calls qemuDomainAttachControllerDevice for SCSI
      controllers and reports an error for all other controllers.
      
      Move the error inside qemuDomainAttachControllerDevice and delete this
      wrapper.
      aaa42d90
    • C
      Allow building lxc without virt-login-shell · bec787ee
      Cédric Bosdonnat 提交于
      Add a configure option to disable virt-login-shell build even if lxc is
      enabled.
      bec787ee
    • J
      storage: Fix startup issue for logical pool · 8c865052
      John Ferlan 提交于
      Commit id '71b803ac' assumed that the storage pool source device path
      was required for a 'logical' pool. This resulted in a failure to start
      a pool without any device path defined.
      
      So, adjust the virStorageBackendLogicalMatchPoolSource logic to
      return success if at least the pool name matches the vgs output
      when no pool source device path is/are provided.
      8c865052
    • J
      qemu: Fix event generated for qemuDomainRevertToSnapshot (pause->run) · 5efcfb96
      John Ferlan 提交于
      A closer review of the code shows that for the transition from paused to
      running which was supposed to emit the VIR_DOMAIN_EVENT_RESUMED - no event
      would be generated. Rather the event is generated when going from running
      to running.
      
      Following the 'was_running' boolean shows it is set when the domain obj
      is active and the domain obj state is VIR_DOMAIN_RUNNING. So rather than
      using was_running to generate the RESUMED event, use !was_running
      5efcfb96
    • J
      storage: Attempt to refresh volume after successful wipe volume · 80ca86e5
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1270709
      
      When a volume wipe is successful, perform a volume refresh afterwards to
      update any volume data that may be used in future volume commands, such as
      volume resize.  For a raw file volume, a wipe could truncate the file and
      a followup volume resize the capacity may fail because the volume target
      allocation isn't updated to reflect the wipe activity.
      80ca86e5
    • J
      virStorageBackendWipeLocal: remove bytes_wiped argument · f61770a1
      Ján Tomko 提交于
      It is not used by the caller.
      f61770a1
    • J
      storage: drop 'Extent' from virStorageBackendWipeExtentLocal · c3f7371c
      Ján Tomko 提交于
      The only caller always passes 0 for the extent start.
      Drop the 'extent_start' parameter, as well as the mention of extents
      from the function name.
      
      Change off_t extent_length to unsigned long long wipe_len, as well as the
      'remain' variable.
      c3f7371c
    • J
      storage: move buffer allocation inside virStorageBackendWipeExtentLocal · 4bccdf0c
      Ján Tomko 提交于
      We do not need to pass a zero-filled buffer as an argument,
      the function can allocate its own.
      4bccdf0c
    • J
      storage: fix return values of virStorageBackendWipeExtentLocal · 09cbfc04
      Ján Tomko 提交于
      Return -1:
      * on all failures of fdatasync. Instead of propagating -errno
        all the way up to the virStorageVolWipe API, which is documented
        to return 0 or -1.
      * after a partial wipe. If safewrite failed, we would re-use the
        non-negative return value of lseek (which should be 0 in this case,
        because that's the only offset we seek to).
      09cbfc04
    • A
      qemu: Replace Mlock with MemLock in function names · 242e3ea4
      Andrea Bolognani 提交于
      MemLock is already used in other modules and, while still an
      abbreviation, is not ambiguous.
      242e3ea4
    • A
      qemu: Allow qemuDomainAdjustMaxMemLock() to restore previous value · afbe1d4c
      Andrea Bolognani 提交于
      When the function changes the memory lock limit for the first time,
      it will retrieve the current value and store it inside the
      virDomainObj for the domain.
      
      When the function is called again, if memory locking is no longer
      needed, it will be able to restore the memory locking limit to its
      original value.
      afbe1d4c
    • A
      qemu: Reduce memlock limit after detaching PCI hostdev · b583e80c
      Andrea Bolognani 提交于
      We increase the limit before plugging in a PCI hostdev or a memory
      module because some memory might need to be locked due to eg. VFIO.
      
      Of course we should do the opposite after unplugging a device: this
      was already the case for memory modules, but not for PCI hostdevs.
      b583e80c
    • A
      qemu: Use qemuDomainAdjustMaxMemLock() · 65909c79
      Andrea Bolognani 提交于
      Replace all uses of the qemuDomainRequiresMlock/virProcessSetMaxMemLock
      combination with the equivalent qemuDomainAdjustMaxMemLock() call.
      65909c79
    • A
      qemu: Add qemuDomainAdjustMaxMemLock() · ac7e4df4
      Andrea Bolognani 提交于
      This function detects whether a domain needs RLIMIT_MEMLOCK
      to be set, and if so, uses an appropriate value.
      ac7e4df4
    • A
      process: Add virProcessGetMaxMemLock() · bbefc9cc
      Andrea Bolognani 提交于
      This function can be used to retrieve the current locked memory
      limit for a process, so that the setting can be later restored.
      
      Add a configure check for getrlimit(), which we now use.
      bbefc9cc
    • A
      process: Allow virProcessPrLimit() to get current limit · c2f79754
      Andrea Bolognani 提交于
      The prlimit() function allows both getting and setting limits for
      a process; expose the same functionality in our wrapper.
      
      Add the const modifier for new_limit, in accordance with the
      prototype for prlimit().
      c2f79754
    • E
      build: disable vbox on cygwin · df2fadfc
      Eric Blake 提交于
      Cygwin cannot build the vbox driver yet:
      
        CC       vbox/libvirt_driver_vbox_impl_la-vbox_glue.lo
      In file included from vbox/vbox_glue.c:27:0:
      vblox/vbox_XPCOMCGlue.c:63:3: error: #error "Port me"
       # error "Port me"
         ^
      In file included from vbox/vbox_XPCOMCGlue.c:45:0,
                       from vbox/vbox_glue.c:27:
      vbox/vbox_XPCOMCGlue.c: In function 'tryLoadOne':
      vbox/vbox_XPCOMCGlue.c:98:46: error: 'DYNLIB_NAME' undeclared (first use in this function)
               if (virAsprintf(&name, "%s/%s", dir, DYNLIB_NAME) < 0)
      	                                      ^
      ./util/virstring.h:245:31: note: in definition of macro 'virAsprintf'
                               strp, __VA_ARGS__)
      			       ^
      
      Rather than trying to figure out how to get dynamic loading of
      vbox to work under cygwin (since I don't even have a working vbox
      setup to test whether it works), I'm going to be lazy and just
      default to not even trying vbox on cygwin.
      df2fadfc
  3. 16 12月, 2015 6 次提交
    • M
      qemu: Search all nodes for shared memory access · 68d4245d
      Martin Kletzander 提交于
      In commit 686eb7a2, the break was not considered part of the
      condition, hence breaking after first node when searching.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      68d4245d
    • A
      pci: Use virPCIDeviceAddress in virPCIDevice · 77434541
      Andrea Bolognani 提交于
      Instead of replicating the information (domain, bus, slot, function)
      inside the virPCIDevice structure, use the already-existing
      virPCIDeviceAddress structure.
      
      For users of the module, this means that the object returned by
      virPCIDeviceGetAddress() can no longer be NULL and must no longer
      be freed by the caller.
      77434541
    • I
      libxl: Use libxentoollog in preference to libxenctrl if available. · 716be257
      Ian Campbell 提交于
      Upstream Xen is in the process of splitting the (stable API) xtl_*
      interfaces out from the (unstable API) libxenctrl library and into a
      new (stable API) libxentoollog.
      
      In order to be compatible with Xen both before and after this
      transition check for xtl_createlogger_stdiostream in a libxentoollog
      library and use it if present. If it is not present assume it is in
      libxenctrl.
      
      Compile tested on Xen 4.6 and a development tree with the split in
      place.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      716be257
    • J
      libxl: implement virDomainGetJobStats · b7b43919
      Joao Martins 提交于
      Introduces support for domainGetJobStats which has the same
      info as domainGetJobInfo but in a slightly different format.
      Another difference is that virDomainGetJobStats can also
      retrieve info on the most recently completed job. Though so
      far this is only used in the source node to know if the
      migration has been completed. But because we don't support
      completed jobs we will deliver an error.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      b7b43919
    • J
      libxl: implement virDomainGetJobInfo · ad716651
      Joao Martins 提交于
      Introduce support for domainGetJobInfo to get info about the
      ongoing job. If the job is active it will update the
      timeElapsed which is computed with the "started" field added to
      struct libxlDomainJobObj.  For now we support just the very basic
      info and all jobs have VIR_DOMAIN_JOB_UNBOUNDED (i.e. no completion
      time estimation) plus timeElapsed computed.
      
      Openstack Kilo uses the Job API to monitor live-migration
      progress which is currently nonexistent in libxl driver and
      therefore leads to a crash in the nova compute node. Right
      now, migration doesn't use jobs in the source node and will
      return VIR_DOMAIN_JOB_NONE. Though nova handles this case and
      will migrate it properly instead of crashing.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      ad716651
    • J
      storage: Add helper to compare logical pool def against pvs output · 71b803ac
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1025230
      
      Add a new helper virStorageBackendLogicalMatchPoolSource to compare the
      pool's source name against the output from a 'pvs' command to list all
      volume group physical volume data on the host.  In addition, compare the
      pool's source device list against the particular volume group's device
      list to ensure the source device(s) listed for the pool match what the
      was listed for the volume group.
      
      Then for pool startup or check API's we need to call this new API in
      order to ensure that the pool we're about to start or declare active
      during checkPool has a valid definition vs. the running host.
      71b803ac