Hi all,
I have the following XML file
<networking>
AUTO
<dns>
true
<domain>lnt.ei.tum.de</domain>
<hostname>opensuse132-auto</hostname>
auto
<searchlist config:type="list">
<search>lnt.ei.tum.de</search>
</searchlist>
true
</dns>
<interfaces config:type="list">
<interface>
<bootproto>dhcp4</bootproto>
<device>eth0</device>
<startmode>onboot</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
<ipv6 config:type="boolean">true</ipv6>
false
<managed config:type="boolean">true</managed>
<routing>
false
false
</routing>
</networking>
Problem:
The DHCP configures hostname is NOT set as the hostname during stage2,
but keeps "opensuse132-auto" as given in the XML.
Only after a first reboot (which should no be needed) after installation
completes, the hostname is picked up correctly.
This all used to work. From the Yast2 GIT pages I see that there were
changes to the code where the DHCP hostname is considered:
https://github.com/yast/yast-network/commit/beaeba1826e475861c0c8cb3e26d7148...
Possibly this broke the previously working feature.
This is the relevant part of y2log (2nd stage)
----------------------
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
clients/inst_autoconfigure.rb:113 current resource: networking
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
clients/inst_autoconfigure.rb:128 Writing configuration for lan
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
clients/inst_autoconfigure.rb:168 Calling auto client with:
$["dhcp_options":$["dhclient_hostname_option":"AUTO"],
"dns":$["dhcp_hostname":true, "domain":"lnt.ei.tum.de",
"hostname":"opensuse132-auto", "resolv_conf_policy":"auto",
"searchlist":["lnt.ei.tum.de"], "write_hostname":true],
"interfaces":[$["bootproto":"dhcp4", "device":"eth0",
"startmode":"onboot", "usercontrol":"no"]], "ipv6":true,
"keep_install_network":false, "managed":true,
"routing":$["ipv4_forward":false, "ipv6_forward":false],
"start_immediately":true]
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
clients/inst_autoconfigure.rb:314 current step: 3 desc:Configuring lan
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Interpreter]
modules/Call.rb:45 Calling YaST client lan_auto
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby] yast/wfm.rb:181
Call client /usr/share/YaST2/clients/lan_auto.rb
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
clients/lan_auto.rb:36 ----------------------------------------
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
clients/lan_auto.rb:37 Lan autoinst client started
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby] modules/Lan.rb:494
Writing configuration
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/SuSEFirewall.rb:1122 Installed -> true
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/NetworkInterfaces.rb:801 Writing configuration
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/NetworkInterfaces.rb:807 OriginalDevs=$[]
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/NetworkInterfaces.rb:808
Devs=$["eth":$["eth0":$["BOOTPROTO":"dhcp4", "STARTMODE":"auto",
"USERCONTROL":"no"]]]
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/NetworkInterfaces.rb:820 Deleted=[]
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/NetworkConfig.rb:167 Writing configuration
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/Routing.rb:236 Writing configuration
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
yast2/systemd_unit.rb:125 `systemctl show SuSEfirewall2.service
--property=Id --property=MainPID --property=Description
--property=LoadState --property=ActiveState --property=SubState
--property=UnitFileState --property=FragmentPath `
2015-02-11 10:28:02 <1> linux-vlkb.site(2574) [Ruby]
modules/SuSEFirewall.rb:1416 Firewall service is enabled
2015-02-11 10:28:02 <1> tueilnt-st-test(2574) [Ruby] modules/DNS.rb:371
Writing configuration
2015-02-11 10:28:02 <1> tueilnt-st-test(2574) [Ruby] modules/DNS.rb:377
nameservers=[]
2015-02-11 10:28:02 <1> tueilnt-st-test(2574) [Ruby] modules/DNS.rb:378
searchlist=["lnt.ei.tum.de"]
2015-02-11 10:28:02 <1> tueilnt-st-test(2574) [Ruby] modules/DNS.rb:379
hostname=opensuse132-auto
2015-02-11 10:28:02 <1> tueilnt-st-test(2574) [Ruby] modules/DNS.rb:380
domain=lnt.ei.tum.de
2015-02-11 10:28:02 <1> tueilnt-st-test(2574) [Ruby] modules/DNS.rb:381
dhcp_hostname=true, write_hostname=true
2015-02-11 10:28:03 <1> opensuse132-auto(2574) [Ruby]
network/runtime.rb:41 Updating sendmail and/or postfix configuration.
2015-02-11 10:28:06 <1> opensuse132-auto(2574) [Ruby] modules/Host.rb:73
Dummy 127.0.0.2 IP will be added
2015-02-11 10:28:06 <1> opensuse132-auto(2574) [Ruby]
modules/Host.rb:125 Writing hosts configuration
2015-02-11 10:28:06 <1> opensuse132-auto(2574) [Ruby]
modules/Host.rb:166 hosts=$["127.0.0.2":["opensuse132-auto.lnt.ei.tum.de
opensuse132-auto"]]
2015-02-11 10:28:06 <1> opensuse132-auto(2574) [Ruby]
modules/Host.rb:168 127.0.0.2 (["opensuse132-auto.lnt.ei.tum.de
opensuse132-auto"]:nil)
----------------------
One can see that the DHCP hostname is picked up shortly (~5 lines)
before it is replaced by the XML-configured hostname.
Best regards,
JB