Bug 1655068 - Running read-only container with systemd causes failed dnf-makecache.service
Summary: Running read-only container with systemd causes failed dnf-makecache.service
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora Container Images
Classification: Fedora
Component: base
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clement Verna
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-30 13:15 UTC by Jan Pazdziora
Modified: 2020-01-07 13:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-07 13:54:22 UTC


Attachments (Terms of Use)

Description Jan Pazdziora 2018-11-30 13:15:39 UTC
Description of problem:

When systemd container is run as read-only, the state of systemd is shows as degraded, presumably because dnf-makecache.service failed.

Version-Release number of selected component (if applicable):

REPOSITORY                          TAG   IMAGE ID       CREATED       SIZE
registry.fedoraproject.org/fedora   28    ded494ce3076   7 weeks ago   264MB

How reproducible:

Deterministic.

Steps to Reproduce:
1. sudo podman run --read-only --name systemd -d registry.fedoraproject.org/fedora:28 /usr/sbin/init
2. sudo podman exec systemd systemctl is-system-running
3. Wait some time, up to 10 minutes
4. sudo podman exec systemd systemctl status dnf-makecache.service

Actual results:

degraded
exit status 1

● dnf-makecache.service - dnf makecache
   Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2018-11-30 12:40:01 UTC; 33min ago
  Process: 85 ExecStart=/usr/bin/dnf makecache timer (code=exited, status=1/FAILURE)
 Main PID: 85 (code=exited, status=1/FAILURE)

Nov 30 12:40:00 0224cccc3922 systemd[1]: Starting dnf makecache...
Nov 30 12:40:01 0224cccc3922 dnf[85]: Config error: Read-only file system: '/var/log/dnf.log'
Nov 30 12:40:01 0224cccc3922 systemd[1]: dnf-makecache.service: Main process exited, code=exited, status=1/FAILURE
Nov 30 12:40:01 0224cccc3922 systemd[1]: dnf-makecache.service: Failed with result 'exit-code'.
Nov 30 12:40:01 0224cccc3922 systemd[1]: Failed to start dnf makecache.
exit status 3

Expected results:

running

The dnf-makecache.service (and the dnf-makecache.timer) likely shouldn't be enabled at all in container -- it does not make sense in run time.

Additional info:

Comment 1 Clement Verna 2018-12-17 20:18:00 UTC
This should work as expected, could you double check ? 

Thanks

Comment 2 Clement Verna 2018-12-17 20:25:21 UTC
Oops sorry wrong bugzilla, I ll try this one to check if the latest image make this works as disired or not

Comment 3 Ben Cotton 2020-01-07 13:54:22 UTC
Closing this bug as Fedora 28 reached EOL status on 2019-05-28.


Note You need to log in before you can comment on or make changes to this bug.