Issue #2123
closedLayers are saved in gzip format when images are uploaded
Description
It looks like Pulp uses gzip[0] to compress layers when they are uploaded. However, no such compression occurs on the sync[1].
[0] https://github.com/pulp/pulp_docker/blob/master/plugins/pulp_docker/plugins/importers/upload.py#L159
[1] https://github.com/pulp/pulp_docker/blob/master/plugins/pulp_docker/plugins/importers/v1_sync.py#L158
Updated by mhrivnak over 6 years ago
This is just because the format of data output by "docker save" is different than the format of data made available by the v1 API. When doing a sync, the layers retrieved have already been compressed. For unknown reasons, the output of "docker save" created uncompressed files. I think pulp's behavior is correct, unless you saw something to the contrary?
Updated by dkliban@redhat.com over 6 years ago
I saw that you you can end up with a mixture of layer formats. If you sync some content from a registry and upload other content into a repository, Pulp ends up storing some layers in compressed format and others as uncompressed tars.
Updated by mhrivnak over 6 years ago
Can you add some info on the consequences of this? Does docker complain or break in some way when it tries to access such a repo?
Updated by jluza over 6 years ago
I don't think it breaks anything. Uncompressed layers just take more space.
Updated by dkliban@redhat.com over 6 years ago
- Status changed from NEW to CLOSED - NOTABUG
I don't have an example of how this adversely affects docker client when accessing the repos. The problem that was being observed was due to a misconfiguration of the web server that was serving the images. The Content-Encoding header was getting set to x-gzip all the time - even when the layer was not gzipped. This is not a bug in pulp docker.