-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd-resolved: 'DNSStubListener=no' not working because of SELinux denial #679
Comments
Correction. All streams have this service. It quietly exits on any
It's not unconditional. See conditions:
The
Which service are you referencing here?
FCOS And
The logs from the service would have output log messages if it Maybe the real issue we should dig in to is why the user is getting |
Ok this is confusing to me:
Maybe this is just systemd-resolved fighting tmpfiles in this case? |
The
I guess :) - I'm not super familiar with the code.
If the user started from an F33 base, the
Maybe. It would be great to have a small reproducer for being able to investigate this further. |
Ah, yes, this is the case we're hitting here. Probably coreos-migrate is wrongly accused and the real issue is tmpfiles.d creating a symlink which cannot be changed by systemd-resolved. I'll work on a reproducer and update this ticket |
@vrutkovs any reproducer yet? |
Right, unable to reproduce:
So its no coreos-migrate service |
which version were you using?
I'm kind of interested in what is going on here. Do you mind sharing the FCCT or Ignition file you used so I can reproduce? |
This seems to be an selinux issue...
Here is the really odd thing. if I
but look at this:
why is on a Fedora 33 system it looks like this:
The security context is different and doesn't point to Here is the error
Failing on creating a link file... why is it making a linked file? |
So because of the patch described above, when DNSStubListener=no, systemd-resolved tries to create a symbolic link. However, the selinux context is bad since it is now a link... unfortunately, semanage is no longer on coreos so I cant run: so I guess for this process to work the secontext needs to be fixed for the link... |
and there is I commented out most of the code in it so that it didn't actually make a new /etc/resolv.conf but deleted it and created a link to
I also added a file
which are the local ip and domain. This results in:
and DNS is properly resolved... and this is with the standard
So I think it is quite feasible to use --John |
To me it looks like when using:
systemd-resolved tries to symlink I found this bug and added a comment. Let's see if we can get it fixed: https://bugzilla.redhat.com/show_bug.cgi?id=1896796 |
And yes, that is exactly what is happening...
Awesome... Thank you --John |
seems this bug breaks instances which did already run through several update cycles and are doing the latest coreos stable update (first 33 release) for "newer" instances running one of the latest 32er releases the upgrade works would be great to find a future prove solution which does not break again on the next update |
my current quickfix was to just create the symlink |
@zyclonite - Any chance you are hitting the SELinux issue metioned in https://discussion.fedoraproject.org/t/fedora-coreos-rebasing-to-fedora-33-features-and-known-issues/25474 ? |
@dustymabe brilliant hint, that was exactly my problem - only that node had an accidentally changed policy and was never cleaned up |
The fix for this went into testing stream release |
@dustymabe: 2020-12-07: UPDATED BUG DESCRIPTION
The bug is due to an SELinux denial: see #679 (comment)
Describe the bug
FCOS from testing/next-devel comes with
coreos-migrate-to-systemd-resolved
service, which unconditionally links /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf. In some situations this may not be desirable (i.e. OKD disables this setting for kubelet / CoreDNS compatibility).Systemd-resolved controls symlink location itself, perhaps this service is not needed?
So when a user boots from F32 Stable to F33 OKD content resolv.conf the service is disabled and systemd-resolved correctly manages the symlink. However if FCOS testing is used the symlink is already set to stub-resolv.conf and systemd is unable to switch it back
See okd-project/okd#380.
OKD OS content - https://github.com/openshift/okd-machine-os/tree/release-4.6/overlay/etc/systemd
The text was updated successfully, but these errors were encountered: