Page MenuHomeVyOS Platform

Host name and domain name missing from the FRR configuration
Closed, ResolvedPublicBUG

Description

Doing a show running-config inside vtysh after a reboot can either have just has a single (incorrect) hostname line of 'debian', or TWO hostname lines of 'debian' and then the correct hostname.

The domainname inside frr very rarely set. I suspect this is because dns-domain-name is set at priority 400, but the bootstrap of frr is at priority 150

https://github.com/vyos/vyos-1x/blob/current/interface-definitions/dns-domain-name.xml.in
https://github.com/vyos/vyos-1x/blob/current/interface-definitions/system-frr.xml.in

This leads to a non-deterministic startup where sometimes the hostname is set, and imported into frr correctly, and some times it's not.

This is most visible on a single CPU VM, which makes issues like this stand out, as two things can't happen at the same time.

I suspect a simple fix for this would be to set the system hostname and domainname earlier than priority 150.

Details

Difficulty level
Easy (less than an hour)
Version
1.4-2023-05-23
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

I have the correct host-name after reboot

vyos@r14:~$ 
vyos@r14:~$ vtysh -c "show run" | match host
hostname r14
vyos@r14:~$ 
vyos@r14:~$ 
vyos@r14:~$ show ver
Version:          VyOS 1.4-rolling-202305260317
Release train:    current

I checked 6 routers, 2 showed the issue. No idea what the impact is. All of them running 1.3.2.

danhusan@VYFriv:~$ vtysh -c "show run" | match host
hostname debian
hostname VYFriv

danhusan@b2:~$ vtysh -c "show run" | match host
hostname debian
hostname b2

danhusan@myv:~$ vtysh -c "show run" | match host
hostname myv

danhusan@c2:~$ vtysh -c "show run" | match host
hostname c2

danhusan@c1:~$ vtysh -c "show run" | match host
hostname c1

danhusan@b1:~$ vtysh -c "show run" | match host
hostname b1

It's actually an old issue.

My idea that just popped to my head is to use https://github.com/vyos/vyatta-cfg/blob/current/scripts/init/vyos-router to set the hostname prior to launching FRR

This should fix the hostname issue reported to BGP neighbors: https://github.com/vyos/vyos-1x/pull/2289

There is an upstream issue with FRR when changing domainname CLI option https://github.com/FRRouting/frr/issues/14444

c-po moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
c-po moved this task from Finished to In Progress on the VyOS 1.4 Sagitta board.
c-po moved this task from Finished to In Progress on the VyOS 1.5 Circinus board.
c-po changed the task status from Open to Needs testing.Oct 3 2023, 4:02 PM

The hostname part should be fixed by now in recent builds

Domain name was never implemented, the task T2004

dmbaturin renamed this task from frr 'hostname' missing or incorrect, and domain-name missing totally to Host name and domain name missing from the FRR configuration.May 10 2024, 7:16 PM