[17:16] I run Debian stable. I do not understand why cloud-init adds certain hostname alternatves as I do not see how this is caused by the debian template. Also cloud-init makes that Postfix sees a hostname and not a fqdn which creates trouble. [17:16] Any pointers regarding docs or how to analyse this? [17:17] (My host has many aliases, so why a selection is made and linked to 127.1.0.1 although it has DNS entries puzzles me) [17:28] zathras: clean up your config, and do `cat | nc termbin.com 9999` so people can take a look? [17:29] Quark, which config(file) would that be? [17:30] cloud.cfg in /etc/cloud? [17:30] zathras: the one you are using for cloud-init (user-data, meta-data, etc.). [17:32] I did not actually install it. It came with the install of Debian when I selected it as OS for my Hetzner VPS. So it has Debian and Hetzner config stuff. Nothing I added, set or changed [17:32] so I am not entirely sure [17:32] Oh, I see. [17:32] Hmm. [17:33] conf.d hsa 1 debian and 2 Hetzner files [17:33] cloud.cfg.d sorry [20:45] zathras: as Quark mentioned you'd need to provide details of the configuration used by cloud-init in order for anyone to help [20:53] Most of my troubles seem to originate from the Debian template. However it mentions that manage_etc_hosts is set. Setting it to false will help I assume. However I cannot find it in /etc/cloud but I do find it in /var/lib/cloud/instances// in vendor-data.txt vendor-data.txt.1 and vendor-cloud-config.txt [20:54] Will setting this to false help or is it just there for creation and no (re)booting purposes? If so: where should I do that? [20:54] *and not [20:57] The docs say: I should change the setting in /etc/cloud/cloud.cfg or cloud-config from user data. The setting can not be found in the first. And the second? I have no idea where that is. [20:57] could not find something in /root [21:00] zathras: what exactly is your "trouble" with the Debian template? [21:58] minimal, sorry for the delay. The Debian template sets /etc/hosts with 127.0.1.1 {{fqdn}} {{hostname} [21:59] The problem with this is that {{fqdn}} now no longer points to my external IP obviously [22:00] so Postfix complains as it is also configured to use dkim/dmarc and thinks the IP-address is spoofed [22:02] In its log I get SMTP error 553 5.7.1 sender address rejected. Due to the unmatched IP/hostname as the later is set to 127.0.1.1 [22:03] related to ehlo [22:04] that sounds like a Postfix configuration-related issue [22:05] by "external IP" I assume you're referring to a NAT'ed IP (i.e. not an actual IP address configured on an interface of the VM) [22:06] no. The actual internet v4 address [22:07] Postfix takes the hostname or you can set it in the config of Postfix itself [22:07] However then this hostname no longer matches to the IP in DNS as it gets fubar-ed by the 127.1.1.0 setting enforced by cloud-init [22:09] So I have 2 questions: 1. has 'managed_etc_hosts' impact on booting or was it just useful during the initial setup of the server? 2. If useful during boot, where can/should I (re)configure it? [22:18] However I just read that cloud_init_modules update_etc_hosts can be commented out to fix it too [22:18] is this the way to go? [22:19] basically: https://serverfault.com/questions/1108760/how-to-disable-etc-hosts-from-resetting-after-reboot [22:21] zathras: did you read https://cloudinit.readthedocs.io/en/latest/reference/modules.html#update-etc-hosts && https://cloudinit.readthedocs.io/en/latest/reference/modules.html#update-hostname ? [22:25] I did read some docs, but missed these. I just read them. I missed on *where* (which file/location) to define that setting [22:26] It is nice that an example is provided, but it does not specify in which file/location [22:31] in user-data of course... [22:33] ok. Thank you. But where is that? Not in /etc/cloud and I did not spot it somewhere in /root [22:33] it's whereever your cloud provider lets you specify it [22:33] when you create the VM [22:33] see 1.40 up where I specify what I found on my system [22:34] ? [22:35] 1 hour 40 mins ago I specified my layout and where I did grep/found manage_etc_hosts [22:36] It looks like genereated files in /var/lib/cloud where I found it 3 times. But I did not find it in /etc/cloud [22:37] The VPS provider is Hetzner [22:38] so figure out where in Hetzner's GUI for creating VMs they let you specify user-data [22:41] user-data is specified at the time a VM is created [22:46] I did find: etc/cloud/cloud.cfg.d/90-hetznercloud.cfg with a setting: preserve_hostname [22:47] seems like a solution to me. Stil no clue about where the user-data is stored though [22:47] you provide the user-data when you create the VM [22:48] how exactly did you create the VM? [22:48] uhm. The VM is created through a webinterface. I never specified a thing. I also did not choose to install cloud-init [22:48] so then you did not provide any user-data [22:49] only things like: user-account, size of disk, name of server. That is about it iirc [22:50] https://docs.hetzner.com/cloud/servers/faq/#can-i-use-cloud-init-when-creating-servers [22:50] I also see definitions in hat cfg file for: cloud_dir: /var/lib/cloud/ && templates_dir: /etc/cloud/templates/ [22:50] "While creating your server, you can inject cloud-init user data" [22:51] yes. I just read that. However I never did. [22:52] maybe as a background process initiated by the Hetzner Web-gui. But not intentionally [22:53] But am I right that preserve_host: True is the fix I am looking for? [22:53] and it was suggested that you DO "inject" user-data if you want to set such things as "manage_etc_hosts" or "preserve_hostname" etc [22:54] fine by me if I knew where to do that [22:55] that would be a question best addressed to Hetzner support [22:55] I will search the web-gui [23:05] could not find it. Filed a support request. Probably an answer tomorrow