Merge pull request #59730 from mnasiadka/docker_live_restore

cephadm: Support Docker Live Restore

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
Adam King 2024-09-19 16:58:37 -04:00 committed by GitHub
commit cadfc96393
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 6 deletions

View File

@ -24,6 +24,10 @@ Requirements
Any modern Linux distribution should be sufficient. Dependencies
are installed automatically by the bootstrap process below.
See `Docker Live Restore <https://docs.docker.com/engine/daemon/live-restore/>`_
for an optional feature that allows restarting Docker Engine without restarting
all running containers.
See the section :ref:`Compatibility With Podman
Versions<cephadm-compatibility-with-podman>` for a table of Ceph versions that
are compatible with Podman. Not every version of Podman is compatible with

View File

@ -9,7 +9,7 @@ Description=Ceph %i for {{fsid}}
After=network-online.target local-fs.target time-sync.target{% if has_docker_engine %} docker.service{% endif %}
Wants=network-online.target local-fs.target time-sync.target
{%- if has_docker_engine %}
Requires=docker.service
Wants=docker.service
{%- endif %}
PartOf=ceph-{{fsid}}.target

View File

@ -5,7 +5,7 @@ After=network-online.target local-fs.target time-sync.target
Wants=network-online.target local-fs.target time-sync.target
{%- if has_docker_engine %}
After=docker.service
Requires=docker.service
Wants=docker.service
{%- endif %}
Before=ceph-{{ identity.fsid }}@%i.service

View File

@ -5,7 +5,7 @@ After=network-online.target local-fs.target time-sync.target
Wants=network-online.target local-fs.target time-sync.target
{%- if has_docker_engine %}
After=docker.service
Requires=docker.service
Wants=docker.service
{%- endif %}
After={{ primary.service_name }}

View File

@ -27,11 +27,11 @@ def _get_unit_file(ctx, fsid):
return str(systemd_unit._get_unit_file(ctx, fsid))
def test_docker_engine_requires_docker():
def test_docker_engine_wants_docker():
ctx = context.CephadmContext()
ctx.container_engine = mock_docker()
r = _get_unit_file(ctx, '9b9d7609-f4d5-4aba-94c8-effa764d96c9')
assert 'Requires=docker.service' in r
assert 'Wants=docker.service' in r
def test_podman_engine_does_not_req_docker():
@ -80,7 +80,7 @@ def test_new_docker():
'# configuration.',
'After=network-online.target local-fs.target time-sync.target docker.service',
'Wants=network-online.target local-fs.target time-sync.target',
'Requires=docker.service',
'Wants=docker.service',
'PartOf=ceph-9b9d7609-f4d5-4aba-94c8-effa764d96c9.target',
'Before=ceph-9b9d7609-f4d5-4aba-94c8-effa764d96c9.target',
'[Service]',