1. 24 11月, 2016 1 次提交
  2. 24 6月, 2016 8 次提交
  3. 20 6月, 2016 1 次提交
  4. 13 5月, 2016 1 次提交
  5. 03 5月, 2016 1 次提交
  6. 20 4月, 2016 1 次提交
    • C
      storage: remove support for /usr/bin/kvm-img · 487d211d
      Cole Robinson 提交于
      This an ubuntu/debian packaging convention. At one point it may have
      been an actually different binary, but at least as of ubuntu precise
      (the oldest supported ubuntu distro, released april 2012) kvm-img is
      just a symlink to qemu-img for back compat.
      
      I think it's safe to drop support for it
      487d211d
  7. 19 3月, 2016 1 次提交
  8. 10 3月, 2016 2 次提交
  9. 04 11月, 2015 1 次提交
  10. 21 10月, 2015 1 次提交
  11. 14 10月, 2015 2 次提交
    • J
      storage: On error rmdir created directory in virDirCreate[NoFork] · 21eb8972
      John Ferlan 提交于
      After a successful creation of a directory, if some other call results
      in returning a failure, let's remove the directory we created to
      prevent another round trip or confusion in the caller. In particular, this
      function can be called during a storage backend buildVol, so in order
      to ensure that caller doesn't need to distinguish between failed create
      or some other failure after create, just remove the directory we created.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      21eb8972
    • J
      storage: On error unlink created file in virFileOpen{As|Forked} · 69556215
      John Ferlan 提交于
      After a successful creation of a file, if some other call results
      in returning a failure, let's unlink the file we created to prevent
      another round trip or confusion in the caller. In particular, this
      function can be called during a storage backend buildVol, so in order
      to ensure that caller doesn't need to distinguish between failed create
      or some other failure after create, just remove the volume we created.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      69556215
  12. 05 10月, 2015 2 次提交
    • J
      virfile: Fix error path for forked virFileRemove · cb19cff4
      John Ferlan 提交于
      As it turns out the caller in this case expects a return < 0 for failure
      and to get/use "errno" rather than using the negative of returned status.
      Again different than the create path.
      
      If someone "deleted" a file from the pool without using virsh vol-delete,
      then the unlink/rmdir would return an error (-1) and set errno to ENOENT.
      The caller checks errno for ENOENT when determining whether to throw an
      error message indicating the failure.  Without the change, the error
      message is:
      
      error: Failed to delete vol $vol
      error: cannot unlink file '/$pathto/$vol': Success
      
      This patch thus allows the fork path to follow the non-fork path
      where unlink/rmdir return -1 and errno.
      cb19cff4
    • J
      virfile: Add extra check for direct delete in virFileRemove · c6b32d68
      John Ferlan 提交于
      Unlike create options, if the file to be removed is already in the
      pool, then the uid/gid will come from the pool. If it's the same as the
      currently running process, then just do the unlink/rmdir directly
      rather than going through the fork processing unnecessarily
      c6b32d68
  13. 21 9月, 2015 4 次提交
  14. 16 9月, 2015 1 次提交
    • J
      virfile: Check for existence of dir in virFileDeleteTree · b421a708
      John Ferlan 提交于
      Commit id 'f1f68ca3' added code to remove the directory paths for
      auto-generated sockets, but that code could be called before the
      paths were created resulting in generating error messages from
      virFileDeleteTree indicating that the file doesn't exist.
      
      Rather than "enforce" all callers to make the non-NULL and existence
      checks, modify the virFileDeleteTree API to silently ignore NULL on
      input and non-existent directory trees.
      b421a708
  15. 08 9月, 2015 1 次提交
  16. 05 9月, 2015 1 次提交
    • J
      virfile: Avoid Coverity IDENTICAL_BRANCHES error · 53caf99d
      John Ferlan 提交于
      In virFileNBDDeviceFindUnused if virFileNBDDeviceIsBusy returns 0,
      then both branches jumped to cleanup, so just use ignore_value
      since the function returns NULL or some memory and the caller
      handles the error.
      53caf99d
  17. 02 9月, 2015 2 次提交
    • J
      virfile: Introduce virFileUnlink · 35847860
      John Ferlan 提交于
      In an NFS root-squashed environment the 'vol-delete' command will fail to
      'unlink' the target volume since it was created under a different uid:gid.
      
      This code continues the concepts introduced in virFileOpenForked and
      virDirCreate[NoFork] with respect to running the unlink command under
      the uid/gid of the child. Unlike the other two, don't retry on EACCES
      (that's why we're here doing this now).
      35847860
    • J
      virfile: Add error for root squash change mode failure · 1fafc1bc
      John Ferlan 提交于
      This will only be seen when debugging, but in order to help determine
      whether a virFileOpenForceOwnerMode failed during an NFS root-squash
      volume/file creation, add an error message from the child.
      1fafc1bc
  18. 30 7月, 2015 2 次提交
  19. 16 6月, 2015 3 次提交
    • E
    • E
      util: virfile: Fix 'unknown cause' error if NFS mount point creation fails · e9478d9a
      Erik Skultety 提交于
      This happens if user requires creation of a directory with specified
      UID/GID permissions. To accomplish this, we use fork approach and
      set particular UID/GID permissions in child process. However, child
      process doesn't have a valid descriptor to a logfile (this is prohibited
      explicitly) and since parent process doesn't handle negative exit codes from
      child in any way, 'uknown cause' error is returned to the user.
      
      Commit 92d9114e tweaked the way we handle child errors when using fork
      approach to set specific permissions (features originally introduced
      by 98f6f381). The same logic should be used to create directories with
      specified permissions as well.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1230137
      e9478d9a
    • E
      util: virDirCreate: Child now exits with positive errno-code · fdcb057a
      Erik Skultety 提交于
      Previous patch of this series proposed a fix to virDirCreate, so that parent
      process reports an error if child process failed its task.
      However our logic still permits the child to exit with negative errno followed
      by a check of the status on the parent side using WEXITSTATUS which, being
      POSIX compliant, takes the lower 8 bits of the exit code and returns is to
      the caller. However, by taking 8 bits from a negative exit code
      (two's complement) the status value we read and append to stream is
      '2^8 - abs(original exit code)' which doesn't quite reflect the real cause when
      compared to the meaning of errno values.
      fdcb057a
  20. 26 5月, 2015 1 次提交
  21. 20 5月, 2015 2 次提交
  22. 05 5月, 2015 1 次提交
    • C
      storage: fs: Don't try to chown directory unless user requested · 28c547ed
      Cole Robinson 提交于
      Currently we try to chown any directory passed to virDirCreate,
      even if the user didn't request any explicit owner/group via the
      pool/vol XML.
      
      This causes issues with qemu:///session: try to build a pool of
      a root owned directory like /tmp, and it fails trying to chown the
      directory to the session user. Instead it should just leave things
      as they are, unless the user requests changing permissions via
      the pool XML.
      
      Similarly this is annoying if creating a storage pool via system
      libvirtd of an existing directory in user $HOME, it's now owned
      by root.
      
      The virDirCreate function is pretty convoluted, since it needs to
      fork off in certain specific cases. Try to document that, to make
      it clear where exactly we are changing behavior.
      28c547ed