tmpfiles: Ensure that /etc/coreos to flatcar symlink exists#7
Merged
pothos merged 1 commit intoflatcar-masterfrom Oct 13, 2020
Merged
tmpfiles: Ensure that /etc/coreos to flatcar symlink exists#7pothos merged 1 commit intoflatcar-masterfrom
pothos merged 1 commit intoflatcar-masterfrom
Conversation
The entries from the update or locksmith directive of a Container Linux
Config currently use the /etc/coreos/ folder for Ignition files:
printf "locksmith:\n reboot_strategy: off" | ct
results in:
{"ignition":{"config":{},"security":{"tls":{}},"timeouts":{},
"version":"2.3.0"},"networkd":{},"passwd":{},"storage":
{"files":[{"filesystem":"root", "path":"/etc/coreos/update.conf",
"contents":{"source":"data:,%0AREBOOT_STRATEGY%3D%22off%22",
"verification":{}},"mode":420}]},"systemd":{}}
With the pre-built rootfs this works because /etc/coreos is a symlink
to /etc/flatcar. However, with a fresh rootfs created by Ignition this
results in a /etc/coreos folder created by Ignition because there is no
symlink and the resulting files are ignored since only /etc/flatcar/ is
considered by update-engine and locksmith.
Set up the symlink and the target folder through a tmpfile directive to
ensure that it is there when Ignition runs even when with a new rootfs.
Fixes flatcar/Flatcar#190
Member
Author
|
I will include it in all maintenance branches. |
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Oct 13, 2020
This pulls in flatcar/init#28 and flatcar/baselayout#7 to ensure that the /etc/coreos to /etc/flatcar symlink always exists. Fixes flatcar/Flatcar#190
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Oct 13, 2020
This pulls in flatcar/init#28 and flatcar/baselayout#7 to ensure that the /etc/coreos to /etc/flatcar symlink always exists. Fixes flatcar/Flatcar#190
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Oct 13, 2020
This pulls in flatcar/init#28 and flatcar/baselayout#7 to ensure that the /etc/coreos to /etc/flatcar symlink always exists. Fixes flatcar/Flatcar#190
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Oct 13, 2020
This pulls in flatcar/init#28 and flatcar/baselayout#7 to ensure that the /etc/coreos to /etc/flatcar symlink always exists. Fixes flatcar/Flatcar#190
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Oct 19, 2020
This pulls in flatcar/init#28 and flatcar/baselayout#7 to ensure that the /etc/coreos to /etc/flatcar symlink always exists. Fixes flatcar/Flatcar#190
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The entries from the update or locksmith directive of a Container Linux
Config currently use the /etc/coreos/ folder for Ignition files:
printf "locksmith:\n reboot_strategy: off" | ct
results in:
{"ignition":{"config":{},"security":{"tls":{}},"timeouts":{},
"version":"2.3.0"},"networkd":{},"passwd":{},"storage":
{"files":[{"filesystem":"root", "path":"/etc/coreos/update.conf",
"contents":{"source":"data:,%0AREBOOT_STRATEGY%3D%22off%22",
"verification":{}},"mode":420}]},"systemd":{}}
With the pre-built rootfs this works because /etc/coreos is a symlink
to /etc/flatcar. However, with a fresh rootfs created by Ignition this
results in a /etc/coreos folder created by Ignition because there is no
symlink and the resulting files are ignored since only /etc/flatcar/ is
considered by update-engine and locksmith.
Set up the symlink and the target folder through a tmpfile directive to
ensure that it is there when Ignition runs even when with a new rootfs.
Fixes flatcar/Flatcar#190
How to use
Goes together with flatcar/init#28
Using an Ignition config like
should result in
/etc/flatcar/update.confhavingREBOOT_STRATEGY="off".Testing done
With the new image that also contains the change from flatcar/init#28 I was able to use the above Ignition config successfully, meaning that the symlink was set up and the
update.conffile was created under theflatcarfolder.