add --no-bootstrap-node option via WithNoBootstrapNodes()

Follows the same pattern as --log-format / WithLogFormat():
- NoBootstrapNodes bool property on LogosStorageStartupConfig
- WithNoBootstrapNodes() method on ILogosStorageSetup
- Passes --no-bootstrap-node CLI flag in LogosStorageProcessRecipe
- Sets STORAGE_NO_BOOTSTRAP_NODE=true env var in ContainerRecipe
- Applied to bootstrap nodes in AutoBootstrapDistTest
This commit is contained in:
E M 2026-05-29 21:00:21 +10:00
parent c0cbe608e2
commit 497a48696c
No known key found for this signature in database
5 changed files with 22 additions and 1 deletions

View File

@ -67,6 +67,10 @@ namespace StoragePlugin
{
AddEnvVar("STORAGE_BOOTSTRAP_NODE", config.BootstrapSpr);
}
if (config.NoBootstrapNodes)
{
AddEnvVar("STORAGE_NO_BOOTSTRAP_NODE", "true");
}
if (config.StorageQuota != null)
{
AddEnvVar("STORAGE_STORAGE_QUOTA", config.StorageQuota.SizeInBytes.ToString()!);

View File

@ -72,6 +72,10 @@ namespace StoragePlugin
{
AddArg("--bootstrap-node", config.BootstrapSpr);
}
if (config.NoBootstrapNodes)
{
AddArg("--no-bootstrap-node");
}
if (config.StorageQuota != null)
{
AddArg("--storage-quota", config.StorageQuota.SizeInBytes.ToString()!);
@ -121,5 +125,10 @@ namespace StoragePlugin
{
args.Add($"{arg}={val}");
}
private void AddArg(string arg)
{
args.Add(arg);
}
}
}

View File

@ -12,6 +12,7 @@ namespace StoragePlugin
ILogosStorageSetup WithLogLevel(LogosStorageLogLevel level);
ILogosStorageSetup WithLogLevel(LogosStorageLogLevel level, LogosStorageLogCustomTopics customTopics);
ILogosStorageSetup WithLogFormat(LogosStorageLogFormat format);
ILogosStorageSetup WithNoBootstrapNodes();
ILogosStorageSetup WithStorageQuota(ByteSize storageQuota);
ILogosStorageSetup WithBlockTTL(TimeSpan duration);
ILogosStorageSetup WithBlockMaintenanceInterval(TimeSpan duration);
@ -89,6 +90,12 @@ namespace StoragePlugin
return this;
}
public ILogosStorageSetup WithNoBootstrapNodes()
{
NoBootstrapNodes = true;
return this;
}
public ILogosStorageSetup WithStorageQuota(ByteSize storageQuota)
{
StorageQuota = storageQuota;

View File

@ -13,6 +13,7 @@ namespace StoragePlugin
public LogosStorageLogCustomTopics? CustomTopics { get; set; } = new LogosStorageLogCustomTopics(LogosStorageLogLevel.Info, LogosStorageLogLevel.Warn);
public ByteSize? StorageQuota { get; set; }
public bool MetricsEnabled { get; set; }
public bool NoBootstrapNodes { get; set; }
public string? BootstrapSpr { get; set; }
public int? BlockTTL { get; set; }
public bool? EnableValidator { get; set; }

View File

@ -14,7 +14,7 @@ namespace LogosStorageTests
public void SetupBootstrapNode()
{
isBooting = true;
BootstrapNode = StartLogosStorage(s => s.WithName("BOOTSTRAP_" + GetTestNamespace()).WithLogFormat(LogosStorageLogFormat.Json));
BootstrapNode = StartLogosStorage(s => s.WithName("BOOTSTRAP_" + GetTestNamespace()).WithLogFormat(LogosStorageLogFormat.Json).WithNoBootstrapNodes());
isBooting = false;
}