Uwe Gansert wrote, On 01/22/2010 02:04 AM:
you can test the merge process on the command line:
/usr/bin/xsltproc --novalid --param replace "'false'" \
--param with "'a.xml'" --output out.xml \
/usr/share/autoinstall/xslt/merge.xslt base.xml
does the out.xml contain the ip adresses?
Assuming i understand the exact nature of this xsltproc process,
my rules/rules.xml essentially does:
include ZORKbase.xml (matches product = "*", so unconditional)
include ZORK-Dell8G.xml (matches product=~ "PowerEdge [12]850")
include ZORKsite-zork0.xml (custom1 rule /proc/cmdline ZORKsite=zork0)
include ZORKnode-in1.xml (custom2 rule /proc/cmdline ZORKnode=in1)
$ grep -o 'setValue (tomerge@.*$' y2log
setValue (tomerge@0x12d8320 = '[]')
setValue (tomerge@0x12d8320 = '["ZORKbase.xml"]')
setValue (tomerge@0x12d8320 = '["ZORKbase.xml", "ZORK-Dell8G.xml"]')
setValue (tomerge@0x12d8320 = '["ZORKbase.xml", "ZORK-Dell8G.xml", "ZORKsite-umds0.xml"]')
setValue (tomerge@0x12d8320 = '["ZORKbase.xml", "ZORK-Dell8G.xml", "ZORKsite-umds0.xml", "ZORKnode-in1.xml"]')
setValue (tomerge@0x12d8320 = '["ZORKbase.xml", "ZORK-Dell8G.xml", "ZORKsite-umds0.xml", "ZORKnode-in1.xml"]')
setValue (tomerge@0x12d8320 = '[]')
setValue (tomerge@0x12d8320 = '["classes/Ingest/Partitioning.xml"]')
setValue (tomerge@0x12d8320 = '["classes/Ingest/Partitioning.xml", "classes/Ingest/Software.xml"]')
setValue (tomerge@0x12d8320 = '["classes/Ingest/Partitioning.xml", "classes/Ingest/Software.xml"]')
setValue (tomerge@0x12d8320 = '["prefinal_autoinst.xml", "classes/Ingest/Partitioning.xml", "classes/Ingest/Software.xml"]')
That looks like my expected merge stack ^^^^^
So, i think what you're asking me to do is:
(Progressive merges)
# xsltproc --novalid --param replace "'false'" --param with "'ZORK-Dell8G.xml'" --output out1.xml /usr/share/autoinstall/xslt/merge.xslt ZORKbase.xml
# xsltproc --novalid --param replace "'false'" --param with "'ZORKsite-zork0.xml'" --output out2.xml /usr/share/autoinstall/xslt/merge.xslt out1.xml
# xsltproc --novalid --param replace "'false'" --param with "'ZORKnode-in1.xml'" --output out3.xml /usr/share/autoinstall/xslt/merge.xslt out2.xml
(ZORKbase + ZORK-Dell8g -> out1
out1 + ZORKsite-zork0 -> out2
out2 + ZORKnode-in1 -> out3
)
# md5sum out?.xml
a834a533590495705b005e7343e69f46 out1.xml
4a8ffb0f624b2c5d555696ea62f74bce out2.xml
40879a7f42e71f60c31001631270aba6 out3.xml
(yep, they're all different)
# grep ipaddr out3.xml
<ipaddr>192.168.50.31</ipaddr>
<ipaddr>192.168.55.1</ipaddr>
(And the IPADDRs stayed throughout the merge.)
In this last round of installing, i note that my *hostname* has also
been lost, but:
in1:/cf # grep hostname out?.xml
out1.xml: AUTO
out1.xml: false
out2.xml: ns1:dhclient_hostname_optionAUTO
out2.xml: false
out3.xml: ns1:dhclient_hostname_optionAUTO
out3.xml: false
out3.xml: <hostname>in1</hostname>
It's in there via xsltproc merging. And it's in the files getting handled
by autoyast.
./YaST2-03146-sLGAEW/rules/ZORKnode-in1.xml: <hostname>in1</hostname>
trying to debug the y2log with 'y2debug=1' is a bit overwhelming.
(yeah, too much info better than not enough) but can you confirm, since
i can't immediately see it, that the xsltproc isn't just merging the
base_profile with each profile into a single result.xml file?
# grep -o '.\{1,80\}result.xml.*base_profile.xml' y2log | uniq
AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
mp/YaST2-03146-sLGAEW/rules/ZORK-Dell8G.xml'\" --output /tmp/YaST2-03146-sLGAEW/result.xml /usr/share/autoinstall/xslt/merge.xslt /tmp/YaST2-03146-sLGAEW/base_profile.xml
ironment.cc(pushframe):78 Push frame AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
YaST2-03146-sLGAEW/rules/ZORKsite-zork0.xml'\" --output /tmp/YaST2-03146-sLGAEW/result.xml /usr/share/autoinstall/xslt/merge.xslt /tmp/YaST2-03146-sLGAEW/base_profile.xml
ironment.cc(pushframe):78 Push frame AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
p/YaST2-03146-sLGAEW/rules/ZORKnode-in1.xml'\" --output /tmp/YaST2-03146-sLGAEW/result.xml /usr/share/autoinstall/xslt/merge.xslt /tmp/YaST2-03146-sLGAEW/base_profile.xml
ironment.cc(pushframe):78 Push frame AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
GAEW/rules/classes/Ingest/Partitioning.xml'\" --output /tmp/YaST2-03146-sLGAEW/result.xml /usr/share/autoinstall/xslt/merge.xslt /tmp/YaST2-03146-sLGAEW/base_profile.xml
ironment.cc(pushframe):78 Push frame AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
6-sLGAEW/rules/classes/Ingest/Software.xml'\" --output /tmp/YaST2-03146-sLGAEW/result.xml /usr/share/autoinstall/xslt/merge.xslt /tmp/YaST2-03146-sLGAEW/base_profile.xml
ironment.cc(pushframe):78 Push frame AutoInstallRules::XML_cleanup ((tmpdir + "/result.xml"), (tmpdir + "/base_profile.xml
Here's the resultant interfaces section in full:
(as you can see, i've got lots of commented stuff through testing)
--------------------------------------------------------------
[ xsltproc MERGED output from profiles ]
ns1:interface
<!-- <name>Dell PRO/1000 MT Network Connection</name> --><!-- <name>Internal Data Network</name> -->ns1:bootprotostatic
ns1:deviceeth0
<name>Internal Data Network</name>
<ipaddr>192.168.50.31</ipaddr>
<network>192.168.50.0</network>
<broadcast>192.168.50.255</broadcast>
<netmask>255.255.255.0</netmask>
<prefixlen>24</prefixlen>
ns1:startmodeauto
ns1:usercontrolno
ns1:interface
<!-- <name>Dell PRO/1000 MT Network Connection</name> --><!-- <name>Heartbeat and DRBD network</name> -->ns1:bootprotostatic
ns1:deviceeth1
<name>Heartbeat and DRBD network</name>
<ipaddr>192.168.55.1</ipaddr>
<network>192.168.55.0</network>
<broadcast>192.168.55.255</broadcast>
<netmask>255.255.255.0</netmask>
<prefixlen>24</prefixlen>
ns1:startmodeauto
ns1:usercontrolno
false
<modules config:type="list">
<device>bus-pci-0000:06:07.0</device>
<module>e1000</module>
<options/>
<device>bus-pci-0000:07:08.0</device>
<module>e1000</module>
<options/>
</modules><!--
<modules config:type="list">
<module_entry>
<device>eth0</device>
<module></module>
<options></options>
</module_entry>
<module_entry>
<device>eth1</device>
<module></module>
<options></options>
</module_entry>
</modules>
-->
<!--
<module_entry>
<device>bus-pci-0000:04:00.0</device>
<module>bnx2</module>
<options></options>
</module_entry>
<module_entry>
<device>bus-pci-0000:08:00.0</device>
<module>bnx2</module>
<options></options>
</module_entry>
-->
<!--
<modules config:type="list">
<module_entry>
<device>static-0</device>
<module></module>
<options></options>
</module_entry>
</modules>
-->
--------------------------------------------------------------
--------------------------------------------------------------
Here's what i see for this machine if i 'yast2 network' and
configure it manually after install, then do a 'yast2 autoyast'
(Tools->Create Reference):
in1:/var/lib/autoinstall/repository # sed -ne '//p' CRONKY.xml
<interfaces config:type="list">
<interface>
<bootproto>static</bootproto>
<device>eth-id-00:14:22:20:3d:3f</device>
<ipaddr>192.168.50.31</ipaddr>
<netmask>255.255.255.0</netmask>
<prefixlen>24</prefixlen>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth-id-00:14:22:20:3d:40</device>
<ipaddr>192.168.55.1</ipaddr>
<netmask>255.255.255.0</netmask>
<prefixlen>24</prefixlen>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
<modules config:type="list">
<device>bus-pci-0000:06:07.0</device>
<module>e1000</module>
<options></options>
<device>bus-pci-0000:07:08.0</device>
<module>e1000</module>
<options></options>
</modules>
--------------------------------------------------------------
And finally, here's what comes up in the autoyast install:
in1:/var/adm/autoinstall/cache # sed -ne '//p' installedSystem.xml
<interfaces config:type="list">
<interface>
<bootproto>static</bootproto>
<device>eth0</device>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth1</device>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
<modules config:type="list">
<device>bus-pci-0000:06:07.0</device>
<module>e1000</module>
<device>bus-pci-0000:07:08.0</device>
<module>e1000</module>
</modules>
--------------------------------------------------------------
If i haven't specified the "modules" entries as i have done, for
the ZORK-Dell8G.xml (8th Gen poweredge) using the known pci bus
addresses, i get NO interface configuration AT ALL, in this case
i'm getting it, it just doesn't have any interface specific
addressing information
--------------------------------------------------------------
Finally, here's the exact interfaces+modules sections from all 4 profile files
in1:/cf # sed -ne '//p' ZORKbase.xml
in1:/cf # sed -ne '//p' ZORK-Dell8G.xml
<interfaces config:type="list">
<interface>
<!-- <name>Dell PRO/1000 MT Network Connection</name> -->
<!-- <name>Internal Data Network</name> -->
<bootproto>static</bootproto>
<device>eth0</device>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<!-- <name>Dell PRO/1000 MT Network Connection</name> -->
<!-- <name>Heartbeat and DRBD network</name> -->
<bootproto>static</bootproto>
<device>eth1</device>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
<modules config:type="list">
<device>bus-pci-0000:06:07.0</device>
<module>e1000</module>
<options></options>
<device>bus-pci-0000:07:08.0</device>
<module>e1000</module>
<options></options>
</modules>
in1:/cf # sed -ne '//p' ZORKsite-zork0.xml
in1:/cf # sed -ne '//p' ZORKnode-in1.xml
<interfaces config:type="list">
<interface>
<bootproto>static</bootproto>
<device>eth0</device>
<name>Internal Data Network</name>
<ipaddr>192.168.50.31</ipaddr>
<network>192.168.50.0</network>
<broadcast>192.168.50.255</broadcast>
<netmask>255.255.255.0</netmask>
<prefixlen>24</prefixlen>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth1</device>
<name>Heartbeat and DRBD network</name>
<ipaddr>192.168.55.1</ipaddr>
<network>192.168.55.0</network>
<broadcast>192.168.55.255</broadcast>
<netmask>255.255.255.0</netmask>
<prefixlen>24</prefixlen>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
<modules config:type="list">
<device>eth0</device>
<module></module>
<options></options>
<device>eth1</device>
<module></module>
<options></options>
</modules>
<modules config:type="list">
<device>static-0</device>
<module></module>
<options></options>
</modules>
--
Stephen Dowdy - Systems Administrator - NCAR/RAL
303.497.2869 - sdowdy@ucar.edu - http://www.ral.ucar.edu/~sdowdy/
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org