FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 11-27-2007, 01:19 PM
Tom Brown
 
Default network configuration - Cobbler add versus ksmeta

Hi - i am experimenting on how to pass network configuration to cobbler
- i do it either by adding most information directly to the cobbler add
command or passing it within the --ksmeta. Below are 2 examples, the
first is populated with information mainly from within ksmeta, only the
name, mac and profile to use is passed to cobbler add the rest is within
ksmeta. This installs fine. The second example is where only the
nameserver info is passed using ksmeta everything else comes from the
cobbler add directly. The issue is the second example boots, gets an IP
but then fails trying to retrieve the netstg2.img.


Anyone got any thoughts as to why this may be ? thanks

this works

depth: 2
interfaces:
intf0:
dhcp_tag: '
gateway: '
hostname: '
ip_address: '
mac_address: '00:0C:29:717:4D'
subnet: '
virt_bridge: '
kernel_options: {}
kickstart: <<inherit>>
ks_meta:
gateway: '192.168.10.1'
hostname: box-2
ip_address: '192.168.10.20'
nameserver: '192.168.10.4'
netmask: '255.255.255.0'
name: box-2
netboot_enabled: True
parent: '
profile: CentOS-4.5-i386
server: <<inherit>>
virt_path: <<inherit>>
virt_type: <<inherit>>

but this does not work

depth: 2
interfaces:
intf0:
dhcp_tag: '
gateway: '192.168.10.1'
hostname: box-2
ip_address: '192.168.10.20'
mac_address: '00:0C:29:717:4D'
subnet: '255.255.255.0'
virt_bridge: '
kernel_options: {}
kickstart: <<inherit>>
ks_meta:
nameserver: '192.168.10.4'
name: box-2
netboot_enabled: True
parent: '
profile: CentOS-4.5-i386
server: <<inherit>>
virt_path: <<inherit>>
virt_type: <<inherit>>

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 02:39 PM
Michael DeHaan
 
Default network configuration - Cobbler add versus ksmeta

Tom Brown wrote:


Hi - i am experimenting on how to pass network configuration to
cobbler - i do it either by adding most information directly to the
cobbler add command or passing it within the --ksmeta. Below are 2
examples, the first is populated with information mainly from within
ksmeta, only the name, mac and profile to use is passed to cobbler add
the rest is within ksmeta. This installs fine. The second example is
where only the nameserver info is passed using ksmeta everything else
comes from the cobbler add directly. The issue is the second example
boots, gets an IP but then fails trying to retrieve the netstg2.img.




You should just use the variables that are part of the interface since
they are already made available for that purpose.

As for why that is not working for you, a good place to start looking is
at /var/www/cobbler/profiles/$name and /var/www/cobbler/systems/$name
for a file that shows you all the variables expanded, just like they
would be available in your templates.


Then make sure you are using those same variables in your templates.

Also look at the rendered kickstarts in
/var/www/cobbler/kickstarts/$name and
/var/www/cobbler/kickstarts_sys/$name and compare those to the templates
you are using.


Make sure that they look like you want in both cases.

By looking at what variables you have available to use, and seeing how
the kickstarts are actually rendered, it will become much more clear
what is going on.


You shouldn't have to do an install to debug the kickstart.

Try "cobbler validateks" first, which will do a quick scan of your
rendered kickstarts to see if they have the right syntax.


After that, look at them manually and compare the two, to understand
what cobbler is generating from the templates.


--Michael

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 03:52 PM
Tom Brown
 
Default network configuration - Cobbler add versus ksmeta

You should just use the variables that are part of the interface since
they are already made available for that purpose.
As for why that is not working for you, a good place to start looking
is at /var/www/cobbler/profiles/$name and
/var/www/cobbler/systems/$name for a file that shows you all the
variables expanded, just like they would be available in your templates.


Then make sure you are using those same variables in your templates.

Also look at the rendered kickstarts in
/var/www/cobbler/kickstarts/$name and
/var/www/cobbler/kickstarts_sys/$name and compare those to the
templates you are using.


Make sure that they look like you want in both cases.

By looking at what variables you have available to use, and seeing how
the kickstarts are actually rendered, it will become much more clear
what is going on.


You shouldn't have to do an install to debug the kickstart.

Try "cobbler validateks" first, which will do a quick scan of your
rendered kickstarts to see if they have the right syntax.


After that, look at them manually and compare the two, to understand
what cobbler is generating from the templates.



thanks - below is what the rendered kix looks like for that system from
the /var/www/cobbler/systems/<systemname>


to me that looks correct as in the template the variables used are

network --bootproto=static --device=eth0 --onboot=on --ip=$ip_address
--netmask=$netmask --gateway=$gateway --nameserver=$nameserver
--hostname=$hostname


and the rendered kix looks like the below - is there anything else i can
check ?


arch: x86
bootloaders:
ia64: /var/lib/cobbler/elilo-3.6-ia64.efi
standard: /usr/lib/syslinux/pxelinux.0
breed: redhat
default_kickstart: /etc/cobbler/default.ks
default_virt_bridge: xenbr0
default_virt_type: auto
depth: 2
dhcp_tag: default
dhcp_tag_intf0: '
dhcpd_bin: /usr/sbin/dhcpd
dhcpd_conf: /etc/dhcpd.conf
distro: CentOS-4.5-i386
dnsmasq_bin: /usr/sbin/dnsmasq
dnsmasq_conf: /etc/dnsmasq.conf
gateway: '192.168.10.1'
gateway_intf0: '192.168.10.1'
hostname: box-2
hostname_intf0: box-2
httpd_bin: /usr/sbin/httpd
initrd: /var/www/cobbler/ks_mirror/CentOS-4.5-i386/images/pxeboot/initrd.img
interfaces:
intf0:
dhcp_tag: '
gateway: '192.168.10.1'
hostname: box-2
ip_address: '192.168.10.20'
mac_address: '00:0C:29:717:4D'
subnet: '255.255.255.0'
virt_bridge: '
ip_address: '192.168.10.20'
ip_address_intf0: '192.168.10.20'
kernel: /var/www/cobbler/ks_mirror/CentOS-4.5-i386/images/pxeboot/vmlinuz
kernel_options: 'ksdevice=eth0 lang= kssendmac
syslog=192.168.10.4:25150 text '

kickstart: /etc/cobbler/kickstart_CentOS-4.5-i386.ks
ks_meta: 'nameserver=192.168.10.4
tree=http://@@server@@/cblr/links/CentOS-4.5-i386 '

mac_address: '00:0C:29:717:4D'
mac_address_intf0: '00:0C:29:717:4D'
manage_dhcp: 1
manage_dhcp_mode: isc
name: box-2
netboot_enabled: True
next_server: '192.168.10.4'
parent: '
profile: CentOS-4.5-i386
pxe_just_once: 0
repos: '
server: '192.168.10.4'
snippetsdir: /var/lib/cobbler/snippets
source_repos:
-
-
'http://192.168.10.4/cobbler/ks_mirror/config/CentOS-4.5-i386-0.repo'

- 'http://192.168.10.4/cobbler/ks_mirror/CentOS-4.5-i386/CentOS'
subnet: '255.255.255.0'
subnet_intf0: '255.255.255.0'
syslog_port: 25150
tftpboot: /tftpboot
tftpd_bin: /usr/sbin/in.tftpd
tftpd_conf: /etc/xinetd.d/tftp
virt_bridge: xenbr0
virt_bridge_intf0: '
virt_cpus: 1
virt_file_size: 5
virt_path: '
virt_ram: 512
virt_type: auto
webdir: /var/www/cobbler
xmlrpc_port: 25151
xmlrpc_rw_enabled: 1
xmlrpc_rw_port: 25152
yum_post_install_mirror: 0
yumdownloader_flags: -resolve

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 04:00 PM
Michael DeHaan
 
Default network configuration - Cobbler add versus ksmeta

Tom Brown wrote:


You should just use the variables that are part of the interface
since they are already made available for that purpose. As for why
that is not working for you, a good place to start looking is at
/var/www/cobbler/profiles/$name and /var/www/cobbler/systems/$name
for a file that shows you all the variables expanded, just like they
would be available in your templates.


Then make sure you are using those same variables in your templates.

Also look at the rendered kickstarts in
/var/www/cobbler/kickstarts/$name and
/var/www/cobbler/kickstarts_sys/$name and compare those to the
templates you are using.


Make sure that they look like you want in both cases.

By looking at what variables you have available to use, and seeing
how the kickstarts are actually rendered, it will become much more
clear what is going on.


You shouldn't have to do an install to debug the kickstart.

Try "cobbler validateks" first, which will do a quick scan of your
rendered kickstarts to see if they have the right syntax.


After that, look at them manually and compare the two, to understand
what cobbler is generating from the templates.



thanks - below is what the rendered kix looks like for that system
from the /var/www/cobbler/systems/<systemname>


I'm not seeing it in the email or attached.


to me that looks correct as in the template the variables used are

network --bootproto=static --device=eth0 --onboot=on --ip=$ip_address
--netmask=$netmask --gateway=$gateway --nameserver=$nameserver
--hostname=$hostname


and the rendered kix looks like the below - is there anything else i
can check ?


Same here.

If a rendered kickstart looks normal to you then it's just a kickstart
problem (outside of Cobbler), where you could possibly ask
kickstart-list@redhat.com


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 04:06 PM
Tom Brown
 
Default network configuration - Cobbler add versus ksmeta

I'm not seeing it in the email or attached.

does the below look syntactically correct?


# cat /var/www/cobbler/systems/box-2
---
arch: x86
bootloaders:
ia64: /var/lib/cobbler/elilo-3.6-ia64.efi
standard: /usr/lib/syslinux/pxelinux.0
breed: redhat
default_kickstart: /etc/cobbler/default.ks
default_virt_bridge: xenbr0
default_virt_type: auto
depth: 2
dhcp_tag: default
dhcp_tag_intf0: '
dhcpd_bin: /usr/sbin/dhcpd
dhcpd_conf: /etc/dhcpd.conf
distro: CentOS-4.5-i386
dnsmasq_bin: /usr/sbin/dnsmasq
dnsmasq_conf: /etc/dnsmasq.conf
gateway: '192.168.10.1'
gateway_intf0: '192.168.10.1'
hostname: box-2
hostname_intf0: box-2
httpd_bin: /usr/sbin/httpd
initrd: /var/www/cobbler/ks_mirror/CentOS-4.5-i386/images/pxeboot/initrd.img
interfaces:
intf0:
dhcp_tag: '
gateway: '192.168.10.1'
hostname: box-2
ip_address: '192.168.10.20'
mac_address: '00:0C:29:717:4D'
subnet: '255.255.255.0'
virt_bridge: '
ip_address: '192.168.10.20'
ip_address_intf0: '192.168.10.20'
kernel: /var/www/cobbler/ks_mirror/CentOS-4.5-i386/images/pxeboot/vmlinuz
kernel_options: 'ksdevice=eth0 lang= kssendmac
syslog=192.168.10.4:25150 text '

kickstart: /etc/cobbler/kickstart_CentOS-4.5-i386.ks
ks_meta: 'nameserver=192.168.10.4
tree=http://@@server@@/cblr/links/CentOS-4.5-i386 '

mac_address: '00:0C:29:717:4D'
mac_address_intf0: '00:0C:29:717:4D'
manage_dhcp: 1
manage_dhcp_mode: isc
name: box-2
netboot_enabled: True
next_server: '192.168.10.4'
parent: '
profile: CentOS-4.5-i386
pxe_just_once: 0
repos: '
server: '192.168.10.4'
snippetsdir: /var/lib/cobbler/snippets
source_repos:
-
-
'http://192.168.10.4/cobbler/ks_mirror/config/CentOS-4.5-i386-0.repo'

- 'http://192.168.10.4/cobbler/ks_mirror/CentOS-4.5-i386/CentOS'
subnet: '255.255.255.0'
subnet_intf0: '255.255.255.0'
syslog_port: 25150
tftpboot: /tftpboot
tftpd_bin: /usr/sbin/in.tftpd
tftpd_conf: /etc/xinetd.d/tftp
virt_bridge: xenbr0
virt_bridge_intf0: '
virt_cpus: 1
virt_file_size: 5
virt_path: '
virt_ram: 512
virt_type: auto
webdir: /var/www/cobbler
xmlrpc_port: 25151
xmlrpc_rw_enabled: 1
xmlrpc_rw_port: 25152
yum_post_install_mirror: 0
yumdownloader_flags: -resolve

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 04:27 PM
Michael DeHaan
 
Default network configuration - Cobbler add versus ksmeta

Tom Brown wrote:




I'm not seeing it in the email or attached.

does the below look syntactically correct?


That's not a kickstart file, which is what I wanted to look at...

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 04:34 PM
Tom Brown
 
Default network configuration - Cobbler add versus ksmeta

That's not a kickstart file, which is what I wanted to look at...



apologies -

# cat /var/www/cobbler/kickstarts/CentOS-4.5-i386/ks.cfg


#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel

part /boot --fstype "ext3" --size=100
part swap --size=500
part / --fstype "ext3" --size=1 --grow

# Use text mode install
text
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard uk
# System language
lang en_US.UTF-8
langsupport --default=en_US.UTF-8 en_US.UTF-8
# Use network installation
url --url=http://192.168.10.4/cblr/links/CentOS-4.5-i386
# Network information

network --bootproto=static --device=eth0 --onboot=on --ip=$ip_address
--netmask=$netmask --gateway=$gateway --nameserver=$nameserver
--hostname=$hostname


# Reboot after installation
reboot

#Root password
rootpw --iscrypted $1$x/U4oYmQ$wJe6pZ4DwD9SEDnh6DHks/
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone GMT
# Install OS instead of upgrade
install
# Clear the Master Boot Record
zerombr

%packages

%post


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 04:55 PM
Michael DeHaan
 
Default network configuration - Cobbler add versus ksmeta

Tom Brown wrote:




That's not a kickstart file, which is what I wanted to look at...



apologies -

# cat /var/www/cobbler/kickstarts/CentOS-4.5-i386/ks.cfg


I just did the following and $nameserver evaluated fine in
/var/www/cobbler/kickstarts_sys/X/ks.cfg


cobbler system edit --name=X --ksmeta="nameserver=foo.example.org"

cat /var/www/cobbler/kickstarts_sys/X.ks.cfg | grep foo.example.org

Obviously it won't be evaluated in the profile kickstart because that
data was tacked on to the system, not the profile...


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 06:28 PM
Michael DeHaan
 
Default network configuration - Cobbler add versus ksmeta

Michael DeHaan wrote:

Tom Brown wrote:




We figured this out on IRC. The issue was that the kickstart template
was using $subnet, not $netmask. So, not that complicated.


Yipeee!

--Michael

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 11-27-2007, 06:30 PM
Tom Brown
 
Default network configuration - Cobbler add versus ksmeta

I just did the following and $nameserver evaluated fine in
/var/www/cobbler/kickstarts_sys/X/ks.cfg


cobbler system edit --name=X --ksmeta="nameserver=foo.example.org"

cat /var/www/cobbler/kickstarts_sys/X.ks.cfg | grep foo.example.org

Obviously it won't be evaluated in the profile kickstart because that
data was tacked on to the system, not the profile...




for the record the issue here was that my network snippet looked like

network --bootproto=static --device=eth0 --onboot=on --ip=$ip_address
--netmask=$netmask --gateway=$gateway --nameserver=$nameserver
--hostname=$hostname


and it should have been

network --bootproto=static --device=eth0 --onboot=on --ip=$ip_address
--netmask=$subnet --gateway=$gateway --nameserver=$nameserver
--hostname=$hostname


thanks


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 12:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org