Download container logs when EnsureOnline fails

This commit is contained in:
benbierens 2023-08-04 08:19:03 +02:00
parent 9fab7757b0
commit 771a952f02
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
1 changed files with 17 additions and 1 deletions

View File

@ -93,10 +93,26 @@ namespace DistTestCore
{
var group = new CodexNodeGroup(lifecycle, codexSetup, runningContainers, codexNodeFactory);
RunningGroups.Add(group);
try
{
Stopwatch.Measure(lifecycle.Log, "EnsureOnline", group.EnsureOnline, debug: true);
}
catch
{
CodexNodesNotOnline(runningContainers);
throw;
}
return group;
}
private void CodexNodesNotOnline(RunningContainers runningContainers)
{
Log("Codex nodes failed to start");
foreach (var container in runningContainers.Containers) lifecycle.DownloadLog(container);
}
private StartupWorkflow CreateWorkflow()
{
return workflowCreator.CreateWorkflow();