The image cache directory is never created, so the dashboard reports its space as unknown #179
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on the dashboard of the throwaway instance in
TESTCONTAINER/.What it looks like
The dashboard's Paths panel draws every folder with the space on its
filesystem —
On filesystem: /config · 1.1 TiB / 1.8 TiB— except one:What answers
GET /System/Info/Storage:ImageCacheFolderis the only entry with noDeviceIdand noStorageType.The reason is on disk:
<cache>/holdstranscodes/and nothing else. Theimage cache directory is never created, so there is nothing to
statfs.Where to start
Whatever creates
<cache>/transcodesat startup should create the image cachedirectory beside it. Upstream creates its application paths up front, which is
why the same panel is never short a row there.
How to know it is done
A first start against an empty program-data directory leaves the image cache
directory on disk, and
/System/Info/Storagereports it with the sameDeviceId,StorageType,FreeSpaceandUsedSpaceshape as every otherfolder.
House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin. Generated artifacts are regenerated, never edited.Not a deviation — measured against the reference instance at the pin, which
answers exactly what we answer.
Both are directories that are not there —
reference/var/cache/holdstranscodesandCACHEDIR.TAGand noimages, and the image is built--nowebclient. Upstream'sStorageHelper.ResolvePathcallsDirectoryInfo.ResolveLinkTarget, which throws rather than answering for a paththat is not there, and
GetFreeSpaceOfcatches that into-1. Nothing createsthe image cache at startup on either server: upstream writes it lazily under
ImageProcessor.ResizedImageCachePathwhen it caches a resized picture, andthis server caches none.
So the dashboard reads
? / ?against upstream too, andcanonicalizerefusinga path that is not there is the answer rather than the bug. The fix written for
this is reverted in
49540ea.Two things a review turned up while measuring, both pre-existing and neither
measured against a live upstream, so they are noted rather than filed:
under()matches whole segments where upstream's drive match is a raw
StartsWith, andcanonicalizenormalises..where upstream keeps it literal. Each needs amount arrangement to show, and neither is reachable through a path this server
reports.