More logging. Set container names for codex deployment.

This commit is contained in:
benbierens 2023-08-30 08:53:09 +02:00
parent 0a8928b5aa
commit a5773bf710
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 11 additions and 1 deletions

View File

@ -28,6 +28,7 @@ namespace CodexNetDeployer
var workflowStartup = new StartupConfig();
workflowStartup.Add(gethResult);
workflowStartup.Add(CreateCodexStartupConfig(bootstrapSpr, i, validatorsLeft));
workflowStartup.NameOverride = GetCodexContainerName(i);
var containers = workflow.Start(1, Location.Unspecified, new CodexContainerRecipe(), workflowStartup);
@ -75,6 +76,12 @@ namespace CodexNetDeployer
return null;
}
private string GetCodexContainerName(int i)
{
if (i == 0) return "BOOTSTRAP";
return "CODEX" + i;
}
private CodexStartupConfig CreateCodexStartupConfig(string bootstrapSpr, int i, int validatorsLeft)
{
var codexStart = new CodexStartupConfig(config.CodexLogLevel);

View File

@ -24,6 +24,7 @@ namespace ContinuousTests.Tests
{
var info = n.GetDebugInfo();
Log.Log($"{n.GetName()} = {info.table.localNode.nodeId}");
Log.AddStringReplace(info.table.localNode.nodeId, n.GetName());
return info;
}).ToArray();
@ -45,7 +46,9 @@ namespace ContinuousTests.Tests
if (!expected.All(ex => known.Contains(ex)))
{
var nl = Environment.NewLine;
return $"Not all of{nl}'{string.Join(",", expected)}'{nl}were present in routing table:{nl}'{string.Join(",", known)}'";
return $"{nl}At node '{info.table.localNode.nodeId}'{nl}" +
$"Not all of{nl}'{string.Join(",", expected)}'{nl}" +
$"were present in routing table:{nl}'{string.Join(",", known)}'";
}
return string.Empty;