Repository navigation
Remove manifest from Image - #11925
Conversation
|
isn't this a breaking API change? |
|
@liggitt Shouldn't. |
|
@smarterclayton /сс |
|
You can't do this without a migration, and removing the field is a breaking change. At best you could stop writing the field for newly uploaded images. |
smarterclayton
left a comment
There was a problem hiding this comment.
Need to have a way to move manifests back to registry - could maybe be a migration, but has to be gradual.
| return fmt.Errorf("unrecognized Docker image manifest schema %d for %q (%s)", manifest.SchemaVersion, image.Name, image.DockerImageReference) | ||
| } | ||
|
|
||
| // Remove the raw manifest as it's very big and this leads to a large memory consumption in etcd. |
There was a problem hiding this comment.
Can't do this - have to preserve the values.
There was a problem hiding this comment.
This would strip the value on updates - that has to be gradual.
There was a problem hiding this comment.
@smarterclayton Fixed. I remove these fields only when you are importing a new image.
|
Also, I thought the manifest was only stored as a blob for some schema versions |
| defaultBlobRepositoryCacheTTL = time.Minute * 10 | ||
|
|
||
| // Possible storages for manifests. | ||
| manifestStorageEtcd = "etcd" |
There was a problem hiding this comment.
I'm not sure this should be a config variable. Why would admins want this choice? The alternative is to always write manifests to storage, and on reads, look first in storage and only after look in etcd.
There was a problem hiding this comment.
@smarterclayton As an alternative can be faster storage (e.g. mongodb). For another storage need to implement the distribution.ManifestService interface. I didn't want to hardcode the docker-registry storage and leave the possibility to change it in the future.
No. We always store |
It is.
The field is not going to be removed.
That's the plan. Additionally we considered to write manifest to registry storage and remove it from image object on each
That's true just for config file of manifest schema 2. Manifest objects themselves (of all schemas) have been stored only in etcd until now. |
|
@smarterclayton we don't need a migration IMHO, the new images will replace the old images (they will be pruned) and we gradually migrate users to images with manifests in registry that way. |
Since this is about resource usage, I'd be ok with simply having new images go to storage, while old images continue to be in etcd. An admin who cares may need a way to guarantee that it is reimported without breaking existing use cases. But we can solve that separate.
I really see zero chance of us using a different store besides etcd or the storage driver in the near term. We don't need this much flexibility - just having the code automatically prefer to write to the storage, and having creates of images use the manifest to update their extracted metadata but not to store it is sufficient. Update cannot clear the manifest though automatically (the user would have to elect to send an empty manifest or store) because otherwise we would be breaking users who haven't migrated their images. |
872b114 to
77d7a8a
Compare
|
@smarterclayton Please change your mind! I think this PR wrong by design. Move manifests into the registry storage will help us to reduce the etcd and it's ok in the short term. But on the other hand we put the signatures in the In addition, images isn't the only thing that takes place and grows over time. We have a I'm sure in the future we will be faced with the task to remove them from the database. I'm sure that in the future in front of us will be a challenge to remove them (signatures, tags, builds etc.) from the etcd and if we solve this problem in each case, then in the end it may turn out, the data is scattered in different systems. We can avoid this if we decide to use an external storage. It does not have to be mongo, but anything with multiple indexes. The mongo first comes to my mind for these purposes. |
I think there is a distinction here. Etcd is the configuration for the system. WHAT it should be running and HOW it should run. Builds, while possibly taking up space, are configuration data. We are not storing user information. The system should be able to clean itself up and not be at risk of failure due to "too many things" when those things are normal operations. Images, on the other hand, can be considered partly configuration (what image do I run with) and partly user data (who signed this, what is the signature, what are the contents). In this case, alternate storage is a good thing. I would also suggest that consolidated external storage of all non-configuration data may not be a good thing. There are so many ways to integrate external data that one solution probably won't fit - not to mention it allows scaling and tuning of individual system. The right thing is the api and integration points for how that data is retrieved. And that's how we enable making cluster level decisions based on external data. +1 to being able to index data and search on it. But is this any different than other external indexes like logging, metrics, or catalogs? tl;dr I think configurable manifest storage is good. I do not think it is a whole system solution at this point. This is definitely a topic for the next PM arch call. |
77d7a8a to
52fefa5
Compare
As for me the builds is user data. In fact, all the resources described here are the user data and creates a potential problem with the size of the etcd. We are already faced with the problem of size of images and the fact that regular pruning is not enough. Do you really think that the rest of this list won't create same problem ? )) We can store in etcd identifiers of these objects, but why we need to store the objects themselves ? |
I think those resources likely will have the same problem. But I disagree that deployments and builds are user data. If they are then why aren't all replication controllers and pods user data? I don't think you're suggesting we remove RCs and pods though 😄 In that case I think the system should be resilient enough to prune when necessary so that it does not kill storage. Relying on the user to prune something that could crash the system is definitely a short coming. |
I don't really make that distinction. We have APIs (which are backed by highly available stores). The data store for content management is the registry storage driver. So we put all content under the storage driver. If we had a different backend for signatures, it would be underneath the API, and the API has a backend. All clients in the system should talk to APIs. Image signatures, if they aren't content (which we made the argument that they are not) are just an API. |
|
etcd3 basically removes the size problem, so we shouldn't be arguing about etcd specifically as a store of large numbers of objects. |
I know it's been a while since I looked at the upstream code, but the last time I did, it stored signatures in the registry's storage. Are you referring to something else that we do on top of that? |
https://github.com/docker/docker.github.io/blob/master/registry/deprecated.md |
|
Thanks On Fri, Nov 18, 2016 at 4:12 PM, Alexey Gladkov [email protected]
|
No-no! You do not understand me. I don't propose to use external storage instead of our API. I suggest to store only certain data in external storage. The data which occupy a lot of space, grow quickly and to which we often make queries. Our API will remain unchanged. It will only be an internal change. |
To add/delete a replication controller or pod you need special permission. |
|
re[test] |
|
#11873 [test] |
|
Will respond more on Monday. In general anything we use to store content We aren't going to have an alternate db we access directly from the On Nov 18, 2016, at 6:19 PM, Michail Kargakis [email protected] — |
Signed-off-by: Gladkov Alexey <[email protected]>
Signed-off-by: Gladkov Alexey <[email protected]>
Signed-off-by: Gladkov Alexey <[email protected]>
Signed-off-by: Gladkov Alexey <[email protected]>
| imageSize = 1024 | ||
| ) | ||
|
|
||
| var _ = g.Describe("[registry][migration] manifest migration from etcd to registry storage", func() { |
There was a problem hiding this comment.
Add this test to the default test set in conformance and core (by adding a new reflex entry) so it always runs.
There was a problem hiding this comment.
(That is, if it isn't already being run by the conformance tests)
There was a problem hiding this comment.
Add this test to the default test set in conformance and core (by adding a new reflex entry) so it always runs.
@smarterclayton done
Signed-off-by: Gladkov Alexey <[email protected]>
|
Evaluated for origin testextended up to 16a4cbe |
|
Evaluated for origin test up to 16a4cbe |
|
continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/948/) (Base Commit: 13fbae5) (Extended Tests: core(from etcd to registry storage)) |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12647/) (Base Commit: 13fbae5) |
|
[merge] (the QE tested the fork_ami and found no issue, they were not testing the upgrade scenario) |
|
@smarterclayton FYI |
|
@ncdc I hope this won't break the rebase PR that much, but I don't want to hold this off longer. |
|
Ugh ok :-p
…On Tue, Jan 10, 2017 at 7:37 AM Michal Fojtik ***@***.***> wrote:
@ncdc <https://github.com/ncdc> I hope this won't break the rebase PR
that much, but I don't want to hold this off longer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11925 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAABYofagADBKZY8YByHoWVbRxO0tvhzks5rQ3ucgaJpZM4KzBoV>
.
|
|
@ncdc I don't expect this to break things a lot (no changes to deps and it is pretty isolated to registry code/image api). just a "big" change enough to give headsup :) |
|
I told him 😉 |
|
blame @soltysh for panicking. |
seems like RH registry outage. [merge] |
|
registry outage again [merge] |
|
Evaluated for origin merge up to 16a4cbe |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12726/) (Base Commit: f4ca6cf) (Image: devenv-rhel7_5649) |
We need to remove manifest from
Imageto reduce the amount of occupied etcd data. The docker-registry will store the manifest in the storage (where it stores the blobs). It removes the manifest from theImageafter fills in all metadata fields. The manifest will be removed when importing the image from an externaldocker/distribution.@miminar @soltysh @mfojtik please review.