0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
Commit graph

24 commits

Author SHA1 Message Date
Ramkumar Chinchani
25f5a45296 dedupe: use hard links to dedupe blobs
As the number of repos and layers increases, the greater the probability
that layers are duplicated. We dedupe using hard links when content is
the same. This is intended to be purely a storage layer optimization.
Access control when available is orthogonal this optimization.

Add a durable cache to help speed up layer lookups.

Update README.

Add more unit tests.
2020-04-03 09:29:12 -07:00
Ramkumar Chinchani
8ff60f9138 conformance: fix error msg for DELETE MANIFEST
---
Ran 27 of 27 Specs in 0.120 seconds
SUCCESS! -- 27 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
---
2020-03-25 12:53:15 -07:00
Ramkumar Chinchani
dfe023225f pkg/api: use a rwlock when accessing storage
The original patch used a mutex, however, the workload patterns are
likely to be read-heavy, so use a rwlock instead.
2020-03-20 12:23:36 -07:00
Ramkumar Chinchani
2fd87b6a86 pkg/api: use a rwlock when accessing storage
The original patch used a mutex, however, the workload patterns are
likely to be read-heavy, so use a rwlock instead.
2020-03-20 10:58:21 -07:00
Tycho Andersen
94afc30661 routes: lock everything that modifies blobs
Now that we're GCing blobs on delete/update manifest, we should lock the
blob queries so that they don't race with each other.

This is a pretty coarse grained lock, there's probably a better way to do
this.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
2020-03-20 10:58:21 -07:00
Ramkumar Chinchani
941dffe2c7 conformance: fix http status codes for MANIFEST DELETE failures.
Previously returning 404s as failure code, dist-spec says 400s.
2020-03-18 15:50:40 -07:00
Ramkumar Chinchani
6e494942d4 routes: CheckManifest should return 404 when repo is unknown
Previously, CheckManifest() was not checking for repo not found
condition and would default to 500 status code.

Add the check now to return 404.

Fixes issue #74
2020-02-13 11:00:11 -08:00
Ramkumar Chinchani
58040f4562 check: add unit tests to cover the new code, fix linter errors 2020-01-31 13:21:43 -08:00
Ramkumar Chinchani
f9a1a0fe48 routes: handle compliance requirements
- that errors be returned a certain way using the new NewErrorList()
  method and the string enum constants

- allow for full blob upload without a session with repo name and digest
2020-01-31 11:49:15 -08:00
Peter Engelbert
268b4088fd Add support for bearer/token auth
New options added to configuration file to reference a public key used
to validate authorization tokens signed by an auth server with
corresponding private key.

Resolves #24

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-01-27 12:42:23 -06:00
Ramkumar Chinchani
964af6ba51 compliance: be compliant with dist-spec compliance tests
dist-spec compliance tests are now becoming a part of dist-spec repo
itself - we want to be compliant

pkg/api/regex.go:
	* revert uppercasing in repository names

pkg/api/routes.go:
	* ListTags() should support the URL params 'n' and 'last'
	  for pagination

	* s/uuid/session_id/g to use the dist-spec's naming

	* Fix off-by-one error in GetBlobUpload()'s http response "Range" header

	* DeleteManifest() success status code is 202

	* Fix PatchBlobUpload() to account for "streamed" use case
	  where neither "Content-Length" nor "Content-Range" headers are set

pkg/storage/storage.go:
	* Add a "streamed" version of PutBlobChunk() called PutBlobChunkStreamed()

pkg/compliance/v1_0_0/check.go:
	* fix unit tests to account for changed response status codes
2020-01-16 11:28:23 -08:00
Ramkumar Chinchani
31b30d858b routes: add more logs
There still appears to be another path where we are seeing 500s.
Adding more logs to catch this path.
2020-01-06 22:51:42 -08:00
Ramkumar Chinchani
8bbf892480 routes: be more paranoid
once we have an non-EOF error in this path, not clear if we can really
recover.
2020-01-05 23:21:27 -08:00
Ramkumar Chinchani
2eb4455df7 routes: improve error handling when returning blob data
We have noticed that very intermittently zot returns a 500 when copying
blob data. This is likely happening due to a io.ErrShortWrite
2020-01-04 18:39:21 -08:00
Ramkumar Chinchani
a57f085749 compliance: cleanup compliance test code
zot ci/cd tests are too stict, so separate and relax them for compliance
tests.

Location header is set in some cases, but some clarification is needed
in URL construction.

Fix some incorrect compliance tests.
2019-12-23 22:32:52 -08:00
Ramkumar Chinchani
c8563d8672 routes: handle "mount blob" to remain compliant
"mount blob" was the only feature we didn't handle.
We don't fully support it yet because we don't have access control
support, but at least handle it and return something sane to remain
compliant.
2019-12-20 10:37:41 -08:00
zendril
4e22352e9c Fixing all the issues with upgrading to golangci-lint 1.21.0 2019-12-13 00:53:18 -05:00
Ramkumar Chinchani
9ae9e40b67 log: improve logging
- add a panic recovery handler
        - add logs on unexpected error paths
        - use logger's panic method
2019-11-26 14:18:20 -08:00
Ramkumar Chinchani
f07c535225 reorder header and data writes 2019-11-26 09:40:13 -08:00
Ramkumar Chinchani
b107d6d1a4 compliance: initial commit 2019-10-14 10:59:11 -07:00
Ramkumar Chinchani
066bf1b9eb router: move to gorilla/mux to support multiple name path components 2019-07-10 18:22:20 -07:00
Ramkumar Chinchani
ed2cd51282 routes: fix error codes 2019-06-26 17:30:24 -07:00
Ramkumar Chinchani
bf5273e176 routes: fix headers 2019-06-24 15:09:37 -07:00
Ramkumar Chinchani
9d4e8b4594 zot: initial commit 2019-06-21 15:29:19 -07:00