# 20220427_Fedora-Fallback-Hostname-Change Change wiki page: https://fedoraproject.org/wiki/Changes/FallbackHostname {{admon/tip | Guidance | For details on how to fill out this form, see the [https://docs.fedoraproject.org/en-US/program_management/changes_guide/ documentation].}} <!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name. This keeps all change proposals in the same namespace --> = Fallback Hostname <!-- The name of your change proposal --> = == Summary == <!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release. Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". --> This proposal is for the fallback hostname for server like variants of Fedora to use `localhost` as the fallback hostname. == Owner == <!-- For change proposals to qualify as self-contained, owners of all affected packages need to be included here. Alternatively, a SIG can be listed as an owner if it owns all affected packages. This should link to your home wiki page so we know who you are. --> * Name: [[User:dustymabe| Dusty Mabe]] (Fedora CoreOS) * Email: dustymabe@redhat.com * Name: [[User:davdunc| David Duncan]] (Fedora Cloud) * Email: davdunc@gmail.com * Name: [[User:pwhalen| Paul Whalen]] (Fedora IoT) * Email: pwhalen@redhat.com * Name: [[User:salimma| Michel Alexandre Salim]] (Fedora Server) * Email: michel@michel-slm.name * Name: [[User:ngompa| Neal Gompa]] (Fedora Workstation/KDE) * Email: ngompa13@gmail.com == Current status == [[Category:ChangePageIncomplete]] <!-- When your change proposal page is completed and ready for review and announcement --> <!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler --> <!-- The Wrangler announces the Change to the devel-announce list and changes the category to Category:ChangeAnnounced (no action required) --> <!-- After review, the Wrangler will move your page to Category:ChangeReadyForFesco... if it still needs more work it will move back to Category:ChangePageIncomplete--> <!-- Select proper category, default is Self Contained Change --> [[Category:SystemWideChange]] * Targeted release: [[Releases/37 | Fedora Linux 37 ]] * Last updated: <!-- this is an automatic macro — you don't need to change this line --> {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}} <!-- After the change proposal is accepted by FESCo, tracking bug is created in Bugzilla and linked to this page Bugzilla state meanings: ASSIGNED -> accepted by FESCo with ongoing development MODIFIED -> change is substantially done and testable ON_QA -> change is fully code complete --> * FESCo issue: <will be assigned by the Wrangler> * Tracker bug: <will be assigned by the Wrangler> * Release notes tracker: <will be assigned by the Wrangler> == Detailed Description == In Fedora 33 the default fallback hostname was changed from `localhost` to `fedora` for Fedora Linux instances that didn't get the hostname set in any other way (i.e. it's the fallback if it's not set anywhere else). This change came in a systemd update and was never proposed as a change in Fedora itself. The enablement upstream was in https://github.com/systemd/systemd/pull/5175 and the BZ requesting the change in Fedora was https://bugzilla.redhat.com/show_bug.cgi?id=1392925. The original reasoning being that `localhost` is a bad hostname for auto-discovery protocols (think `avahi`) that are useful for more desktop applications. Unfortunately, this caused issues because setting the hostname via reverse DNS lookups (via NetworkManager) stopped working along with breaking third party tools that set the hostname. The NetworkManager problem was subsequently fixed, but it still remains that a lot of third party software will check to see if an instance's hostname is "unset" by checking the current hostname against the string "localhost". Additionally it appears this change will never be picked up by Fedora's primary downstream in CentOS/RHEL (see https://src.fedoraproject.org/rpms/systemd/c/13d1341b108a24d13f5922054307b5c2efc6836a?branch=rawhide). The proposal here is to enable variants of Fedora Linux to configure their default/fallback hostname and to set the default for variants targetting servers (Cloud, CoreOS, IoT, Server) to `localhost`. == Feedback == <!-- Summarize the feedback from the community and address why you chose not to accept proposed alternatives. This section is optional for all change proposals but is strongly suggested. Incorporating feedback here as it is raised gives FESCo a clearer view of your proposal and leaves a good record for the future. If you get no feedback, that is useful to note in this section as well. For innovative or possibly controversial ideas, consider collecting feedback before you file the change proposal. --> == Benefit to Fedora == <!-- What is the benefit to the distribution? Will the software we generate be improved? How will the process of creating Fedora releases be improved? Be sure to include the following areas if relevant: If this is a major capability update, what has changed? For example: This change introduces Python 5 that runs without the Global Interpreter Lock and is fully multithreaded. If this is a new functionality, what capabilities does it bring? For example: This change allows package upgrades to be performed automatically and rolled-back at will. Does this improve some specific package or set of packages? For example: This change modifies a package to use a different language stack that reduces install size by removing dependencies. Does this improve specific Spins or Editions? For example: This change modifies the default install of Fedora Workstation to be more in line with the base install of Fedora Server. Does this make the distribution more efficient? For example: This change replaces thousands of individual %post scriptlets in packages with one script that runs at the end. Is this an improvement to maintainer processes? For example: Gating Fedora packages on automatic QA tests will make rawhide more stable and allow changes to be implemented more smoothly. Is this an improvement targeted as specific contributors? For example: Ensuring that a minimal set of tools required for contribution to Fedora are installed by default eases the onboarding of new contributors. When a Change has multiple benefits, it's better to list them all. Consider these Change pages from previous editions as inspiration: https://fedoraproject.org/wiki/Changes/Annobin (low-level and technical, invisible to users) https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo (low-level, but visible to advanced users) https://fedoraproject.org/wiki/Changes/VirtualBox_Guest_Integration (primarily a UX change) https://fedoraproject.org/wiki/Changes/NoMoreAlpha (an improvement to distro processes) https://fedoraproject.org/wiki/Changes/perl5.26 (major upgrade to a popular software stack, visible to users of that stack) --> With this change Fedora's server-like variants will become more compatible with third party tools that expect a hostname of `localhost` means the system is unconfigured. It also will mean system administrator's will see `localhost` and assume the hostname is unconfigured. == Scope == * Proposal owners: <!-- What work do the feature owners have to accomplish to complete the feature in time for release? Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?--> The feature owners will update the systemd compile time switch for fallback hostname back to `localhost`. The `fedora-release` package will be updated such that the Fedora Server, IoT, Cloud, and CoreOS editions will use `localhost` as the fallback hostname. All other variants of Fedora (the ones that target desktop/laptop uses) will default to `fedora` as the fallback hostname. The proposed changes are a relatively small amount of a work. * Other developers: <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> <!-- What work do other developers have to accomplish to complete the feature in time for release? Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?--> For any variants other than Cloud, CoreOS, IoT, and Server they will see no change. Work with QA to verify other editions continue to have a fallback hostname of `fedora`. For Cloud, CoreOS, IoT, and Server the default fallback hostname would be `localhost`. * Release engineering: [https://pagure.io/releng/issues #Releng issue number] <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> <!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)? Is a mass rebuild required? include a link to the releng issue. The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication --> No changes needed for release engineering. * Policies and guidelines: N/A (not needed for this Change) * Trademark approval: N/A (not needed for this Change) * Alignment with Objectives: N/A == Upgrade/compatibility impact == There will be NO upgrade impact to systems where: * An admin statically set the hostname * A hostname was provided to a system via DHCP * A hostname was found for a system via reverse DNS lookup In the case where none of the above are true for a system (i.e. a fallback hostname will be used) the following upgrade impact will be observed: * Fedora Cloud: No impact. A booted Fedora Cloud 36 instance has `/etc/hostname` written by `cloud-init` on first boot. * Fedora CoreOS: No impact. Already using `localhost` as fallback hostname. * Fedora IoT: Some impact. The fallback hostname will change from `fedora` to `localhost` after upgrade. * Fedora Server: Some impact. The fallback hostname will change from `fedora` to `localhost` after upgrade. For Fedora IoT and Fedora Server we will announce the change and encourage users to statically set a hostname for their machines if they don't want the change in behavior. == How To Test == Boot an instance of the flavor of Fedora you are testing in an environment where there is no DHCP hostname provided and no answer to a reverse DNS lookup for the instance IP. Run `hostnamectl get-hostname` and verify that it matches expectation. For Fedora Cloud, CoreOS, IoT, Server it should be `localhost`. For all others it should be `fedora`. == User Experience == <!-- If this change proposal is noticeable by users, how will their experiences change as a result? This section partially overlaps with the Benefit to Fedora section above. This section should be primarily about the User Experience, written in a way that does not assume deep technical knowledge. More detailed technical description should be left for the Benefit to Fedora section. Describe what Users will see or notice, for example: - Packages are compressed more efficiently, making downloads and upgrades faster by 10%. - Kerberos tickets can be renewed automatically. Users will now have to authenticate less and become more productive. Credential management improvements mean a user can start their work day with a single sign on and not have to pause for reauthentication during their entire day. - Libreoffice is one of the most commonly installed applications on Fedora and it is now available by default to help users "hit the ground running". - Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system. --> For Cloud, CoreOS, IoT and Server users will notice intances now default to `localhost` if a hostname is not provided to an instance by any other means. For all other variants of Fedora there will be no change. == Dependencies == <!-- What other packages (RPMs) depend on this package? Are there changes outside the developers' control on which completion of this change depends? In other words, completion of another change owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate? Other upstream projects like the kernel (if this is not a kernel change)? --> <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> There will be changes to the `systemd` and `fedora-release` packages for this change. == Contingency Plan == <!-- If you cannot complete your feature by the final development freeze, what is the backup plan? This might be as simple as "Revert the shipped configuration". Or it might not (e.g. rebuilding a number of dependent packages). If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy. --> * Contingency mechanism: Revert the pull requests to the `systemd` and `fedora-release` packages. * Contingency deadline: Final Freeze * Blocks release? Yes == Documentation == <!-- Is there upstream documentation on this change, or notes you have written yourself? Link to that material here so other interested developers can get involved. --> <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> The fallback hostname has now changed to `localhost` for the Cloud, CoreOS, IoT, and Server variants of Fedora. == Release Notes == <!-- The Fedora Release Notes inform end-users about what is new in the release. Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ --> <!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns. If there are any such changes involved in this change, indicate them here. A link to upstream documentation will often satisfy this need. This information forms the basis of the release notes edited by the documentation team and shipped with the release. Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze. --> The fallback hostname has now changed for the Cloud, CoreOS, IoT, and Server editions of Fedora to `localhost`. The fallback hostname is the hostname that is set if the hostname cannot be determined by any other mechanism (statically set, DHCP, or reverse DNS). This change was done in order to conform to the common expectation that a hostname of `localhost` on a system means the hostname is "unset".