Bug 2047512 - hostname not set correctly via reverse DNS
Summary: hostname not set correctly via reverse DNS
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-27 23:49 UTC by Thomas Cameron
Modified: 2022-12-13 16:28 UTC (History)
15 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-12-13 16:28:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Thomas Cameron 2022-01-27 23:49:44 UTC
Description of problem:
Hostname is not getting set correctly at bootup. When I kickstart a F35 vm, the first time it boots it gets its hostname via reverse DNS. After the first reboot, the hostname is set to "fedora" with no domain name.

Version-Release number of selected component (if applicable):
Fedora 35


How reproducible:
Kickstart a minimal VM with F35. 


Steps to Reproduce:
1. Kickstart a VM with @core only
2. Boot system
3. Hostname is set the first time, but at reboot it's set to "fedora"

Actual results:
hostname set to "fedora" but should be set via reverse DNS.


Expected results:
hostname should be set to whatever reverse DNS resolves to.

Additional info:
This has been discussed on the Fedora mailing list at https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/thread/B57BG5VVSLHQ345A5NTR6E3OEUF6K7FH/ - see that thread for multiple examples including videos I posted explaining the weird behavior.

Comment 1 Thomas Cameron 2022-01-27 23:58:30 UTC
One interesting thing to note is that when I kickstart the machine, while the kickstart is going on, the hostname is set correctly via reverse DNS. Once the system boots up and I log in, it's set to "fedora" instead of hostxxx.domain.tld. 

If I disable systemd-resolved.service and reboot, then the hostname is set to hostxxx.domain.tld again.

Comment 2 Thomas Cameron 2022-01-28 00:01:01 UTC
This is the ks.cfg I'm using for my kickstart:

[root@dixie-flatline templates]# cat f35ks.cfg
text
reboot

# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

url --url="http://172.31.100.28/cblr/links/f35server-x86_64"
repo --name=Everything --baseurl=https://mirrors.kernel.org/fedora/updates/35/Everything/x86_64/
repo --name=Modular --baseurl=https://mirrors.kernel.org/fedora/updates/35/Modular/x86_64/

%packages
@core
bash-completion
bind-utils
vim-default-editor
-nano-default-editor
-firewalld.noarch

%end

# Run the Setup Agent on first boot
firstboot --enable

# Generated using Blivet version 3.4.2
# ignoredisk --only-use=vda
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
autopart --type=plain

timesource --ntp-server=grom.polpo.org
timesource --ntp-server=clock.fmt.he.net
timesource --ntp-server=50-39-230-98.bvtn.or.ptr.ziplyfiber.com
timesource --ntp-server=time.cloudflare.com
# System timezone
timezone America/Chicago --utc

# Root password
rootpw --iscrypted [REDACTED]
user --groups=wheel --name=thomas.cameron --password=[REDACTED] --iscrypted --gecos="Thomas Cameron"

%post
yum -y install iptables-services
systemctl enable iptables.service
%end

Comment 3 Pavel Zhukov 2022-01-28 07:33:54 UTC
Thank you for reporting this. 
This is not hostname package to blame though. The package set hostname which was specified as the argument and it's the `caller` responsible for this. Even more hostnamectl should be used in modern Fedora's, not hostname.

According to https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/message/LZXWCOPN6KAN2RUWWITSL75UBA3R7QVM/ the bug report should be filled against systemd-resolved component, not hostname.

Comment 4 Thomas Cameron 2022-01-28 16:34:08 UTC
systemd-resolved doesn't show up as a component against which I can file a BZ

Comment 5 Ben Cotton 2022-11-29 17:45:41 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Ben Cotton 2022-12-13 16:28:39 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.