Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-27 Thread Thomas Cameron
On 1/26/22 11:32, Matthew Miller wrote: On Tue, Jan 25, 2022 at 11:55:03AM -0600, Thomas Cameron wrote: This may be the resolution, is to just disable systemd-resolved. I hate to do it, though. I still don't understand why the hostname isn't being set correctly. Can you file a bug for this plea

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-27 Thread Thomas Cameron
On 1/26/22 11:32, Matthew Miller wrote: On Tue, Jan 25, 2022 at 11:55:03AM -0600, Thomas Cameron wrote: This may be the resolution, is to just disable systemd-resolved. I hate to do it, though. I still don't understand why the hostname isn't being set correctly. Can you file a bug for this plea

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-27 Thread Thomas Cameron
On 1/27/22 01:21, Samuel Sieb wrote: What are these plenty of things?  This is the first that I know of.  And the question still remains.  Is the OS looking up the hostname at runtime or was it always the installer setting it at install time? Historically it's looked up its hostname at boot t

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-27 Thread Thomas Cameron
On 1/26/22 16:48, Samuel Sieb wrote: I think I figured out what he's doing and I'm kind of surprised that it works at all.  He's expecting the system to use its IP address to lookup its hostname.  That seems wrong.  Maybe what is working is that the installer does that lookup and sets the hostn

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-27 Thread Thomas Cameron
On 1/26/22 16:17, Peter Boy wrote: Disabling systemd-resolved might not be the best idea. That makes you a good candidate for surprise follow-up problems elsewhere. I’m wondering, if something is wrong with your DHCP / DNS service. I mean, I guess it could be, but I've used ISC dhcpd and name

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-27 Thread Peter Boy
> Am 27.01.2022 um 06:59 schrieb Tim via users : > > …. > > * DHCP can accept a hostname from a client, but it doesn't have to. > * DHCP can give a hostname to a client, but it doesn't have to, and > the client doesn't have to accept it. > * A host can find out its hostname from its IP address

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-27 Thread Samuel Sieb
On 1/26/22 23:45, Tim via users wrote: Tim: I don't see why that's wrong, there were plenty of things that discover their hostname by doing a reverse look-up of their IP. And he demonstrated several releases that worked exactly that way. Samuel Sieb: What are these plenty of things? This is

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-26 Thread Tim via users
Tim: >> I don't see why that's wrong, there were plenty of things that >> discover their hostname by doing a reverse look-up of their IP. And >> he demonstrated several releases that worked exactly that way. Samuel Sieb: > What are these plenty of things? This is the first that I know of. > And

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-26 Thread Samuel Sieb
On 1/26/22 21:59, Tim via users wrote: On Wed, 2022-01-26 at 14:48 -0800, Samuel Sieb wrote: I think I figured out what he's doing and I'm kind of surprised that it works at all. He's expecting the system to use its IP address to lookup its hostname. That seems wrong. Maybe what is working is

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-26 Thread Tim via users
On Wed, 2022-01-26 at 14:48 -0800, Samuel Sieb wrote: > I think I figured out what he's doing and I'm kind of surprised that > it works at all. He's expecting the system to use its IP address to > lookup its hostname. That seems wrong. Maybe what is working is > that the installer does that look

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-26 Thread Peter Boy
> Am 26.01.2022 um 23:48 schrieb Samuel Sieb : > > The DCHP server is the one that's supposed to be supplying the hostname. Yes, indeed. In my test setup here, I use dnsmasq (as libvirt plugin) and find in /var/lib/libvirt/dnsmasq/virbr0.macs entries like: { "domain": "vm1", "macs"

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-26 Thread Samuel Sieb
On 1/26/22 14:17, Peter Boy wrote: Am 25.01.2022 um 18:46 schrieb Thomas Cameron : I just did a fresh kickstart of F35 Server. I didn't do anything to set the hostname during installation. At first boot, I could see that the hostname was set to the reverse DNS-provided hostname "hostxxx.tc

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-26 Thread Peter Boy
> Am 25.01.2022 um 18:46 schrieb Thomas Cameron > : > > I just did a fresh kickstart of F35 Server. I didn't do anything to set the > hostname during installation. > > At first boot, I could see that the hostname was set to the reverse > DNS-provided hostname "hostxxx.tc.camerontech.com" -

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-26 Thread Matthew Miller
On Tue, Jan 25, 2022 at 11:55:03AM -0600, Thomas Cameron wrote: > This may be the resolution, is to just disable systemd-resolved. I > hate to do it, though. I still don't understand why the hostname > isn't being set correctly. Can you file a bug for this please? Thanks. -- Matthew Miller Fed

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-25 Thread Thomas Cameron
On 1/25/22 11:48, Thomas Cameron wrote: I forgot to mention - disabling systemd-resolved does not make the system get the reverse DNS assigned hostname. It's just set to "fedora." Actually, I was incorrect! It said "fedora" as the hostname until I logged in at the console. Then the hostname

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-25 Thread Thomas Cameron
On 1/24/22 09:50, Petr Menšík wrote: One key difference might be enabled systemd-resolved by default in Fedora 34, but it is not in RHEL9. I think it should not be related directly. But could it? What does hostnamectl report after installation? What it thinks the hostname is? Would the behaviour

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-25 Thread Thomas Cameron
On 1/24/22 09:50, Petr Menšík wrote: One key difference might be enabled systemd-resolved by default in Fedora 34, but it is not in RHEL9. I think it should not be related directly. But could it? What does hostnamectl report after installation? What it thinks the hostname is? Would the behaviour

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-24 Thread Petr Menšík
Man 5 hostname says different thing. I would guess as many things changes after long time, systemd would be responsible somehow. From what they describe your machine has to obtain hostname from DHCP lease. If it does not, it fall back to transient name "fedora". Nothing there is mentioned about re

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-24 Thread Petr Menšík
One key difference might be enabled systemd-resolved by default in Fedora 34, but it is not in RHEL9. I think it should not be related directly. But could it? What does hostnamectl report after installation? What it thinks the hostname is? Would the behaviour change if you disable systemd-resolved

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/20/22 20:10, Thomas Cameron wrote: I made a quick video of the difference between F35 and RHEL 8.5. https://youtu.be/KuvqInOg1u8 Skip to about the 1:30 mark to see the difference between F35 and RHEL 8.5. I've seen the hostname assigned by reverse DNS with every version of RHEL since at

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/20/22 20:30, Tim via users wrote: On Thu, 2022-01-20 at 19:45 -0600, Thomas Cameron wrote: OK, so this is weird. I just kickstarted a F35 VM. When it booted up, its hostname was host156.tc.camerontech.com, as I expected it to be. The /etc/hostname file is blank - it just has a single empty

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Tim via users
On Thu, 2022-01-20 at 19:45 -0600, Thomas Cameron wrote: > OK, so this is weird. I just kickstarted a F35 VM. When it booted > up, its hostname was host156.tc.camerontech.com, as I expected it to > be. > > The /etc/hostname file is blank - it just has a single empty line. > > After I rebooted tha

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/20/22 19:43, Thomas Cameron wrote: On 1/20/22 19:40, Tom Horsley wrote: I never once had that happen. And I installed hundreds of virtual machines with different releases for different distros for testing at work. It has worked this way for YEARS. Is your environment set up with working

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/20/22 19:17, Thomas Cameron wrote: On 1/17/22 15:30, Petr Menšík wrote: I think it might make more sense to correctly detect hostname during installation. If you define hostname on installation from network, it should be kept. I expect it should keep the same hostname during reboots. I thin

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/20/22 19:40, Tom Horsley wrote: I never once had that happen. And I installed hundreds of virtual machines with different releases for different distros for testing at work. It has worked this way for YEARS. Is your environment set up with working forward and reverse DNS? I just tested

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Tom Horsley
On Thu, 20 Jan 2022 19:20:22 -0600 Thomas Cameron wrote: > But this is the behavior Linux has used for years and years. If you set > your hostname to localhost.localdomain, say via a kickstart script or a > golden image you use to spin up dozens of instances, previous versions > of Fedora would

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/17/22 14:29, Sam Varshavchik wrote: It should be possible to hack up a script that gets run when an IP address is assigned that does a reverse IP lookup and sets the hostname. However that should be done in a manner that does not permanently save the hostname so that it gets reverted to

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/17/22 15:30, Petr Menšík wrote: I think it might make more sense to correctly detect hostname during installation. If you define hostname on installation from network, it should be kept. I expect it should keep the same hostname during reboots. I think only diskless terminals may want always

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/17/22 04:27, Tim via users wrote: I sort-of go along with that. If you've set a hostname, there's sense in it not getting changed. On the other hand, if you use a DHCP server to centrally manage the allocation of addresses, you might also want it (or your DNS server) to control hostnames.

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/17/22 01:42, Peter Boy wrote: I was already afraid that I had overlooked something essential. :-) The default configuration rather follows the opposite principle. The hostname should be well defined and independent of changing IP addresses. I guess the only way will be to determine the ho

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-20 Thread Thomas Cameron
On 1/18/22 04:10, Petr Menšík wrote: dhcp server of libvirt is dnsmasq. It would provide hostnames when it has matching dhcp-record with IP and name (and hwaddr). With libvirt, that would be set by in network configuration xml. I think it should use also /etc/hosts of the host. But dnsmasq can

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-18 Thread Petr Menšík
On 1/17/22 05:40, Tim via users wrote: > On Sun, 2022-01-16 at 15:53 -0600, Thomas Cameron wrote: >> All of a sudden with F35, no matter what the address of the VM is, >> its hostname is set to fedora. Just fedora. Not >> fedora.tc.camerontech.com. > I see your pain, that doesn't really work well

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-17 Thread Petr Menšík
On 1/17/22 11:27, Tim via users wrote: > On Mon, 2022-01-17 at 08:42 +0100, Peter Boy wrote: >> The default configuration rather follows the opposite principle. The >> hostname should be well defined and independent of changing IP >> addresses. > I sort-of go along with that. If you've set a host

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-17 Thread Sam Varshavchik
Peter Boy writes: > Am 17.01.2022 um 16:22 schrieb Sam Varshavchik : > > Peter Boy writes: > >> Usually you set the static hostname once using "hostnamectl set-hostname “. „fedora“ is the transient hostname. DHCP client uses the static hostname to request an IP. >> >> But maybe I didn't ge

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-17 Thread Peter Boy
> Am 17.01.2022 um 16:22 schrieb Sam Varshavchik : > > Peter Boy writes: > >> Usually you set the static hostname once using "hostnamectl set-hostname >> “. „fedora“ is the transient hostname. DHCP client uses the static >> hostname to request an IP. >> >> But maybe I didn't get what exactl

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-17 Thread Sam Varshavchik
Peter Boy writes: Usually you set the static hostname once using "hostnamectl set-hostname “. „fedora“ is the transient hostname. DHCP client uses the static hostname to request an IP. But maybe I didn't get what exactly you want to do. dhcpd's configuration file uses MAC addresses to as

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-17 Thread Tim via users
On Sun, 2022-01-16 at 23:25 -0600, Thomas Cameron wrote: > As a dirty hack, I created a file /etc/profile.d/hostname.sh: > MYIP=`hostname -I` > MYHOSTNAME=`host $MYIP | awk '{ print $NF }' | sed "s/\.$//"` > echo $MYHOSTNAME > /etc/hostname > hostnamectl hostname $MYHOSTNAME > That sets the hostnam

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-17 Thread Tim via users
On Mon, 2022-01-17 at 08:42 +0100, Peter Boy wrote: > The default configuration rather follows the opposite principle. The > hostname should be well defined and independent of changing IP > addresses. I sort-of go along with that. If you've set a hostname, there's sense in it not getting changed.

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-16 Thread Peter Boy
Am 16.01.2022 um 22:53 schrieb Thomas Cameron :On 1/16/22 15:00, Peter Boy wrote:Do you want to set the hostname at every boot?Usually you set the static hostname once using "hostnamectl set-hostname “.  „fedora“ is the transient hostname. DHCP client uses the static hostname to request an IP.But m

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-16 Thread Thomas Cameron
On 1/16/22 22:40, Tim via users wrote: On Sun, 2022-01-16 at 15:53 -0600, Thomas Cameron wrote: All of a sudden with F35, no matter what the address of the VM is, its hostname is set to fedora. Just fedora. Not fedora.tc.camerontech.com. I see your pain, that doesn't really work well when you

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-16 Thread Tim via users
On Sun, 2022-01-16 at 15:53 -0600, Thomas Cameron wrote: > All of a sudden with F35, no matter what the address of the VM is, > its hostname is set to fedora. Just fedora. Not > fedora.tc.camerontech.com. I see your pain, that doesn't really work well when you have several Fedora PCs, does it? (I

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-16 Thread Thomas Cameron
On 1/16/22 15:00, Peter Boy wrote: Do you want to set the hostname at every boot? Usually you set the static hostname once using "hostnamectl set-hostname “. „fedora“ is the transient hostname. DHCP client uses the static hostname to request an IP. But maybe I didn't get what exactly you wan

Re: How to get Fedora 35 to use DNS name as hostname?

2022-01-16 Thread Peter Boy
> Am 16.01.2022 um 21:31 schrieb Thomas Cameron > : > > ... > What is the preferred way of having Fedora 35 server instances use the host's > hostname from DNS? I notice that if I restart NetworkManager.service, then > the reverse DNS hostname is set - hostname gives me host123.mydomain.com.

How to get Fedora 35 to use DNS name as hostname?

2022-01-16 Thread Thomas Cameron
It looks like the hostname is set in /etc/profile to uname -n, which means every instance I spin up thinks its hostname is "fedora." I don't want that. I want each hostname to set its hostname to whatever its DNS name is. We used to set the hostname in /etc/hostname to localhost.localdomain,