Red Hat Bugzilla – Bug 989584
Replace hostname with systemd hostnamectl
Last modified: 2015-06-29 21:23:09 EDT
Description of problem:
Use systemd hostnamectl command instead of hostname and drop Anaconda requirement on hostname
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Created attachment 779986 [details]
replace hostname with hostnamect patch
Created attachment 780613 [details]
Modified patch (execWithRedirect arguments)
Thanks for the patch, I had to modify it a bit.
Just note that set-hostname will set all three as in --static, --transient, --pretty
Is the high-level "pretty" hostname which might include all kinds of special characters (e.g. "My Laptop") and is used higher up the stack as in something you might see in System Settings --> Details in Gnome
Is dhcp-47-11, the transient hostname which might be assigned temporarily due to
network configuration and might revert back to the static hostname.
Is the $HOSTNAME as we know the static hostname to be as in the one which is used to initialize the kernel hostname at boot.
So you might want to limit it to just --static as in...
iutil.execWithRedirect("hostnamectl", ["set-hostname --static", hn])
And leave the rest to be set by network management and or firstboot/inital setup
(In reply to Jóhann B. Guðmundsson from comment #3)
In the modified hostname call in installer we want to set transient hostname (as with original hostname call). We don't care about static hostname in installer environment/root at this point, we create /etc/hostname in target root later. And we don't care about --pretty hostname in installer at all (yet).
Jóhann, I am not able to answer this question from review of the patch:
Can you answer it?
Not directly on the thread since I'm not subscripted to that list but I can do so here.
For the first nothing goes away from Fedora unless it's dead upstream or no one no longer maintains it here with us so it usually just means things get shuffled in,out or between comps groups.
Secondly afaik hostnamectl will not be replacing the NIS domain name related commands as in /bin/dnsdomainname. /bin/domainname, /bin/nisdomainname ,/bin/ypdomainname so anything that uses any of those will still need to be dependent on hostname component.
I however am looking into reducing the footprint in the core comps group ( which affects two components dhclient and initscripts and initscript wont go away until network management gets merged into systemd which from my pov is inevitable at some point ) when I noticed that only 11 components where dependent on hostname and Anaconda was one of them.
Since Anaconda already depends on systemd and is heavily using it and as you pointed out that it might in the future start using pretty hostname as well, it makes the most logical choice for it to use hostnamectl and stop using hostname and drop it's dependency on it in the process reducing the external components for the anaconda team to worry about by factor of one.
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.
More information and reason for this action is here:
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 20 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, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 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 please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.