Repository navigation
Releases
blobgate 0.15.0
Added
- A limit on failed calls, on by default:
BLOBGATE_AUTH_FAILURES_PER_MINUTE(60;0: no limit; chartconfig.authFailuresPerMinute). An address that presented a wrong token, grant, access key or signature that many times in a minute is refused until the minute is over, with the right credential too (429 too_many_failures, S3 door503 SlowDown,Retry-After). Callers behind one ingress, proxy or NAT share the limit and headers are not read: there set0and limit at the ingress.blobgate_refused_totalcountsauth_limit.
Fixed
- A node that does not answer is no longer waited for again and again. Every 10 seconds the next writes (all that came at once) tried such a node again and waited for its whole timeout and retries; a delete, an overwrite and the question about free space asked it each time. The node is now asked again in the background, and calls go on without it until it has answered; its copies and removals are queued as before. The calls that meet the failure first still wait for it, and so does a write that cannot have
min_ackswithout the node. Test:TestSilentNodeIsWaitedForOnce.
Image: ghcr.io/zystem/blobgate:0.15.0 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.15.0
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.14.0
Security
- Sending a part again can no longer damage what was acknowledged. Every attempt of a part wrote the same file on a node: a retry that failed removed the block of the part that had been accepted (the completion then answered
200and the object could not be read), and in a sealed store a retry that came late replaced the block with other bytes. Every attempt now has a file of its own, which is never written twice; a failed attempt removes only its own, and the files of the attempts that an object does not use are removed after its completion. All releases up to 0.13.1 have this.
Changed
- Not compatible with earlier releases (the layout of a store is now 2): the name of a block of a part carries the attempt. Stop every replica of an older version before this one writes; an older program cannot read objects written in parts by this one. Objects written by earlier releases are read as before.
Image: ghcr.io/zystem/blobgate:0.14.0 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.14.0
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.13.1
Security
- An abort no longer removes the blocks of a completed upload.
DELETE ?upload=<id>(S3: AbortMultipartUpload) removed the directory of the upload without asking whether it was still one: after a completion those blocks are the object's, so the object was lost on every node (withdedup, every object that shares them). An abort at the same moment as the completion could acknowledge the completion and remove its blocks. An abort now claims the upload first, in one transaction, and removes blocks only when it got it. All releases up to 0.13.0 have this. - A sweep that died between claiming an expired upload and writing down the removal left blocks that nothing remembered; the removal is now written down in the transaction of the claim.
Image: ghcr.io/zystem/blobgate:0.13.1 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.13.1
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.13.0
Security
- An error no longer tells a caller about the inside. The detail of a failure of the database or of a node carried its text: hosts, paths, node ids, the address of rqlite;
/readyz, which asks for no token, did too. A caller now gets what kind of failure it was and(ref <id>); the log line with thatrefhas the whole text, with the passwords and tokens of URLs taken out. A507 store_fullno longer names the nodes. - S3: one answer for a wrong signature and for an access key that is no tenant (
403 SignatureDoesNotMatch, and the same work is done for both).InvalidAccessKeyIdis not answered any more.
Added
BLOBGATE_HELD_BLOCKS_PER_TENANT(chartconfig.heldBlocksPerTenant). With more than one tenant, one of them now takes at most three quarters of the places by default.- Metrics
blobgate_held_blocks,blobgate_held_wait_seconds,blobgate_staged_bytes;blobgate_refused_totalcountsbusy. - The report of a reconcile has
strays_total.
Changed
- Quotas are hard limits. They are decided by the transaction that records the object or the part, so writers at once cannot pass them together; the parts of uploads that have not ended count (a part over the limit is
507when it is sent, and no longer only the completion), and so does an object that comes back from the trash. The tablestorage_guardgains a columnquota. - A cell of the database that is not what its column is (a text where a number belongs) is now an error (
503), not a silent zero. - A reconcile asks the database about 500 directories at a time and no longer keeps the listing of the nodes and the whole inventory in memory; its report lists at most 1000 strays;
applystill queues all that are old enough. New indexes by generation are made at start. - Integers from rqlite are no longer read through a floating-point number, which loses the last digits above 2^53.
- The documents say that the secrets must be random text: there is no password stretching.
Image: ghcr.io/zystem/blobgate:0.13.0 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.13.0
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.12.0
From this release on only the latest release is supported (SECURITY.md): the earlier releases, 0.11 and 0.10 among them, are no longer supported and the fixes below are not backported.
Security
- An expired upload and its completion can no longer both win. The sweep removed the blocks of an upload before it deleted the row, while a completion could publish the same generation: an object could be left whose blocks were deleted from every node. The sweep now claims the upload (deletes the row, in a transaction, only if still old enough), and a commit requires the row in its own transaction; of the two exactly one wins and a completion that lost is
404 no_such_upload. A removal queued by the reconcile asks again who owns the directory when it is done. A commit that answered with a database error no longer removes the blocks unless the database says the generation is not the object's. - S3: what the signature does not cover is not believed. A header that decides what a call does (the source of a copy, the metadata directive, metadata, checksums,
Content-MD5) that is not inSignedHeadersis403 AccessDenied; the XML bodies of DeleteObjects and CompleteMultipartUpload are checked against the signed digest (before, a body could be changed in flight and the delete was done); declared checksums (x-amz-checksum-*, in a header or a trailer) are checked, and one of an unknown algorithm is refused; the trailer of a signed stream is checked. A chunk of a streamed body is no longer held whole (up to 16 MiB) before it is checked. If-MatchandIf-None-Matchare decided by the transaction that writes. Two writers under the same condition could both pass and the second overwrote the first; now one is412. A weak tag (W/"...") no longer matchesIf-Match. A completion of an upload honours them too.- Encryption keys are checked. A key id is written one way (
1, not01); an update that would drop a key that blocks are sealed with, or change the text of a key under its id, is refused; two spellings of one id with different texts no longer leave the choice of the key to the order of a map. - Repair tasks are settled by revision, and a copy that cannot be written down refuses the write. A task replaced in the same second could be closed by the old one; an error of the queue was ignored while the write was acknowledged with fewer copies. New metric
blobgate_repair_enqueue_errors_total.
Changed
- Slow readers no longer keep writers out of the places of
BLOBGATE_HELD_BLOCKS. Measured in a cluster with 0.11.6 (docs/benchmark.md): 40 slow readers that came first took all 32 places, and every writer and every part after them was told503 busyfor as long as the readers lasted. A kind of call (reads; writes of many blocks and parts through the S3 door) now takes at most three quarters of the places (24 of 32); the last quarter is left for the other kind, and the total is still the limit of memory (32 blocks, 256 MiB). The price: with no writers about, slow readers alone can hold 24 blocks and not 32, so the 25th reader is told503 busya little sooner; raiseBLOBGATE_HELD_BLOCKSif that matters (and the memory limit with it). Test:TestSlowReadersDoNotTakeThePlacesOfWriters.
Image: ghcr.io/zystem/blobgate:0.12.0 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.12.0
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.11.6
Fixed
- The status page finds a local node whose directory cannot be read. The local backend of rclone logs such a directory and lists it as empty, so the probe called the node
ok(shown with mode 000). The probe now reads the directory of a local node itself; it isdeadafter three probes. Network backends were found before. - A part of a multipart upload through the S3 door is held under the places of
BLOBGATE_HELD_BLOCKStoo. The part is read whole into memory, and 24 clients that sent 6 MiB of a part of 8 and stopped held 200 MiB with no bound (the same test with the places: 33 MiB with 4 places, the others told503 SlowDownwithRetry-After). Found while measuring the limit of 0.11.5 in a cluster, which covered reads and writes of one object but not the parts. - A part whose client leaves, or is ended for being quiet, is answered
400 IncompleteBody. The handler answered with status 0 andnet/httpstopped it with a panic (invalid WriteHeader code 0, the connection was closed and a line was logged).
Image: ghcr.io/zystem/blobgate:0.11.6 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.11.6
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.11.5
Added
BLOBGATE_HELD_BLOCKS(default 32) andBLOBGATE_CLIENT_IDLE_SECONDS(default 120), in the chartconfig.heldBlocksandconfig.clientIdleSeconds; the new answer503 busywithRetry-After.
Fixed
- Clients that go slow or quiet no longer hold memory and places without end. Measured with 48 clients that took one byte of a big object and stopped: the module held 385 MiB (a block of 8 MiB each), and the same for 48 writers of no known length that sent 3 MiB and stopped; the limit
BLOBGATE_THREADSthat the documents named for it bounded only the reads from the nodes (the place was freed before the block was sent). With the default memory limit of the chart (512 MiB) some 60 slow readers would have ended the process. Now the blocks held for clients are bounded byBLOBGATE_HELD_BLOCKS(the same test: 32 MiB with 4 places), a call that finds no place is told503 busy, and a client with no byte moving forBLOBGATE_CLIENT_IDLE_SECONDSis ended, which also frees the places ofBLOBGATE_THREADSthat quiet writers into a store that seals held for ever (four quiet writers stopped every such write). - Tests of a client that leaves in the middle of an object (no slot or goroutine is left), one that stalls (it does not stop the others even with one read at a time), and a node that gives out after the first blocks went (the reader meets a cut, never a short answer that looks whole).
Image: ghcr.io/zystem/blobgate:0.11.5 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.11.5
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.11.4
Fixed
- A read that meets a damaged copy repairs it. A node that gives back a block with the wrong bytes or the wrong length was already passed over (the client never gets wrong bytes: tested with a flipped byte, zeros, a block cut short or in half, longer, and empty, in a plain and a sealed store, on either node, and with both nodes damaged the read is refused with 5xx), but the damaged copy stayed until the deep check (
BLOBGATE_DEEP_CHECK, off by default) found it, and with the other copy the only good one a second damage would have lost the block. The read now queues a repair for the node it found damaged (the metricblobgate_node_errors_totalhasop="damaged"). A damaged copy on a node that the reads do not reach (the first node answers) is still found by the deep check only. - A read that meets a node with no copy of a block repairs that too. A node that lost a disk, or a directory, was put right only by the check of the inventory; a read that is answered by another node now queues the copy for it as well. Copies (
CopyObjectof the bytes,UploadPartCopy) and objects withdeduptake the same path and were tested with a damaged node: they never carry its bytes.
Image: ghcr.io/zystem/blobgate:0.11.4 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.11.4
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.11.3
Fixed
- A node that stops in the middle of a block no longer takes the healthy nodes with it. The bytes of a write went to the nodes one after the other, so a node whose connection was open and silent held up the next node's bytes until its own timeout, and the healthy node was cut by its own idle timeout at the same moment:
0 of 2 nodes took the blockwith one node well (shown with a link that stops,TestRealSlowAndStalledLink). Every node now has a short queue (2 MiB) of its own; a node that takes nothing for half ofBLOBGATE_NODE_TIMEOUT_SECONDSis left behind and the write goes on with the others (the copy for it is queued). - A dead node is met once, not for every block. Every block of every write, and every read that began with it, paid the whole timeout of the dead node again (a write of 40 MiB took 87 seconds in the test, one of 100 MiB would take many minutes with the defaults). A node that fails a write or a read is now left for 10 seconds (the others are tried first; a write does not wait for it, and the copy is queued); the test above takes 23 seconds. During those 10 seconds a write that needs every node (
min_acksequal to the number of nodes) is refused. Slow links: the idle timeout is measured from the moment the block is in the buffers of the connection, so a link slower than about 150 KB/s needs a largerBLOBGATE_NODE_TIMEOUT_SECONDS(docs/configuration.md); a link that is slow but moving is not cut (tested at 2 MiB/s with a timeout of 5 seconds).
Image: ghcr.io/zystem/blobgate:0.11.3 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.11.3
Signatures, provenance and how to check them: docs/verifying-releases.md
blobgate 0.11.2
Fixed
- A store whose node is down or silent when it is loaded still serves. The SFTP backend of rclone connects when it is made, so a replica that loaded a store (at start, or after a change of its settings) while one SFTP node was away or silent could not open the store at all: every call answered
502, thoughmin_acksand the other nodes were enough. Now such a node is put in as one that fails every call (the others serve and the copies for it are queued), and the nodes are opened again every 10 seconds, in the background, until it is back. A store that cannot reachmin_acksnodes at load is still refused. Found with a frozen SFTPGo (docker pause: nothing answered, nothing closed), which also showed that WebDAV and FTP nodes in that state are given up by the idle timeout of 0.11.1 (TestRealSilentNodes).
Image: ghcr.io/zystem/blobgate:0.11.2 (linux/amd64, linux/arm64)
Chart: oci://ghcr.io/zystem/charts/blobgate --version 0.11.2
Signatures, provenance and how to check them: docs/verifying-releases.md