Bug 896756 - hostnamectl fails if given an FQDN
Summary: hostnamectl fails if given an FQDN
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 18
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: 2013-01-17 22:49 UTC by Andrew McNabb
Modified: 2013-05-16 02:56 UTC (History)
11 users (show)

Fixed In Version: systemd-201-2.fc18.6
Clone Of:
Environment:
Last Closed: 2013-05-16 02:56:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew McNabb 2013-01-17 22:49:27 UTC
The new hostnamectl command fails if given a fully qualified domain name. For example, the following sequence is incorrect:

$ hostnamectl set-hostname host.example.com
$ hostname
hostexamplecom
$ hostname -s
hostexamplecom
$ hostname -f
hostname: No address associated with hostname
$

The correct output should be:

$ hostnamectl set-hostname host.example.com
$ hostname
host.example.com
$ hostname -s
host
$ hostname -f
host.example.com
$

Comment 1 benoît barthés 2013-01-29 02:45:36 UTC
hello,

# hostnamectl set-hostname example.com --static 
# hostname
example.com

hostname -f
hostname: No address associated with hostname

edit
vi /etc/hosts
127.0.0.1           example.com example 


hostname -f
example.com

after I do not know if this is the expected behavior

Comment 2 Madison Kelly 2013-02-13 18:16:05 UTC
I'm having the same problem as Andrew McNabb. I try to set;

hostnamectl set-hostname an-c03n01.alteeve.ca

and it records in /etc/hostname;

# cat /etc/hostname
an-c03n01alteeveca

As Benoit said, if I add '--static', it records the hostname properly;

# cat /etc/hostname
an-c03n01.alteeve.ca

The systemd version is 'systemd-197-1.fc18.1.x86_64.

Comment 3 Lennart Poettering 2013-04-09 11:22:28 UTC
Fixed in F19.

Comment 4 Jóhann B. Guðmundsson 2013-04-09 17:22:59 UTC
And the fix will be back ported right?

Comment 5 Fedora Update System 2013-04-10 20:09:41 UTC
systemd-201-2.fc18.1 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-201-2.fc18.1

Comment 6 Fedora Update System 2013-04-11 23:22:42 UTC
Package systemd-201-2.fc18.2:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.2'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.2
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-04-15 23:57:26 UTC
Package systemd-201-2.fc18.4:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.4'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.3
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-04-18 02:34:38 UTC
Package systemd-201-2.fc18.5:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.5
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-05-07 13:36:43 UTC
systemd-201-2.fc18.6 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.6

Comment 10 Fedora Update System 2013-05-09 09:59:36 UTC
Package systemd-201-2.fc18.6:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.6
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2013-05-16 02:56:14 UTC
systemd-201-2.fc18.6 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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