Bug 885858 - myhostname not in nsswitch.conf after upgrade from F17
Summary: myhostname not in nsswitch.conf after upgrade from F17
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: nss-myhostname
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-10 20:01 UTC by Luya Tshimbalanga
Modified: 2015-09-17 13:49 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-02-05 13:45:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
nsswitch (1.67 KB, text/plain)
2012-12-11 19:56 UTC, Luya Tshimbalanga
no flags Details
fedup debug (916.17 KB, text/x-log)
2012-12-11 22:49 UTC, Luya Tshimbalanga
no flags Details

Description Luya Tshimbalanga 2012-12-10 20:01:43 UTC
Description of problem:
After upgrade from F17 to F18, hostnamectl failed to add existing hostname to localhost inside /etc/hosts

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Upgrade from F17 to F18
2.
3.
  
Actual results:
When restarting httpd

    # tail /var/log/httpd/error_log
    [Mon Dec 10 10:48:36.809250 2012] [unique_id:alert] [pid 6371] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "kwetu.TELUS1603"
    AH00016: Configuration Failed
    [Mon Dec 10 10:49:46.923515 2012] [core:notice] [pid 6393] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Mon Dec 10 10:49:46.926343 2012] [suexec:notice] [pid 6393] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Mon Dec 10 10:49:46.948561 2012] [unique_id:alert] [pid 6393] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "kwetu.TELUS1603"
    AH00016: Configuration Failed
    [Mon Dec 10 11:03:48.657513 2012] [core:notice] [pid 6670] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Mon Dec 10 11:03:48.658666 2012] [suexec:notice] [pid 6670] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Mon Dec 10 11:03:48.682028 2012] [unique_id:alert] [pid 6670] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "kwetu.TELUS1603"
    AH00016: Configuration Failed



Expected results:
hostname should be added in localhost

Additional info:

Comment 1 Kay Sievers 2012-12-11 00:29:37 UTC
We do not want to edit /etc/hosts for hostname changes.

I guess that's what nss-myhostname is for. You don't have that installed?

Comment 2 Luya Tshimbalanga 2012-12-11 19:21:59 UTC
Yes, nss-myhostname is installed.

Installed Packages
nss-myhostname.x86_64                    0.3-3.fc18                    installed

In that case, would it be nice to provide a better documentation about the change or handle the upgrade in graceful manner during upgrade? Prior to F17, httpd did not encounter the issue until recently hence error_log.

Comment 3 Michal Schmidt 2012-12-11 19:28:17 UTC
Could you attach your /etc/nsswitch.conf ?

Comment 4 Luya Tshimbalanga 2012-12-11 19:56:48 UTC
Created attachment 661631 [details]
nsswitch

Here is the file. Apparently, according to the document via
yum info, 'myhostname' should be added in hosts: line. It still does not explain why that did not happen during upgrade.

Comment 5 Luya Tshimbalanga 2012-12-11 20:01:10 UTC
In addition, when restarting httpd as local server,

# journalctl -n
Dec 11 11:58:05 kwetu.TELUS1603 httpd[11446]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress thi
Dec 11 11:58:05 kwetu.TELUS1603 systemd[1]: Starting The Apache HTTP Server...
Dec 11 11:58:05 kwetu.TELUS1603 httpd[11449]: AH00557: httpd: apr_sockaddr_info_get() failed for kwetu.TELUS1603
Dec 11 11:58:05 kwetu.TELUS1603 httpd[11449]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress thi
Dec 11 11:58:05 kwetu.TELUS1603 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 11 11:58:05 kwetu.TELUS1603 httpd[11451]: AH00557: httpd: apr_sockaddr_info_get() failed for kwetu.TELUS1603
Dec 11 11:58:05 kwetu.TELUS1603 httpd[11451]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress thi
Dec 11 11:58:05 kwetu.TELUS1603 httpd[11451]: httpd (no pid file) not running
Dec 11 11:58:06 kwetu.TELUS1603 systemd[1]: Failed to start The Apache HTTP Server.
Dec 11 11:58:06 kwetu.TELUS1603 systemd[1]: Unit httpd.service entered failed state

Comment 6 Michal Schmidt 2012-12-11 21:20:22 UTC
(In reply to comment #4)
> Here is the file. Apparently, according to the document via
> yum info, 'myhostname' should be added in hosts: line.

Yes, it should. There's scriptlet in the package to do that.
Do you have "yum history info ..." for the upgrade transaction? Are there any scriptlet errors recorded?

Comment 7 Luya Tshimbalanga 2012-12-11 22:49:26 UTC
Created attachment 661746 [details]
fedup debug

# yum history package nss-myhostname
Loaded plugins: keys, langpacks, merge-conf, presto, refresh-packagekit, remove-
              : with-leaves, upgrade-helper
ID     | Action(s)      | Package                                              
-------------------------------------------------------------------------------
     1 | Dep-Install    | nss-myhostname-0.3-2.fc17.x86_64                     
history package
 I attached the fedup log file.

Comment 8 Eddie Lania 2013-03-06 13:59:49 UTC
On a clean new installation of FC18 it doesn't get added either.

I had to manually add "myhostname" to the host: line in /etc/nsswitch.conf also.

Comment 9 Dan Callaghan 2013-07-29 04:35:10 UTC
Is it possible that authconfig is discarding "myhostname" when it overwrites /etc/nsswitch.conf? I'm not sure but I think Anaconda runs authconfig internally too, so that might explain why it is missing on fresh installations.

Comment 10 Fedora End Of Life 2013-12-21 09:50:10 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 
'version' of '18'.

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 prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 to Fedora 18's end of life.

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 11 Michael Kuhn 2014-01-08 21:12:44 UTC
This bug still exists on Fedora 20. After a fresh installation using netinst, /etc/nsswitch.conf does not contain myhostname in the hosts line. I changed my hostname using hostnamectl right after the installation and was then unable to resolve my local hostname; after adding myhostname, everything works fine.

My /etc directory contains nsswitch.conf.bak which does indeed contain myhostname. There is also a file /var/lib/authconfig/last/nsswitch.conf that also contains myhostname. Judging by the timestamps, these were created during the installation and then overwritten in a later part of it.

After a quick check of the authconfig code, it indeed looks like it simply does not handle myhostname and thus discards it when rewriting the nsswitch.conf file. Looks like this actually a bug in authconfig.

Comment 12 Fedora End Of Life 2014-02-05 13:45:30 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 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.

Comment 13 mertensb 2015-09-17 13:49:34 UTC
I can reproduce this on RHEL7.1


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