Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora/Linux Management Tools (http://www.linux-archive.org/fedora-linux-management-tools/)
-   -   koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue (http://www.linux-archive.org/fedora-linux-management-tools/5700-koan-0-6-3-3-el4-mrh-kix-templating-network-rebuilt-issue.html)

Tom Brown 11-26-2007 07:41 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Hi

I have been 'improving' my kix and starting to use templating and using
variables e.g


I use snippets in the network config and that looks like this

# cat /var/lib/cobbler/snippets/network_select
network --bootproto=static --device=eth0 --onboot=on --ip=$ip_address
--netmask=$netmask --gateway=$gateway --nameserver=$nameserver
--hostname=$hostname


and to build a machine i do something like this

# cat buildbox.sh
#!/bin/sh
cobbler system add --name=$1 --mac=$2 --ksmeta="ip_address=$3
netmask=255.255.255.0 hostname=$4 nameserver=192.168.10.4 gateway=$5"
--profile=$6


I would then do something like the following to build a box

# ./buildbox.sh 00:0C:29:71:D7:4D 192.168.10.25 foobar 192.168.10.1
CentOS-4.5-i386


These will build fine - but here is the issue.

When i use koan to rebuild the box using the same profile then
everything is fine eg


# koan -r -s build-server

Now if i try to rebuild to a different profile that is available on the
server e.g


# koan -p CentOS-4.4-i386 -r -s build-server

the kix details appear correct but on reboot the install stops on the IP
configuration screen, ie waiting for manual input


Has anyone else seen this or know of workarounds? If i manually put
network into into the ks.cfg then the rebuild works as expected?


thanks


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

Michael DeHaan 11-26-2007 07:51 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Has anyone else seen this or know of workarounds? If i manually put
network into into the ks.cfg then the rebuild works as expected?




Cobbler renders it's kickstart template output in
/var/www/cobbler/kickstarts and/or kickstarts_sys depending on whether
you're talking about a profile or kickstart level of evaluation.


Look in those directories and see if the kickstarts match what you
expect them to look like.


--Michael


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

Tom Brown 11-26-2007 08:11 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Cobbler renders it's kickstart template output in
/var/www/cobbler/kickstarts and/or kickstarts_sys depending on whether
you're talking about a profile or kickstart level of evaluation.


Look in those directories and see if the kickstarts match what you
expect them to look like.




the kickstarts in /var/www/cobbler/kickstarts/<profilename>/ are what i
would expect them to be yes - A new install or reinstall works as it
should its just when using koan to rebuild to a different profile, that
shows as valid in a koan -l, that causes this issue of halting waiting
for manual IP configuration.


thanks

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

Michael DeHaan 11-26-2007 08:17 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Tom Brown wrote:




Cobbler renders it's kickstart template output in
/var/www/cobbler/kickstarts and/or kickstarts_sys depending on
whether you're talking about a profile or kickstart level of evaluation.


Look in those directories and see if the kickstarts match what you
expect them to look like.




the kickstarts in /var/www/cobbler/kickstarts/<profilename>/ are what
i would expect them to be yes - A new install or reinstall works as it
should its just when using koan to rebuild to a different profile,
that shows as valid in a koan -l, that causes this issue of halting
waiting for manual IP configuration.


thanks

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

Ah, simple then.

It sounds like you've assigned your IP's and network info to system
objects, and are passing a /profile/ name to koan, perhaps?


This means that the profile object itself has no idea what those
variables should be.


Try passing in the system instead, or optionally use a DHCP kickstart
for profile based deployments. (Using Cheetah games, if you like, you
can detect that the ip isn't set and fall back to DHCP... though

I'm not sure if you want that. I'm throwing it out there though).

--Michael


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

Tom Brown 11-26-2007 08:35 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Ah, simple then.

It sounds like you've assigned your IP's and network info to system
objects, and are passing a /profile/ name to koan, perhaps?


This means that the profile object itself has no idea what those
variables should be.


Try passing in the system instead, or optionally use a DHCP kickstart
for profile based deployments. (Using Cheetah games, if you like,
you can detect that the ip isn't set and fall back to DHCP... though

I'm not sure if you want that. I'm throwing it out there though).



to install a box i 'add a system' yes and this is given network
information and all works fine. On the reinstall using koan i pass the
-p <profilename> so that the box gets rebuilt to a different profile, ie
in my case different OS version. Is that what you suspect i'm doing and
is that 'wrong' ?


I am afraid i dont get what you mean regarding passing this to the
system as when the box is first installed it is assigned to the system?


thanks for any ideas


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

Michael DeHaan 11-26-2007 08:42 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Tom Brown wrote:



Ah, simple then.

It sounds like you've assigned your IP's and network info to system
objects, and are passing a /profile/ name to koan, perhaps?


This means that the profile object itself has no idea what those
variables should be.


Try passing in the system instead, or optionally use a DHCP kickstart
for profile based deployments. (Using Cheetah games, if you like,
you can detect that the ip isn't set and fall back to DHCP... though

I'm not sure if you want that. I'm throwing it out there though).



to install a box i 'add a system' yes and this is given network
information and all works fine. On the reinstall using koan i pass the
-p <profilename> so that the box gets rebuilt to a different profile,
ie in my case different OS version. Is that what you suspect i'm doing
and is that 'wrong' ?




Yes, it's wrong because your kickstart is missing IP and MAC information
that is present when it's used on a per-system basis ... if you look in
/var/www/cobbler/kickstarts I suspect you'll see there are still variables
in the kickstart files. If you compare that with the files in
/var/www/cobbler/kickstart_sys, you'll see that the variables that
correspond to the system object are filled in.


# koan --replace-self --system=name_goes_here

will make you use the system-specific kickstart, as opposed to the
profile specific-kickstart.


--Michael




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

Michael DeHaan 11-26-2007 08:46 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Michael DeHaan wrote:

Tom Brown wrote:



Ah, simple then.

It sounds like you've assigned your IP's and network info to system
objects, and are passing a /profile/ name to koan, perhaps?


This means that the profile object itself has no idea what those
variables should be.


Try passing in the system instead, or optionally use a DHCP
kickstart for profile based deployments. (Using Cheetah games, if
you like, you can detect that the ip isn't set and fall back to
DHCP... though

I'm not sure if you want that. I'm throwing it out there though).



to install a box i 'add a system' yes and this is given network
information and all works fine. On the reinstall using koan i pass
the -p <profilename> so that the box gets rebuilt to a different
profile, ie in my case different OS version. Is that what you suspect
i'm doing and is that 'wrong' ?




Yes, it's wrong because your kickstart is missing IP and MAC
information that is present when it's used on a per-system basis ...
if you look in /var/www/cobbler/kickstarts I suspect you'll see there
are still variables
in the kickstart files. If you compare that with the files in
/var/www/cobbler/kickstart_sys, you'll see that the variables that
correspond to the system object are filled in.


# koan --replace-self --system=name_goes_here

will make you use the system-specific kickstart, as opposed to the
profile specific-kickstart.

--Michael






This may be more useful ...

The following command syntax will autodetect the system based on the MAC
addresses it finds. (So you don't have to specify --system at all,
just leave off the profile).


# koan --server=bootserver.example.org --replace-self

Just run the corresponding cobbler command first to remap the system
entry to the appropriate profile, like so:


# cobbler system edit --name=name_goes_here
--profile=new_profile_name_goes_here


--Michael




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

Tom Brown 11-26-2007 09:05 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Yes, it's wrong because your kickstart is missing IP and MAC
information that is present when it's used on a per-system basis ...
if you look in /var/www/cobbler/kickstarts I suspect you'll see there
are still variables
in the kickstart files. If you compare that with the files in
/var/www/cobbler/kickstart_sys, you'll see that the variables that
correspond to the system object are filled in.


# koan --replace-self --system=name_goes_here

will make you use the system-specific kickstart, as opposed to the
profile specific-kickstart.


ah ok yes - /var/www/cobbler/kickstart still has the variables but
/var/www/cobbler/kickstart_sys has system specific kickstarts in there.
I have tried a


# koan -r -p CentOS-4.4-i386 -y box-2 -s 192.168.10.4

as CentOS-4.4-i386 is the new profile i want to build and box-2 is the
name of the machine i want to rebuild. I was rathing expecting that to
work but alas no.


I have to manage 4000+ boxes so i need to be able to rebuild them to a
different profile as easy as possible and koan would be perfect.


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

Michael DeHaan 11-26-2007 09:09 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
I have to manage 4000+ boxes so i need to be able to rebuild them to a
different profile as easy as possible and koan would be perfect.



Good deal.

I'd suggest writing a minimal script that calls the cobbler edit command
locally, and then runs koan on the remote system as:


koan --replace-self --server=bootserver.example.org (no arguments)

then reboots the box.

--Michael

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

Tom Brown 11-26-2007 09:34 PM

koan-0.6.3-3.el4.mrh - kix templating - network rebuilt issue
 
Good deal.

I'd suggest writing a minimal script that calls the cobbler edit
command locally, and then runs koan on the remote system as:


koan --replace-self --server=bootserver.example.org (no arguments)

then reboots the box.


would there be any chance the functionality of using the contents of
kickstart_sys for rebuilding using koan rather than kickstart? Alas
things are not as simple as scripting a cobbler edit as once deployed
into the stack, these machines are basically application stacks, then
when and what they get rebuilt to is handled by another process that is
local to a box on the stack and so only has access to koan. It seems to
me that koan/cobbler has the info available to it, ie kickstart_sys,
however it seems to not make use of it?


thanks


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


All times are GMT. The time now is 05:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.