From Fedora Project Wiki
(Initial Draft)
 
(Updates based on collaboration with Cloud, IoT, Server, Workstation representatives.)
Line 1: Line 1:
{{admon/important | Comments and Explanations | The page source contains comments providing guidance to fill out each section. They are invisible when viewing this page. To read it, choose the "view source" link.<br/> '''Copy the source to a ''new page'' before making changes!  DO NOT EDIT THIS TEMPLATE FOR YOUR CHANGE PROPOSAL.'''}}
{{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].}}
{{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].}}


Line 20: Line 18:
* Email: dustymabe@redhat.com
* Email: dustymabe@redhat.com
* Name: [[User:davdunc| David Duncan]] (Fedora Cloud)
* Name: [[User:davdunc| David Duncan]] (Fedora Cloud)
* Email:
* Email: davdunc@gmail.com
* Name: [[User:pwhalen| Paul Whalen]] (Fedora IoT)
* Name: [[User:pwhalen| Paul Whalen]] (Fedora IoT)
* Email:
* Email: pwhalen@redhat.com
* Name: [[User:salimma| Michel Alexandre Salim]] (Fedora Server)
* Name: [[User:salimma| Michel Alexandre Salim]] (Fedora Server)
* Email:
* Email: michel@michel-slm.name
* Name: [[User:ngompa| Neal Gompa]] (Fedora Server)
* Name: [[User:ngompa| Neal Gompa]] (Fedora Workstation/KDE)
* Email:
* Email: ngompa13@gmail.com




Line 53: Line 51:
== Detailed Description ==
== Detailed Description ==


Back in Fedora 33 the default 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 in systemd and was never proposed as a change in Fedora itself.
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 original enablement upstream was in https://github.com/systemd/systemd/pull/5175 and the BZ requesting the change in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1392925
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 some pain (primarily in Fedora CoreOS user reported issues) because setting the hostname via reverse DNS lookups (via NetworkManager) stopped working along with breaking 3rd 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 even seems that 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).
Unfortunately, this caused issues because setting the hostname via reverse DNS lookups (via NetworkManager) stopped working along with breaking 3rd 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. This will allow variants that prefer `localhost` to configure it that way.
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 ==
== Feedback ==
Line 92: Line 90:
     https://fedoraproject.org/wiki/Changes/perl5.26 (major upgrade to a popular software stack, visible to users of that stack)
     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 3rd 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 ==
== Scope ==
* Proposal owners:
* 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?-->
<!-- 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 -->
* 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?-->
<!-- 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 -->
* 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.  
<!-- 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 -->
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) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Policies and guidelines: N/A (not needed for this Change)
<!-- Do the packaging guidelines or other documents need to be updated for this feature?  If so, does it need to happen before or after the implementation is done?  If a FPC ticket exists, add a link here. Please submit a pull request with the proposed changes before submitting your Change proposal. -->
   
 
* Trademark approval: N/A (not needed for this Change)
* Trademark approval: N/A (not needed for this Change)
<!-- If your Change may require trademark approval (for example, if it is a new Spin), file a ticket ( https://pagure.io/Fedora-Council/tickets/issues ) requesting trademark approval from the Fedora Council. This approval will be done via the Council's consensus-based process. -->


* Alignment with Objectives:  
* Alignment with Objectives: N/A
<!-- Does your proposal align with the current Fedora Objectives: https://docs.fedoraproject.org/en-US/project/objectives/ ? It's okay if it doesn't, but it's something to consider -->


== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->
   
 
There will be NO upgrade impact to systems where:
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
   
 
- 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 impatct. An 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 ==
== How To Test ==
<!-- This does not need to be a full-fledged document. Describe the dimensions of tests that this change implementation is expected to pass when it is done. If it needs to be tested with different hardware or software configurations, indicate them.  The more specific you can be, the better the community testing can be.
   
 
Boot an instance of the flavor of Fedora you are testing in an environment where there is no DHCP hostname provided and no anser 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`.
Remember that you are writing this how to for interested testers to use to check out your change implementation - documenting what you do for testing is OK, but it's much better to document what *I* can do to test your change.
 
A good "how to test" should answer these four questions:
 
0. What special hardware / data / etc. is needed (if any)?
1. How do I prepare my system to test this change? What packages
need to be installed, config files edited, etc.?
2. What specific actions do I perform to check that the change is
working like it's supposed to?
3. What are the expected results of those actions?
-->
 
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
 


== User Experience ==
== User Experience ==
Line 148: Line 156:
  - 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.
  - 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 ==
== Dependencies ==
Line 153: Line 163:


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
   
There will be changes to the `systemd` and `fedora-release` packages for this change.




Line 158: Line 170:


<!-- 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.  -->
<!-- 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: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency mechanism: Revert the pull requests to the `systemd` and `fedora-release` packages.
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Contingency deadline: Final Freeze
* Contingency deadline: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Blocks release? Yes
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? N/A (not a System Wide Change), Yes/No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->




== Documentation ==
== Documentation ==
   
The fallback hostname has now changed to `localhost` for the Cloud, CoreOS, IoT, and Server variants of Fedora.
   
<!-- 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. -->
<!-- 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. -->


Line 177: Line 190:
Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze.  
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".

Revision as of 15:10, 26 May 2022

Idea.png
Guidance
For details on how to fill out this form, see the documentation.


Fallback Hostname

Summary

This proposal is for the fallback hostname for server like variants of Fedora to use localhost as the fallback hostname.

Owner


Current status

  • Targeted release: Fedora Linux 37
  • Last updated: 2022-05-26
  • 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 3rd 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

Benefit to Fedora

With this change Fedora's server-like variants will become more compatible with 3rd 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:

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:

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.


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 impatct. An 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 anser 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

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

There will be changes to the systemd and fedora-release packages for this change.


Contingency Plan

  • Contingency mechanism: Revert the pull requests to the systemd and fedora-release packages.
  • Contingency deadline: Final Freeze
  • Blocks release? Yes


Documentation

The fallback hostname has now changed to localhost for the Cloud, CoreOS, IoT, and Server variants of Fedora.


N/A (not a System Wide Change)

Release Notes

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