Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

app-admin/etcd-wrapper: use docker for the etcd service and drop etcd-wrapper #857

Merged
merged 2 commits into from
Mar 22, 2021

Conversation

pothos
Copy link
Contributor

@pothos pothos commented Feb 22, 2021

As rkt is deprecated we need to run the Etcd and Flannel container with Docker
or Podman. The etcd/flannel-wrapper script is based on rkt arguments and
can't be used in a compatible way but we cannot remove it since ct
explicitly uses it in the ExecStart directive when writing out a
drop-in file once flannel settings are given in a Container Linux
Config.
A better way to run the Flannel/etcd container image is Podman because
Flannel depends on etcd but wants to be run before Docker so that it
can set up the Docker networking. Etcd and Flannel are part of the
Container Linux Config specification and thus can't be removed easily.
For now we have to resort to running these services with Docker and try
to restart Docker for the Flannel options to take effect (but that also
terminates the etcd and flannel containers, causing the services to
restart).

How to use

Run kola tests for a cloud provider, not QEMU where the tests are excluded

A fix for the Kubernetes test is here: flatcar/mantle#162

Note: From now on it's not possible to specify Requires=flanneld.service for docker.service because that creates a cyclic dependency.

Testing done

here

@pothos pothos force-pushed the kai/remove-rkt branch 3 times, most recently from d584a55 to 8cde1a7 Compare February 22, 2021 13:00
@pothos pothos changed the title wip: use docker for etcd app-admin/etcd-wrapper: use docker for the etcd service and drop etcd-wrapper Feb 22, 2021
@pothos pothos force-pushed the kai/remove-rkt branch 3 times, most recently from 44f1409 to 39a7cd2 Compare February 23, 2021 12:10
@pothos pothos force-pushed the kai/remove-rkt branch 10 times, most recently from 6712ada to 9492621 Compare March 2, 2021 10:08
@pothos pothos force-pushed the kai/remove-rkt branch 7 times, most recently from b8873a6 to d4d4974 Compare March 9, 2021 11:32
@pothos pothos force-pushed the kai/remove-rkt branch 5 times, most recently from 2ff06e1 to 0e45695 Compare March 11, 2021 16:42
@pothos pothos force-pushed the kai/remove-rkt branch 4 times, most recently from f8336cf to 392919e Compare March 16, 2021 09:45
@pothos pothos marked this pull request as ready for review March 16, 2021 20:01
@pothos pothos requested a review from a team March 16, 2021 20:09
@pothos pothos force-pushed the kai/remove-rkt branch 4 times, most recently from a9c9410 to dabacdb Compare March 18, 2021 14:49
pothos added 2 commits March 19, 2021 16:17
Since rkt is deprecated we need to run the etcd container with Docker
or Podman. The etcd-wrapper script is based on rkt arguments and can't
be used in a compatible way but we cannot remove it since ct explicitly
uses it in the ExecStart directive when writing out a drop-in file once
etcd settings are given in a Container Linux Config.
A better way to run the Flannel/etcd container image is Podman because
Flannel depends on etcd but wants to be run before Docker so that it
can set up the Docker networking. Etcd and Flannel are part of the
Container Linux Config specification and thus can't be removed easily.
For now we have to resort to running these services with Docker and try
to restart Docker for the Flannel options to take effect.
As rkt is deprecated we need to run the Flannel container with Docker
or Podman. The flannel-wrapper script is based on rkt arguments and
can't be used in a compatible way but we cannot remove it since ct
explicitly uses it in the ExecStart directive when writing out a
drop-in file once flannel settings are given in a Container Linux
Config.
A better way to run the Flannel/etcd container image is Podman because
Flannel depends on etcd but wants to be run before Docker so that it
can set up the Docker networking. Etcd and Flannel are part of the
Container Linux Config specification and thus can't be removed easily.
For now we have to resort to running these services with Docker and try
to restart Docker for the Flannel options to take effect (but that also
terminates the etcd and flannel containers, causing the services to
restart).
@pothos
Copy link
Contributor Author

pothos commented Mar 19, 2021

Found out that the Kubernetes test failed because I had Wants=etcd-member.service for flannel.service but the test has etcd on a separate node, updated the PR.
Another reason it failed was that the test sets Requires=flanneld.service and After=flanneld.service for Docker and now we have a deadlock – I will update the test because Flannel restarts Docker now and settings this dependency does not work anymore.

Copy link
Contributor

@t-lo t-lo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

pothos added a commit to flatcar/mantle that referenced this pull request Mar 22, 2021
The updated test will only work when
flatcar-archive/coreos-overlay#857 is present in the
tested version.
@pothos pothos merged commit b5a1c3a into main Mar 22, 2021
@pothos pothos deleted the kai/remove-rkt branch March 22, 2021 18:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants