TrueNAS scale not setting dns server from dhcp

dopey

Cadet
Joined
Feb 3, 2016
Messages
5
I thought I'd try out truenas scale to see how it works and migrated one of my truenas core instances to it. It's a small instance. Atom D2550 cpu.

Everything seems to be fine except for one thing. I'm configured to use DHCP on it and the nameserver isn't being set. /etc/resolv.conf is missing the nameserver configuration.

If i restart the interface it's fine, or if I edit the network configuration and specify a dns server it's fine. Is the possibly a race condition between the /etc config files generator and dhcp?

Anyways, not a big deal since it was easy to solve by manually specifying a nameserver but just thought I'd ask.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
If it's replicable, please "report a bug".... it will cause many users pain.
 

dopey

Cadet
Joined
Feb 3, 2016
Messages
5
Yeah it's consistently reproducible. I just haven't figured out what log to look at to see what's going on. I'll report a bug on it. Thanks
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I thought I'd try out truenas scale to see how it works and migrated one of my truenas core instances to it. It's a small instance. Atom D2550 cpu.

Everything seems to be fine except for one thing. I'm configured to use DHCP on it and the nameserver isn't being set. /etc/resolv.conf is missing the nameserver configuration.

If i restart the interface it's fine, or if I edit the network configuration and specify a dns server it's fine. Is the possibly a race condition between the /etc config files generator and dhcp?

Anyways, not a big deal since it was easy to solve by manually specifying a nameserver but just thought I'd ask.
I have already reported this bug? I thought they'd roll it in .

NOTE: FEW people would ever use DHCP on their server - it's kind of stupid, no offense. My server was a test server, hence DHCP - spare computer.
Found it:
 

dopey

Cadet
Joined
Feb 3, 2016
Messages
5
I disagree that it's stupid. This is my personal network. Not an enterprise solution. By using dhcp I have a single point of configuration for my IP allocation.

It's somewhat lazy, but works perfectly for home.

Yes in an enterprise environment it's dumb but not everyone is running in such an environment.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I disagree that it's stupid. This is my personal network. Not an enterprise solution. By using dhcp I have a single point of configuration for my IP allocation.

It's somewhat lazy, but works perfectly for home.

Yes in an enterprise environment it's dumb but not everyone is running in such an environment.
I've been running a home network for over 20 years, a lot of my devices are DHCP.
My router, switch, modem, wifi AP, DNS server, and NAS are all, very much not DHCP.

Perhaps not stupid, but unwise.
Regardless it's a bug, you're right -and I did report it, honestly I thought they fixed it.
Manually set one, for the time being.
 
Joined
Jun 2, 2019
Messages
591
You can set up DHCP static reservations for DHCP clients.

Example:

Screen Shot 2022-02-25 at 4.54.18 AM.png
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I don't think that will matter if it's a reserved DHCP address, I believe the server has a bug where it won't listen to the sub flag telling it "this is your DNS server"
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I disagree that it's stupid. This is my personal network. Not an enterprise solution. By using dhcp I have a single point of configuration for my IP allocation.

It's somewhat lazy, but works perfectly for home.

It doesn't work perfectly. It works until it doesn't work. There's a difference between those two things.

It's like claiming that riding around in a car without a seatbelt works perfectly. This could seem true, if you've never been in a car accident. However, the person who gets ejected through the windshield and into the colliding object may have a different idea of how perfect this was, while they're recovering in traction for the next three months.

The home user is ultimately responsible for all their own devices, so you don't have the same sorts of problems a larger scale network might have. But, on the flip side, that 8 port managed switch doesn't have a console port, the media streamer doesn't have a console port, the VoIP ATA doesn't have a console port, the other IoT devices don't have console ports, so when your DHCP server crashes, your network goes away and you become impotent to repair it, instead having to wander around rebooting devices like a chump.

Not my definition of perfect.

One common strategy is to use DHCP to bootstrap static IP addresses at devices, then set the device to static mode once there. This retains a lot of the benefits of single point of configuration, while eliminating the stupid failure mode.
 

widders

Cadet
Joined
Mar 13, 2022
Messages
1
Yeah it's consistently reproducible. I just haven't figured out what log to look at to see what's going on. I'll report a bug on it. Thanks
Do you have a link to the bug in question? I have a machine I hit this bug on as well; it's a headless box and I keep it on DHCP so I can move it from place to place sometimes and rely on at least being able to reach it over wireguard; post-upgrade, either this same bug or the one created for this topic is preventing it in some combination, causing it to:

- end up on the DNS/DHCP router as "server.lan.lan" instead of "server.lan", under a different local IP address than it was prior to the upgrade
- not have a configured DNS server or gateway route until network settings are re-applied
- and therefore does not become available on wireguard, either, since it does not know how to reach any other machines
 
Top