Tentacle terminates with unhandled exception if no disk space available

Hi Paul,

Just had a situation where the server being deployed to ran out of disk space on the application drive, this resulted in the tentacle (1.0.14.1212) crashing out. The only thing reported in the UI was

**The inactivity timeout of (00:01:00) has been exceeded. **

In the Event logs the following Logs were created

2012-07-10 13:19:42,801 [5] ERROR Octopus [(null)] - Error while executing job: There is not enough space on the disk.

System.IO.IOException: There is not enough space on the disk.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at System.IO.Stream.CopyTo(Stream destination)
at NuGet.PhysicalFileSystem.AddFile(String path, Stream stream)
at NuGet.FileSystemExtensions.AddFileWithCheck(IFileSystem fileSystem, String path, Func'1 streamFactory)
at NuGet.FileSystemExtensions.AddFiles(IFileSystem fileSystem, IEnumerable`1 files, String rootDir, Boolean preserveFilePath)
at NuGet.PackageManager.ExpandFiles(IPackage package)
at NuGet.PackageManager.ExecuteInstall(IPackage package)
at NuGet.PackageManager.Execute(PackageOperation operation)
at NuGet.PackageManager.Execute(IPackage package, IPackageOperationResolver resolver)
at NuGet.PackageManager.InstallPackage(IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
at NuGet.PackageManager.InstallPackage(String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean                     allowPrereleaseVersions)
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.InstallPackageUsingNuGet(PackageMetadata package,     SemanticVersion version, String packageInstallationPath) in     c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 81
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.Install(PackageMetadata package, PackageInstallationOptions options) in c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 56
at Octopus.Tentacle.Deployment.DeploymentController.Execute(PackageMetadata package, VariableDictionary variables) in c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Deployment\DeploymentController.cs:line 46
at Octopus.Tentacle.Services.Jobs.Deployment.DeployPackageJobExecutor.Execute(DeployPackageJob job) in c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Services\Jobs\Deployment\DeployPackageJobExecutor.cs:line 20
at CallSite.Target(Closure , CallSite , Object , Object )
at Octopus.Tentacle.Services.Jobs.JobQueue.RunDeploymentsOnBackgroundThread(Object ignored) in c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Services\Jobs\JobQueue.cs:line 83


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. `

Then

EventType clr20r3, P1 tentacle.exe, P2 1.0.14.0, P3 4ff2ed64, P4 mscorlib, P5 4.0.0.0, P6 4e181ae3, P7 3fd1, P8 23b, P9 system.io.ioexception, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

And finally

Application: Tentacle.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
Stack:
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileStream.WriteCore(Byte[], Int32, Int32)
at System.IO.FileStream.Write(Byte[], Int32, Int32)
at System.IO.StreamWriter.Flush(Boolean, Boolean)
at System.IO.StreamWriter.Dispose(Boolean)
at System.IO.TextWriter.Dispose()
at Octopus.Tentacle.Services.Jobs.JobState+FilePathScope.Close()
at Octopus.Shared.Diagnostics.LogTapper.Dispose()
at Octopus.Tentacle.Services.Jobs.JobQueue.RunDeploymentsOnBackgroundThread(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Thanks Bruce,

Perhaps before a package is uploaded/extracted Octopus will check for free disk space and throw an exception if it is less than the size of the package or, say, 200mb, whichever comes first?

Paul

Hi Paul,

That sounds good

Bruce

Hi Bruce,

This is implemented in build 1.0.16.1276. Thanks again for the suggestion!

Paul