Project

Profile

Help

Issue #2123

closed

Layers are saved in gzip format when images are uploaded

Added by dkliban@redhat.com over 7 years ago. Updated about 5 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
Platform Release:
Target Release - Docker:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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

Actions #1

Updated by dkliban@redhat.com over 7 years ago

  • Description updated (diff)
Actions #2

Updated by mhrivnak over 7 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?

Actions #3

Updated by dkliban@redhat.com over 7 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.

Actions #4

Updated by mhrivnak over 7 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?

Actions #5

Updated by jluza over 7 years ago

I don't think it breaks anything. Uncompressed layers just take more space.

Actions #6

Updated by dkliban@redhat.com over 7 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.

Actions #7

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF