Merge pull request #374 from opengenesislink/feat/gen1-iar-webdav-10gib-limit-20261104

feat(gen1): raise resident IAR/WebDAV maximum archive size to 10 GiB
This commit is contained in:
OpenGenesis (MPL 2.0) authored and GitHub committed 2026-11-04 09:52:11 +01:00
commit b27fb52a65
14 files changed
+47 -20

No files matched your search

@@ -10,7 +10,7 @@ namespace NexVerse.Core.Archives
public static class OglIarTransferPolicy
{
public const int MaximumChunkBytes = 4 * 1024 * 1024;
public const long DefaultMaximumArchiveBytes = 2L * 1024 * 1024 * 1024;
public const long DefaultMaximumArchiveBytes = 10L * 1024 * 1024 * 1024;
public static string Resolve(string sharedRoot, Guid regionId, Guid jobId)
{
@@ -73,7 +73,9 @@ namespace NexVerse.Core.Archives
catch { socket.Dispose(); throw; }
}
};
m_Http = new HttpClient(handler) { Timeout = TimeSpan.FromMinutes(15) };
// A 10 GiB streamed IAR transfer can require more than 15 minutes
// on a WireGuard/NAS connection. Keep a finite upper bound.
m_Http = new HttpClient(handler) { Timeout = TimeSpan.FromHours(2) };
}
public void Dispose() => m_Http.Dispose();
@@ -107,7 +107,7 @@ namespace NexVerse.RegionModules.NodeAgent
private readonly SemaphoreSlim m_IarCommandSlot = new(1, 1);
private int m_IarCommandsPending;
private OglIarWebDavStorage m_IarWebDav;
private long m_IarWebDavMaximumBytes = 2048L * 1024 * 1024;
private long m_IarWebDavMaximumBytes = 10240L * 1024 * 1024;
private IDisposable m_ObjectMessageSubscription;
private IDisposable m_EstateScriptMessageSubscription;
private IDisposable m_GridScriptMessageSubscription;
@@ -222,7 +222,7 @@ namespace NexVerse.RegionModules.NodeAgent
iarConfig.GetString("NasHost", "10.78.0.4"),
iarConfig.GetString("WebDavUsername", ""),
iarConfig.GetString("WebDavPasswordFile", ""));
long mib = iarConfig.GetLong("MaximumArchiveMiB", 2048);
long mib = iarConfig.GetLong("MaximumArchiveMiB", 10240);
if (mib < 101 || mib > 10240)
throw new ArgumentException("Invalid WebDAV IAR archive size cap.");
m_IarWebDavMaximumBytes = mib * 1024L * 1024;
+1 -1
View File
@@ -62,7 +62,7 @@ namespace NexVerse.Server.Api
string root = section?.GetString(
m_UseWebDav ? "TemporaryStorageRoot" : "SharedStorageRoot",
m_UseWebDav ? "/var/lib/opengenesislink/iar-staging" : "")?.Trim() ?? "";
long maxMib = section?.GetLong("MaximumArchiveMiB", 2048) ?? 2048;
long maxMib = section?.GetLong("MaximumArchiveMiB", 10240) ?? 10240;
m_NasHost = section?.GetString("NasHost", "10.78.0.4")?.Trim() ?? "";
int days = section?.GetInt("RetentionDays", 30) ?? 30;
m_RetentionDays = Math.Clamp(days, 1, OglIarNasStorage.MaximumRetentionDays);
+1
View File
@@ -390,6 +390,7 @@
WebDavBaseUrl = "https://10.78.0.4:5006/Server/Benutzer/Weiss_Joerg/NexVerse/IAR-Backups/"
WebDavUsername = "ogl-iar"
WebDavPasswordFile = "/etc/opengenesislink/iar-webdav.pass"
MaximumArchiveMiB = 10240
[Architecture]
Include-Architecture = "config-include/GridHypergrid.ini"
+1
View File
@@ -325,3 +325,4 @@
WebDavBaseUrl = ""
WebDavUsername = ""
WebDavPasswordFile = ""
MaximumArchiveMiB = 10240
+1 -1
View File
@@ -1111,4 +1111,4 @@
; Optional legacy NFS backend: set StorageBackend=NFS and mount this root.
SharedStorageRoot = ""
RetentionDays = 30
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
+1 -1
View File
@@ -1166,4 +1166,4 @@
; Optional legacy NFS backend: set StorageBackend=NFS and mount this root.
SharedStorageRoot = ""
RetentionDays = 30
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
+1 -1
View File
@@ -856,4 +856,4 @@
; Optional legacy NFS backend: set StorageBackend=NFS and mount this root.
SharedStorageRoot = ""
RetentionDays = 30
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
+11 -7
View File
@@ -72,7 +72,7 @@ WebDavUsername = "ogl-iar"
WebDavPasswordFile = "/etc/opengenesislink/iar-webdav.pass"
TemporaryStorageRoot = "/var/lib/opengenesislink/iar-staging"
RetentionDays = 30
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
```
Die URL ist der derzeit konfigurierte private WebDAV-Pfad der Stadt-NexVerse-G1-Installation und setzt einen funktionierenden WireGuard-Zugang sowie ein gueltiges HTTPS-Zertifikat voraus. **Achtung:** Die NAS-Verzeichnisstruktur und der NAS-Benutzername sind in einem oeffentlichen Repository sichtbar, das Passwort jedoch nicht.
@@ -92,7 +92,7 @@ WebDavBaseUrl = "https://10.78.0.4:5006/Server/Benutzer/Weiss_Joerg/NexVerse/IAR
WebDavUsername = "ogl-iar"
WebDavPasswordFile = "/etc/opengenesislink/iar-webdav.pass"
StorageRoot = "OGLInventoryArchives"
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
```
Auf jedem SIM muss die Region-Archivverwaltung mit WebDAV-Client und
@@ -188,7 +188,7 @@ StorageBackend = "NFS"
SharedStorageRoot = "/mnt/ogl-iar"
NasHost = "10.78.0.4"
RetentionDays = 30
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
```
Im Simulator dazu denselben **tatsächlich gemounteten**
@@ -257,7 +257,7 @@ sind gesondert zu beachten.
[OpenGenesisLINKIAR]
Enabled = true
StorageRoot = "/mnt/ogl-iar"
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
```
3. Auf **ROBUST/World API** in der tatsächlich geladenen
@@ -269,7 +269,7 @@ sind gesondert zu beachten.
SharedStorageRoot = "/mnt/ogl-iar"
NasHost = "10.78.0.4"
RetentionDays = 30
MaximumArchiveMiB = 2048
MaximumArchiveMiB = 10240
```
4. ROBUST und Simulatoren mit aktualisierten DLLs neu starten.
@@ -327,8 +327,12 @@ Dateinamen `{id}.iar` im Region-Verzeichnis abgelegt.
### Import (auch >100 MiB)
Zuerst lokale Dateigröße und **SHA-256** ermitteln. Die Gesamtgröße
darf standardmäßig bis zu 2 GiB betragen (konfigurierbar bis 10 GiB,
sofern die bestehende Regions-Policy dieselbe Größe zulässt).
darf standardmäßig bis zu **10 GiB (10.240 MiB)** betragen, sofern
ROBUST und der zuständige Simulator denselben Grenzwert verwenden.
Für WebDAV werden IAR-Dateien gestreamt (kein vollständiger RAM-Puffer).
Auf dem Staging-Datenträger muss ausreichend freier Speicher für mindestens
ein vollständiges Archiv vorhanden sein; zusätzlich benötigt das NAS
genügend Platz. Große Transfers können länger als 15 Minuten dauern.
```http
POST /api/v1/iar/me/import
+1 -1
View File
@@ -37,7 +37,7 @@ simulator requires its own local protected NAS password file. Use
a `0600` file for `root` is intentionally not readable by other accounts.
The WebDAV backend supports authenticated resident IAR export/import with
temporary local staging and remote NAS archive storage, 2 GiB default maximum,
temporary local staging and remote NAS archive storage, 10 GiB default maximum,
SHA-256 validation and bounded HTTP transfers. It does not replace the older
administrative `/api/v1/iar/*` storage behavior. The NAS archive folder must
already exist, must be accessible to `ogl-iar`, and should have separate backup
@@ -50,7 +50,17 @@ internal static class Program
throw new Exception("Root accepted"); }
catch (ArgumentException) { count++; }
long max = OglIarTransferPolicy.DefaultMaximumArchiveBytes;
Check(max > 100L * 1024 * 1024, "uploads support >100 MiB");
Check(max == 10L * 1024 * 1024 * 1024, "default IAR quota is 10 GiB");
Check(max > int.MaxValue, "IAR quota exceeds signed 32-bit byte range");
Check(OglIarTransferPolicy.AcceptChunk(3L * 1024 * 1024 * 1024,
3L * 1024 * 1024 * 1024, OglIarTransferPolicy.MaximumChunkBytes,
max, max), "sequential 4MiB import chunk beyond 2GiB");
Check(OglIarTransferPolicy.AcceptChunk(max - OglIarTransferPolicy.MaximumChunkBytes,
max - OglIarTransferPolicy.MaximumChunkBytes,
OglIarTransferPolicy.MaximumChunkBytes, max, max),
"final chunk exactly at 10GiB quota");
Check(!OglIarTransferPolicy.AcceptChunk(max, max, 1, max + 1, max),
"archive greater than 10GiB is rejected");
Check(OglIarTransferPolicy.AcceptChunk(0, 0, 4194304, 200000000, max),
"first 4MiB chunk");
Check(OglIarTransferPolicy.AcceptChunk(4194304, 4194304, 4194304,
+10 -1
View File
@@ -33,6 +33,7 @@ EXPECTED_LIVE = (
'WebDavBaseUrl = "https://10.78.0.4:5006/Server/Benutzer/Weiss_Joerg/NexVerse/IAR-Backups/"',
'WebDavUsername = "ogl-iar"',
'WebDavPasswordFile = "/etc/opengenesislink/iar-webdav.pass"',
'MaximumArchiveMiB = 10240',
)
for block in (ROBUST_IAR, SIM_IAR):
for item in EXPECTED_LIVE:
@@ -95,7 +96,7 @@ assert 'OwnJob(user, id)' in api, "Never expose another avatar's IAR jobs"
for marker in (
"MaximumChunkBytes = 4 * 1024 * 1024",
"DefaultMaximumArchiveBytes = 2L * 1024 * 1024 * 1024",
"DefaultMaximumArchiveBytes = 10L * 1024 * 1024 * 1024",
"Path.GetFullPath(sharedRoot)", 'jobId.ToString("D") + ".iar"',
"offset == currentBytes", "bytes <= MaximumChunkBytes",
"now <= createdAt", "return null",
@@ -170,6 +171,14 @@ example_sim = iar_section(text("bin/OpenSim.ini.example"), "OpenGenesisLINKIAR")
assert 'WebDavPasswordFile = ""' in example_sim
assert 'WebDavBaseUrl = ""' in example_sim
assert 'WebDavUsername = ""' in example_sim
assert "MaximumArchiveMiB = 10240" in example_sim
assert "MaximumArchiveMiB = 10240" in ROBUST_IAR
assert "MaximumArchiveMiB = 10240" in SIM_IAR
assert 'GetLong("MaximumArchiveMiB", 10240)' in api
assert 'GetLong("MaximumArchiveMiB", 10240)' in node
assert "TimeSpan.FromHours(2)" in dav
deploy_config = text("tools/deploy/configure_iar_webdav.py")
assert deploy_config.count("'MaximumArchiveMiB': '10240'") == 2
# Never accidentally store password material or inline credential values in Git.
for block in (ROBUST_IAR, SIM_IAR):
assert 'WebDavPassword = ' not in block
+2 -2
View File
@@ -160,7 +160,7 @@ def main():
'WebDavUsername': f'"{args.username}"',
'WebDavPasswordFile': f'"{args.secret}"',
'TemporaryStorageRoot': '"/var/lib/opengenesislink/iar-staging"',
'RetentionDays': '30', 'MaximumArchiveMiB': '2048',
'RetentionDays': '30', 'MaximumArchiveMiB': '10240',
}))
if not args.only_robust:
chosen.append((args.sim, 'OpenGenesisLINKIAR', {
@@ -168,7 +168,7 @@ def main():
'NasHost': '"10.78.0.4"', 'WebDavBaseUrl': f'"{args.url}"',
'WebDavUsername': f'"{args.username}"',
'WebDavPasswordFile': f'"{args.secret}"',
'MaximumArchiveMiB': '2048',
'MaximumArchiveMiB': '10240',
}))
if len({path.resolve() for path, _, _ in chosen}) != len(chosen):
raise ValueError("ROBUST and simulator INI files cannot be the same file")