1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00
Kevin Kuehler 50dfca2eaf import: Only keep RO copy if ETag header is set
We fix the case when the webserver servers container images without
setting the ETag header in the response.  When an image is downloaded to
image root, a read only copy is stored alongside it.  The filename has
the following form:
    .raw-<encoded-url-of-image>.\x22<ETAG-header>\22.raw.
This is so, if the same resource is fetched multiple times, importd can
avoid extra downloads by creating the new image using the local read-only copy.

The current code assumes the ETag header is set because, if the server
does not set the ETag header, the file is stored without the ETag value
in the filename. When importd fetches a duplicate image, it will run
rename_noreplace and fail:

  Failed to rename raw file to /var/lib/machines/.raw-http:\x2f\x2flocalhost:8000\x2fwalkthroughd.raw: File exists

This patch makes importd only store a read-only image if the webserver
has set the ETag header.
2020-03-23 21:39:59 -07:00
2020-02-05 21:29:34 +09:00
2020-03-06 22:58:53 +01:00
2020-03-19 10:10:29 +01:00
2020-03-22 20:22:03 +01:00
2020-03-17 12:21:04 +01:00
2019-04-12 08:30:31 +02:00
2019-04-12 08:30:31 +02:00
2020-03-03 08:31:06 +01:00
2019-04-12 08:30:31 +02:00
2020-01-28 22:38:22 +01:00
2016-10-06 11:53:58 -04:00
2019-12-11 19:57:57 +01:00

Systemd

System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI Build Status
Coverity Scan Status
Fuzzit Status
OSS-Fuzz Status
CII Best Practices
Travis CI Build Status
Language Grade: C/C++
CentOS CI Build Status
Build Status

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.

Description
The systemd System and Service Manager
Readme 554 MiB
Languages
C 89.2%
Python 5.3%
Shell 4.1%
Meson 1.2%