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
No DNS Lookups possible in rescue system when systemd-resolved is used #2015
Comments
I do not use systemd-resolved and I don't know I simply use @nniehoff Because you did not provide us your ReaR configuration files
no DNS is needed to access the backup on the NFS server, cf. If you must use systemd-resolved to set up networking |
@jsmeix
I will look into using the NETWORKING_PREPARATION_COMMANDS to see if I can come up with a workaround. You are correct a potential workaround would be to use an IP however, I typically avoid using IPs as DNS is usually a better practice (an argument could be made in a disaster recovery situation it may not be a good idea to rely on DNS either). I reported this bug as the default in Ubuntu Bionic (18.04) and later is to use systemd-resolved. |
If I understand it well - if the |
@nniehoff I guess an alternative (untested) workaround could be
or via
(see default.conf for PRE_RECOVERY_SCRIPT). |
@OliverO2 As far as I know you use ReaR on Ubuntu
it seems you may have even used ReaR on Ubuntu with systemd-resolved My question is now if you could provide us information |
It is true, I am using Ubuntu, 16.04, 18.04 and 18.10. Unfortunately, I have not yet tested the 18.x versions with ReaR yet. But this is scheduled to change soon (in a matter of weeks). What I can say is that Ubuntu 16.04.x DNS clients actually run systemd-resolved.service (with Now this issue is about 18.04, and from what I've found in this article everything changes with that version. The old configuration files are still around (huh!) but the relevant stuff seems to sit in |
@OliverO2 It seems that thingy is so red hot exciting new For more info about it see |
@OliverO2 thanks for pointing out this fundamental change. I guess somebody will have to provide or sponsor some coding to support Ubuntu 18.04 properly. |
Offhandedly (without any look at the DNS related code in ReaR): I think we do not need to replicate in the ReaR recovery system I think in the ReaR recovery system a plain traditional As far as I see (at least on my openSUSE Leap 15.0 system)
Because I like it so much when the user has the final power
and then it results /etc/resolv.conf in the recovery system
|
@nniehoff How exactly did you do it? |
@jsmeix |
Interestingly that Ubuntu way of DNS setup I guess I can further enhance build/GNU/Linux/630_verify_resolv_conf_file.sh |
@jsmeix from text in #2015 (comment) I believe a resolv.conf file is available (albeit via a symlink). Would it not be enough to detect this and make sure we copy the real file (and not just the symlink). I believe we already have such code in place? |
@gdha
as far as I understand your But a loopback IP address for the DNS nameserver cannot work within Accordingly I did |
@nniehoff @OliverO2 To test it copy my new one e.g. from onto your usr/share/rear/build/GNU/Linux/630_verify_resolv_conf_file.sh |
…r_issue_2015 Improved setup of etc/resolv.conf in the recovery system: By default in the recovery system a plain traditional /etc/resolv.conf file with an entry of a remote 'nameserver DNS.server.IP.address' is needed. It cannot work when /etc/resolv.conf contains only loopback IP addresses (which happens when the stub resolver systemd-resolved is used) or when there is no nameserver entry so that "rear mkrescue/mkbackup" errors out in this case. For non-default cases the user must specify what he wants via the new USE_RESOLV_CONF variable that is described in default.conf. See #2015
No news is good news so that I merged #2018 By default /etc/resolv.conf in the recovery system is a copy
For non-default cases the user must specify what he wants via the Adding support in ReaR when systemd-resolved is used needs |
Not necessarily. ;) I'll test it anyway on Ubuntu 18.04 once I'll be using ReaR on that version. As I've said, in a matter of weeks. If any issues come up, I'll report, of course. |
For initial test results, see #2018 (comment). |
With #2076 merged This way it should in particular no longer falsely error out on systems |
Relax-and-Recover (ReaR) Issue Template
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
ReaR version ("/usr/sbin/rear -V"): 2.4 / 2018-06-21
OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"): Ubuntu 18.04
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"): NA
Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR): KVM guest
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device): amd64
Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot): NA
Storage (lokal disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe): local disk
Description of the issue (ideally so that others can reproduce it): Ubuntu 18.04 uses systemd-resolved for DNS resolution therefore the entry in /etc/resolv.conf is 127.0.0.53. When the rescue media is created this fails to resolve DNS and therefore also fails to resolve hostnames for remote backups. Current DNS servers can be retrieved by
systemd-resolve --status
, there are probably other methods to get DNS.Workaround, if any: after booting into recovery media set DNS servers by hand
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
The text was updated successfully, but these errors were encountered: