Bug 989584 - Replace hostname with systemd hostnamectl
Replace hostname with systemd hostnamectl
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Radek Vykydal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 11:09 EDT by Jóhann B. Guðmundsson
Modified: 2015-06-29 21:23 EDT (History)
9 users (show)

See Also:
Fixed In Version: anaconda-20.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-06-29 21:23:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
replace hostname with hostnamect patch (1.98 KB, patch)
2013-07-29 11:10 EDT, Jóhann B. Guðmundsson
no flags Details | Diff
Modified patch (execWithRedirect arguments) (1.25 KB, patch)
2013-07-30 08:29 EDT, Radek Vykydal
no flags Details | Diff

  None (edit)
Description Jóhann B. Guðmundsson 2013-07-29 11:09:27 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):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Jóhann B. Guðmundsson 2013-07-29 11:10:06 EDT
Created attachment 779986 [details]
replace hostname with hostnamect patch
Comment 2 Radek Vykydal 2013-07-30 08:29:45 EDT
Created attachment 780613 [details]
Modified patch (execWithRedirect arguments)

Thanks for the patch, I had to modify it a bit.
Comment 3 Jóhann B. Guðmundsson 2013-07-30 09:49:17 EDT
Just note that set-hostname will set all three as in --static, --transient, --pretty

--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

--transient
Is dhcp-47-11, the transient hostname which might be assigned temporarily due to
network configuration and might revert back to the static hostname.

--static 
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
Comment 4 Radek Vykydal 2013-07-30 10:23:48 EDT
(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).
Comment 5 Radek Vykydal 2013-07-31 04:14:25 EDT
Jóhann, I am not able to answer this question from review of the patch:

https://lists.fedorahosted.org/pipermail/anaconda-patches/2013-July/005046.html

Can you answer it?
Comment 6 Jóhann B. Guðmundsson 2013-07-31 06:36:23 EDT
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.
Comment 7 Fedora End Of Life 2013-09-16 13:02:57 EDT
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:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 8 Fedora End Of Life 2015-05-29 05:13:40 EDT
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'
of '20'.

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.
Comment 9 Fedora End Of Life 2015-06-29 21:23:09 EDT
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
bug.

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.