-
Story
-
Resolution: Done
-
Undefined
-
None
-
None
-
Upstream
-
5
-
False
-
-
False
-
-
-
0
-
0.000
[1606839959] Upstream Reporter: Joe Doss
Upstream issue status: Closed
Upstream description:
<walters> EDIT: Transferring this issue from rpm-ostree
Basically let's add something like:
```
variant: fcos
version: x
bootc:
target: quay.io/example/customos:latest
```One reason we should do this is that we need systemd unit ordering which correctly orders against `ignition-firstboot-complete.target` among others (see below).
Original issue follows:
—*Host system details*
```
[root@appliance ~]# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
? ostree-unverified-registry:registry.local:5000/appliance:devel
Digest: sha256:ce098ae1aeaff8663df6a8ae131f4ae7af70c810ae518f542fddc20ad20cbcad
Version: 37.20221211.3.0 (2022-12-29T18:37:01Z)fedora:fedora/x86_64/coreos/stable
Version: 37.20221211.3.0 (2022-12-26T13:53:28Z)
Commit: 93930f1bbe732751297fb7e5c4b7f3b79c563a803f3cf8c48115f84c541f86a7
GPGSignature: Valid signature by ACB5EE4E831C74BB7C168D27F55AD3FB5323552A
```*Expected vs actual behavior*
When using the latest `quay.io/fedora/fedora-coreos:stable` image based off of `37.20221211.3.0` the symlinks for systemd units that are enabled within the layer are no longer present so layered systemd units do not load on reboot.
Using an older verison of FCOS `36.20221001.3.0` works as expected.
Here is the steps in my container layer build process that show the symlinks being created
```
STEP 20/25: WORKDIR /usr/src/appliance
--> 07fdcd5afef
STEP 21/25: RUN tar xf app.tar && ./install.sh
Created symlink /etc/systemd/system/default.target.wants/pod-appliance.service ? /etc/systemd/system/pod-appliance.service.
--> dba68fb0482
STEP 22/25: WORKDIR /
--> a1fdc9a8b0a
STEP 23/25: COPY units/appliance-config.service /etc/systemd/system/appliance-config.service
--> 428764c8876
STEP 24/25: RUN systemctl enable appliance-config.service && touch /etc/appliance/env/appliance-config.env && sed -i 's/#AutomaticUpdatePolicy.*/AutomaticUpdatePolicy=stage/' /etc/rpm-ostreed.conf
Created symlink /etc/systemd/system/default.target.wants/appliance-config.service ? /etc/systemd/system/appliance-config.service.
--> 3907077e435
STEP 25/25: RUN ostree container commit
```But when I reboot into this container layer
```
Fedora CoreOS 37.20221211.3.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos[core@appliance ~]$ sudo su -
[root@appliance ~]# ls -lah /etc/systemd/system/default.target.wants/appliance-config.service
ls: cannot access '/etc/systemd/system/default.target.wants/appliance-config.service': No such file or directory
```The symlink is not present. The unit file is however present on the file system from the layer:
```
[root@appliance ~]# ls -lah /etc/systemd/system/appliance-config.service
rw-rr-. 1 root root 984 Dec 29 18:37 /etc/systemd/system/appliance-config.service
```Expected:
Working systemd units after layering an image on FCOS and rebooting.
*Steps to reproduce it*
Use the latest `quay.io/fedora/fedora-coreos:stable` image based off of `37.20221211.3.0`. Add and enable a systemd unit in your Containerfile, layer that on to FCOS and watch the systemd unit be enabled on boot.
- links to