This message was deleted.
# harvester
a
This message was deleted.
p
I'm just learning the Harvester HCI thing... One thing that I realized at some point is that Harvester uses the Elemental OS distribution which is "immutable". When the OS boots up, you end up with a pristine copy from the install image with a few exceptions. Then, there are tasks reading configuration files and perform some updates. By these docs, you should be able to go through the /oem/90_custom.yaml route described here: https://docs.harvesterhci.io/v1.4/install/update-harvester-configuration With the right question, a chatbot should be able to detail this further.
b
So when you run the installer there's an option to input the node name. Ultimately that's the shortname that is set on the host.
I believe you can set the fqdn automatically via the transient name and dhcp via a PTR record.
f
Hey, thanks a lot for the explanations πŸ™ The OEM 90_custom.yaml approach works well β€” my customizations are applied correctly after installation and reboot. One thing I noticed: Harvester/Elemental does not fully regenerate
/etc/hosts
if I define it myself. Instead, it updates the existing
127.0.0.1
line and automatically appends the
<hostname>
to it, like:
Copy code
127.0.0.1 localhost <hostname>
This happens even when the file already exists. In my setup this caused issues, because resolving the hostname to
127.0.0.1
breaks some parts of the CSI stack. However, if I add a line like:
Copy code
<node-ip> <node-fqdn> <hostname>
before the localhost entry, then
hostname -f
resolves correctly and everything works fine β€” Harvester leaves this line untouched. So the file is not fully overwritten, but Harvester still modifies the localhost entry based on the node name. I may also enforce the correct FQDN with:
Copy code
hostnamectl set-hostname <fqdn>
in the custom YAML, but the priority of lines in
/etc/hosts
already fixes the issue. Just sharing this behavior in case it helps others with custom networking.
@bland-article-62755 thats right but in my environment I am using static IPs and I think in the order it will first check /etc/hosts then dns and by default harvester set 127.0.0.1 localhost <hostname> so hostname -f will return localhost by default I still havent understand what mechanism is setting it but thanks anyway πŸ™‚
b
I'm also using static IPs but we still have dhcp PTR records.
You can also do a pretty easy hack and set it with a command in some yaml with
hostnamectl
f
yes I was thinking about that also to add in the initramfs
b
yep, I'm not sure if that's the best stage for it, but it it would probably work.
βœ… 1
rootfs
might be a good stage since if there's mods to the /etc/hosts file, it'd be available.