Azure Batch - No files on node after task completion

522 views Asked by At

I'm using Azure Batch .NET API. After tasks completion, I try to retrieve the output files (or any files) from the tasks via CloudTask.GetNodeFile() but this throws a "not found" exception. Same for stdout t.GetNodeFile(Microsoft.Azure.Batch.Constants.StandardOutFileName) and stderr t.GetNodeFile(Microsoft.Azure.Batch.Constants.StandardErrorFileName). There is simply no files of any sort on the node (verified via Azure portal). Job and pool are not yet deleted when I do the check and nodes are in "Idle" state.

Here is a relevant snippet of code, note that this is basically one of the examples from the official azure-batch-samples at github:

IPagedEnumerable<CloudTask> ourTasks = job.ListTasks(new ODATADetailLevel(selectClause: "id,state,url"));
client.Utilities.CreateTaskStateMonitor().WaitAll(ourTasks, TaskState.Completed, TimeSpan.FromMinutes(config.TimeoutMinutes));
Console.WriteLine("Tasks are done.");

foreach (CloudTask t in ourTasks)
{
     t.ListNodeFiles(recursive: true).ToList(); // always of size 1, with only element being "/wd"
}
0

There are 0 answers