Bug 772480

Summary: Renaming the Hostname in network settings does not appear in console prompt
Product: [openSUSE] openSUSE 12.2 Reporter: Roman Bysh <rb03884>
Component: YaST2Assignee: Michal Filka <mfilka>
Status: VERIFIED INVALID QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None    
Version: RC 1   
Target Milestone: Final   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: My y2log
Screenshot of Hostname/DNS tab
Screenshot of konsole prompt showing the incorrect hostname
Latest y2log
localmessages file shows error message about process id

Description Roman Bysh 2012-07-20 18:13:41 UTC
After setting up the network settings in Yast. Assigning a different host name in the Hostname field. 

After log out and log in. The new host name should appear in konsole or console prompt and at the top of the application launcher window. My DE is KDE. 

No matter what I do it does not work.
Comment 1 Michal Filka 2012-07-27 09:19:20 UTC
Please, could you be more specific? Which tab/dialog did you use for changing hostname?

Could you attach "/var/log/YaST2/y2log"?
Comment 2 Roman Bysh 2012-07-27 14:53:53 UTC
Created attachment 500287 [details]
My y2log
Comment 3 Roman Bysh 2012-07-27 14:54:58 UTC
Created attachment 500288 [details]
Screenshot of Hostname/DNS tab
Comment 4 Roman Bysh 2012-07-27 14:56:08 UTC
Created attachment 500289 [details]
Screenshot of konsole prompt showing the incorrect hostname
Comment 5 Roman Bysh 2012-07-27 15:11:41 UTC
The Hostname/DNS tab is located in Network Devices -> Network Settings.
Click on the Hostname/DNS tab and observe the name in the Hostname field.

I typed "opensuse" in the Hostname field. Clicked on the Global tab and select "User Controlled with NetworkManager" and OK button to confirm the changes.

When I open konsole, the machine name shows up where the hostname "opensuse" should appear.


What appears now:
roman@CPE00221595340e-CM000e5cdd65d4:~>

What should appear:
roman@opensuse:~>


Logged out and logged in. No changes. Rebooted my system. No changes.


I have included 2 screenshots. One of the Hostname/DNS tab from Network Settings
and a second one that shows the incorrect hostname in the konsole prompt. See y2log.

BTW This works in openSUSE 12.1.
Comment 6 Michal Filka 2012-07-30 10:38:47 UTC
I have fresh installation of 12.2 RC1 and I cannot reproduce it. Everything works fine for me.

Do you use DHCP?
What does "hostname -f" show?
Comment 7 Roman Bysh 2012-07-30 15:58:43 UTC
Yes. I am using DHCP and using the DVD_x86_64 and installing on a desktop. 
I typed: 

hostname -f in konsole the name that appears is CPE00221595340e-CM000e5cdd65d4

That's my machine name. However, when I navigate to the Hostname?DNS tab, the hostname is opensuse.

I have provided screenshots showing the results. See Comment 3 and 4 on /07/27.

This is the problem with 12.2 RC1. Each variation of RC1 that has been modified from the default installation can show different results. There should be a bug report for that anomaly.

One time I installed and only three folders appeared in my /home/roman partition. And, I was able to change the hostname. I logged out an logged in and it appeared in the prompt. However, after I rebooted my computer the name changed back to my machine name CPE00221595340e-CM000e5cdd65d4.


Try installing but selecting Software. Add qtcurve=kde4 gcc,make,cmake, kernel sources and kernel-syms.

I have this installed on the last 2 partitions of my drive. Are you testing in VirtualBox?

In the meantime, I'll try a different installation variation.
Comment 8 Roman Bysh 2012-07-30 20:34:00 UTC
I ran the updates and it partially fixed it. I can rename the hostname so long as 12.2 is running. Logging out and logging in shows the new hostname.

The new name appears in the Yast title, prompt and application launcher window.

However, when I select shutdown and reboot, the machine name assigned to the network card reappears in the Yast title, prompt and application launcher window.
Comment 9 Roman Bysh 2012-07-30 20:51:50 UTC
Please review the latest y2log. Look for hostname called opensuse-rc1
It looks like Yast wants to write to /etc/modprobe.d50-yast.conf

=================================================================================
2012-07-30 16:19:19 <1> opensuse-rc1(2395) [wfm] WFMSubAgent.cc(~WFMSubAgent):41 Deleting SubAgent: 0 scr
2012-07-30 16:19:19 <3> opensuse-rc1(2395) [agent-modules] ModulesConf.cc(getTimeStamp):282 Failed to stat /etc/modprobe.d/50-yast.conf: No such file or directory
2012-07-30 16:19:19 <1> opensuse-rc1(2395) [agent-modules] ModulesConf.cc(writeFile):560 Modules not modified, not writing
2012-07-30 16:19:19 <3> opensuse-rc1(2395) [agent-modules] ModulesConf.cc(getTimeStamp):282 Failed to stat /etc/modprobe.d/50-yast.conf: No such file or directory
2012-07-30 16:19:19 <3> opensuse-rc1(2395) [agent-modules] ModulesConf.cc(~ModulesConf):103 Can't write configuration file in destructor.
2012-07-30 16:19:19 <1> opensuse-rc1(2395) [liby2] Y2ProgramComponent.cc(result):159 Sending result: `result (nil)
2012-07-30 16:19:19 <1> opensuse-rc1(2395) [liby2] genericfrontend.cc(main):784 Finished YaST2 component 'y2base'
2012-07-30 16:19:19 <1> opensuse-rc1(2395) [liby2] genericfrontend.cc(main):789 Exiting with client return value 'nil'
2012-07-30 16:19:19 <1> opensuse-rc1(2395) [Y2Perl] YPerl.cc(destroy):164 Shutting down embedded Perl interpreter.
Comment 10 Roman Bysh 2012-07-30 20:56:43 UTC
Created attachment 500476 [details]
Latest y2log

Search for opensuse-rc1 in the y2log.
Comment 11 Roman Bysh 2012-07-31 17:18:54 UTC
Why is Yast trying to write to /etc/modprobe.d/50-yast.conf?

Why are the changes not saved after shutdown and reboot?
Comment 12 Roman Bysh 2012-07-31 23:43:59 UTC
There appears to be some code that is causing Yast Network Devices to behave incorrectly. It is writing to an nonexistent file.
Comment 13 Roman Bysh 2012-08-03 18:42:29 UTC
Update

The problem still exists in openSUSE 12.2 RC2! 

I can rename the hostname so long as 12.2 RC2 is running. Logging out and logging in shows the new hostname.

The new name appears in the Yast title, prompt and application launcher window. 


IMPORTANT

When I select shutdown and reboot, the renamed hostname is LOST and replaced by the "machine name" (CPE00221595340e-CM000e5cdd65d4) assigned to the network card. It reappears in the Yast title, prompt and application launcher window.

Please fix this.
Comment 14 Roman Bysh 2012-08-03 18:43:01 UTC
Update please
Comment 15 Roman Bysh 2012-08-05 19:48:18 UTC
Created attachment 501155 [details]
localmessages file shows error message about process id
Comment 16 Roman Bysh 2012-08-05 19:49:30 UTC
Please review localmessages file as it shows the inconsistent naming process.
Comment 17 Roman Bysh 2012-08-13 17:52:11 UTC
Update please.
Comment 18 Roman Bysh 2012-09-07 00:51:55 UTC
Update

After installing openSUSE 12.2 Final Release I found that this problem was NOT resolved. If you really want to see how it behaves correctly, pull the source code from 11.4 or 12.1. 

Compare them with the source code from 12.2. The 12.2 source code has some code missing or typed incorrectly. If you refer to the 12.1 version you will be able to resolve this problem.

The revised hostname is NOT being saved after the reboot.

Which Yast package(s) would contain the source code?
Comment 19 Michal Filka 2012-09-13 08:13:20 UTC
I've tested several images of OpenSUSE 12.2 starting at RC1 up to Final and cannot reproduce.

However in your local messages log I found that dhcpd is starting and exiting quite often. 

E.g.:
Aug  3 13:56:57 linux-f0nn dhcpcd[10821]: eth0: sending signal 15 to pid 8136
Aug  3 13:56:57 linux-f0nn dhcpcd[10821]: eth0: exiting
Aug  3 13:56:57 linux-f0nn dhcpcd[8136]: eth0: received SIGTERM, stopping

Do you use SysV or systemd?
Comment 20 Michal Filka 2012-09-13 09:06:19 UTC
Sorry. Not exiting but terminating.

However, without any clue I cannot sat if the checkproc issue is related to the problem or not. I don't know which processes it tries to query. And it is not clear to me that it should be related to the problem, there are reports with that issue from three days with all mentioned hostnames.

My current idea is that the hostname issue is related to dhcp config. For some reason it uses original hostname after reboot (so the new one is / cannot be propagated to the server).

Could you try manual renew of dhcp lease after changing hostname?
# dhcpcd -k <interface>
# dhcpcd -n <interface>

What happens with hostname?

Thanks.
Comment 21 Roman Bysh 2012-09-13 15:59:32 UTC
Update

Michael

I was able to resolve this anomaly. It looks like I had to change the name four or five times of switching between ifconfig and Networkmanager times. 

Once dhcp was renewed, the name got passed on. I just connected a brand new modem and the problem has been resolved.

You can mark this as resolved.
Comment 22 Roman Bysh 2012-09-13 16:00:39 UTC
I am using systemd.
Comment 23 Michal Filka 2012-09-14 07:08:06 UTC
I'm going to close the bug as it doesn't seem to be a YaST issue.

Thanks for cooperation.