Report out-of-space, not patch-invalid
Report out-of-space, not patch-invalid

If there isn't enough space on the filesystem to upload a patch (which can take
2-3 times the size of the patch, because of multiple copies and gpg signature
checking), we should fail with an Out_of_space exception. Before, if the gpg
check failed because there wasn't enough space to write the unsigned cleartext,
we would erroneously report patch_invalid. Now we check that there is enough
free space to signature check the patch (we make a guess of 2 * size of the
patch), and catch Unix.ENOSPC exceptions and handle them accordingly.

CA-124008

Signed-off-by: Mike McClurg <d5d39725aee3103039228164deec3c7acc6f60e3@citrix.com>

vasilenkomike/xen-api,huizh/xen-api,srowe/xen-api,koushikcgit/xen-api,rafalmiel/xen-api,koushikcgit/xen-api,robertbreker/xen-api,djs55/xen-api,cheng-z/xen-api,Frezzle/xen-api,cheng-z/xen-api,salvocambria/xen-api,simonjbeaumont/xen-api,agimofcarmen/xen-api,cheng--zhang/xen-api,salvocambria/xen-api,euanh/xen-api,thomassa/xen-api,Frezzle/xen-api,thomassa/xen-api,euanh/xen-api,Frezzle/xen-api,srowe/xen-api,thomassa/xen-api,cheng-z/xen-api,anoobs/xen-api,anoobs/xen-api,euanh/xen-api,koushikcgit/xen-api,vasilenkomike/xen-api,rafalmiel/xen-api,rafalmiel/xen-api,guard163/xen-api,cheng--zhang/xen-api,guard163/xen-api,robertbreker/xen-api,thomassa/xen-api,simonjbeaumont/xen-api,cheng--zhang/xen-api,huizh/xen-api,guard163/xen-api,anoobs/xen-api,anoobs/xen-api,agimofcarmen/xen-api,djs55/xen-api,salvocambria/xen-api,robertbreker/xen-api,djs55/xen-api,vasilenkomike/xen-api,jjd27/xen-api,cheng--zhang/xen-api,jjd27/xen-api,salvocambria/xen-api,huizh/xen-api,djs55/xen-api,huizh/xen-api,agimofcarmen/xen-api,jjd27/xen-api,thomassa/xen-api,simonjbeaumont/xen-api,Frezzle/xen-api,koushikcgit/xen-api,salvocambria/xen-api,simonjbeaumont/xen-api,vasilenkomike/xen-api,simonjbeaumont/xen-api,cheng-z/xen-api,agimofcarmen/xen-api,huizh/xen-api,jjd27/xen-api,jjd27/xen-api,anoobs/xen-api,robertbreker/xen-api,cheng-z/xen-api,guard163/xen-api,simonjbeaumont/xen-api,guard163/xen-api,vasilenkomike/xen-api,robertbreker/xen-api,rafalmiel/xen-api,cheng-z/xen-api,cheng--zhang/xen-api,vasilenkomike/xen-api,rafalmiel/xen-api,srowe/xen-api,euanh/xen-api,srowe/xen-api,cheng--zhang/xen-api,robertbreker/xen-api,djs55/xen-api,Frezzle/xen-api,srowe/xen-api,agimofcarmen/xen-api,salvocambria/xen-api,koushikcgit/xen-api,euanh/xen-api,cheng--zhang/xen-api,djs55/xen-api,thomassa/xen-api,koushikcgit/xen-api,anoobs/xen-api,agimofcarmen/xen-api,huizh/xen-api,euanh/xen-api,guard163/xen-api,rafalmiel/xen-api,jjd27/xen-api,cheng-z/xen-api