1. 05 6月, 2015 5 次提交
    • J
      storage: Add check for valid FS types in checkPool callback · 94a1579b
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1181087
      
      The virStorageBackendFileSystemIsMounted is called from three source paths
      checkPool, startPool, and stopPool. Both start and stop validate the FS
      fields before calling *IsMounted; however the check path there is no call.
      This could lead the code into returning a true in "isActive" if for some
      reason the target path for the pool was mounted. The assumption being
      that if it was mounted, then we believe we started/mounted it.
      
      It's also of note that commit id '81165294' added an error message for
      the start/mount path regarding that the target is already mounted so
      fail the start. That check was adjusted by commit id '13fde7ce' to
      only message if actually mounted.
      
      At one time this led to the libvirtd restart autostart code to declare
      that the pool was active even though the startPool would inhibit startup
      and the stopPool would inhibit shutdown. The autostart path changed as
      of commit id '2a31c5f0' as part of the keep storage pools started between
      libvirtd restarts.
      
      This patch adds the same check made prior to start/mount and stop/unmount
      to ensure we have a valid configuration before attempting to see if the
      target is already mounted to declare "isActive" or not. Finding an improper
      configuration will now cause an error at checkPool, which should make it
      so we can no longer be left in a situation where the pool was started and
      we have no way to stop it.
      94a1579b
    • J
      storage: FS backend adjust error message on error path · fcf0fd52
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1181087
      
      Currently the assumption on the error message is that there are
      no source device paths defined when the number of devices check
      fails, but in reality the XML could have had none or it could have
      had more than the value supported. Adjust the error message accordingly
      to make it clearer what the error really is.
      fcf0fd52
    • J
      storage: Refactor storage pool type checks · 5a8c98db
      John Ferlan 提交于
      Refactor the code for both startPool (*Mount) and stopPool (*Unmount) code
      paths by introducing virStorageBackendFileSystemIsValid.
      5a8c98db
    • J
      storage: Remove extraneous @conn from function comments · 325a8134
      John Ferlan 提交于
      Over time the parameters changed, but the comment wasn't updated
      325a8134
    • E
      remote: fix odd comma operator · c7d0da23
      Eric Blake 提交于
      Commit 1882c0bd accidentally used ',' instead of ';'; oddly
      enough, the result was still syntactically valid (yes, C is
      a fun language).  But it made me do a double take; it's better
      to use idiomatic syntax.
      
      * daemon/remote.c (remoteRelayDomainEventDeviceAdded): Fix
      harmless typo.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c7d0da23
  2. 04 6月, 2015 29 次提交
  3. 03 6月, 2015 6 次提交
    • P
      util: process: Refactor and fix virProcessSetAffinity · 825df8c3
      Peter Krempa 提交于
      Refactor the function to return the bitmap instead of an integer and the
      inner workings so that they make more sense.
      
      This patch also fixes possible segfault on old systems that was
      introduced by commit:
      
      commit f1a43a8e
      Author: Hu Tao <hutao@cn.fujitsu.com>
      Date:   Fri Sep 14 15:46:59 2012 +0800
      
          use virBitmap to store cpu affinity info
      825df8c3
    • M
      util: Clear output broadcast address before filling it in · 99cc11b9
      Martin Kletzander 提交于
      Since commit 55ace7c4, the sockettest
      fails without VIR_TEST_DEBUG set.  The problem is found by test number
      42 (co-incidence?), which tests range '192.168.122.1' -
      '192.168.122.255' in network '192.168.122.0/24'.  That is supposed to
      fail because the end address is equal to the broadcast address.
      
      When comparing these two in 'virSocketAddrEqual(end, &broadcast)',
      there is a check for sin_addr as well as for sin_port.  That port,
      however, is different when we do not enable test debugging.  With the
      testing enabled, the port is 0 (correctly initialized), but without that
      it has a random number there.  And that's because the structure is not
      initialized anywhere.
      
      By zeroing the structure before filling in the info, we make sure we
      return only the address and not any information that was not requested.
      And the test work once again.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      99cc11b9
    • J
      virsh: Fix Ctrl-C behavior when watching a job · e9507fd4
      Jiri Denemark 提交于
      When watching a job (save, managedsave, dump, migrate) virsh spawns a
      thread to call the appropriate API and waits for the result while
      watching for interruption signals (SIGINT, Ctrl-C on the terminal).
      Whenever such signal is caught, virsh calls virDomainAbortJob, stops
      waiting for the job, and returns the result of virDomainAbortJob.
      
      This is wrong because the job might have finished in the meantime or it
      might have been cancelled by someone else and virsh would just report
      the failure to abort the job. However, we are not interested in the
      virDomainAbortJob's result at all, we need to keep waiting for the main
      job to finish and report its result instead.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1131755Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      e9507fd4
    • P
      qemu: process: Refactor setup of memory ballooning · f4c67f07
      Peter Krempa 提交于
      Since the monitor code now supports ullongs when setting balloon size,
      drop the legacy code with overflow checking.
      
      Additionally the comment mentioning that the job is treated as a sync
      job does not make sense any more since the monitor is entered
      asynchronously.
      f4c67f07
    • P
    • P
      monitor: Move documentation for qemuMonitorGetBalloonInfo · efe8b44a
      Peter Krempa 提交于
      Document the top level function rather than both bottom level ones. It
      makes looking the docs up quicker.
      efe8b44a