(devel/real-soon-now) Koan can now restart guests once they're done installing (--vm-poll)
by Michael DeHaan
I've added a new feature to koan for the next release.
Example:
koan --virt --server=cobbler.example.org --profile=YourProfileNameHere
--vm-poll
(--vm-poll is a new option)
What's that do?
After libvirt kicks of the installation, koan will poll the VM in the
background to watch for it to shut off. Once it does, it will start
the VM back up. (If the install happens to crash, koan will exit and
mention details. It won't keep monitoring forever... however, there
currently is /not/ a time limit to this polling, which is something we
/might/ want to add in the future).
This gets around a little weird thing in virtualization where an
installing guest can't set it's "on reboot" process to reboot initially
-- why? That's technical. Basically the installer kernel/initrd must
be swapped out, therefore it must be shut down the first time. This
little option, which is not the default, does that. It's only
supported for xen and qemu/KVM.
I have some bits checked in now and am just completing the last rounds
of testing.
This should be highly useful for those that want to script koan
installations and need the guest to be back up when they're done;
however if you want to get multiple installs going in parallel, you'll
also want to start multiple copies of koan. Due to implementation
reasons this /does not/ background itself, as we are not creating a
"koand" daemon.
--Michael
15 years, 4 months
Bugfix for getdatestamp
by Bill Peck
This patch fixes importing of Red Hat distros that don't have a
.discinfo file.
>From 54fdbbc9fdabcc0fe4b1e8f52b4e4885bef26dc9 Mon Sep 17 00:00:00 2001
From: Bill Peck <bpeck(a)redhat.com>
Date: Wed, 10 Dec 2008 14:07:03 -0500
Subject: [PATCH] make get_creation datestamp more robust
---
cobbler/action_import.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 704effa..f1a8303 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -961,11 +961,15 @@ class RedHatImporter ( BaseImporter ) :
Based on a RedHat tree find the creation timestamp
"""
base = self.get_rootdir()
+ datestamp = float(0)
if os.path.exists("%s/.discinfo" % base):
discinfo = open("%s/.discinfo" % base, "r")
- datestamp = discinfo.read().split("\n")[0]
+ try:
+ datestamp = float(discinfo.read().split("\n")[0])
+ except ValueError:
+ pass
discinfo.close()
- return float(datestamp)
+ return datestamp
def set_variance(self, flavor, major, minor, arch):
--
1.6.0.4
15 years, 4 months
cobbler_server environment snippet
by Vreman, Peter
Might it be a good idea to include by default a snippet that sets the COBBLER_SERVER environment?
Below is the snippet post_cobbler_env that I'm now using:
echo "export COBBLER_SERVER=@@server@@" > /etc/profile.d/cobbler.sh
echo "setenv COBBLER_SERVER @@server@@" > /etc/profile.d/cobbler.csh
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
15 years, 4 months
Repository Dir Structure - Cobbler Repo Add
by Lanton Hulisani Vhengani
Hi,
I would like to know if cobbler repo add does allow one to specify the
layout of the repository. As an example, http://<url>/centos/x86_64/
Lanton
15 years, 4 months
contents of post_install_network_config in devel
by Andy Gospodarek
I was looking over the contents of post_install_network_config in the
devel branch of cobbler and it looks pretty good. The idea that one
wants to setup VLANs or bonding as part of the post-install process is a
good one.
Anyway, there are a few changes that I'd propose though for RHEL/Centos5
and Fedora and several that would be needed to make RHEL/Centos4 work
correctly.
For RHEL/Centos5 and Fedora the bonding parameter 'max_bonds' in
modprobe.conf isn't really needed, so it can be dropped.
--- a/snippets/post_install_network_config
+++ b/snippets/post_install_network_config
@@ -48,16 +48,6 @@
## end looping through the interfaces to see which ones we need to configure.
## =============================================================================
-
- #set $i = 0
-
- ## setup bonding if we have to
-
- #if $numbondingdevs > 0
- echo "options bonding max_bonds=$numbondingdevs" >>
/etc/modprobe.conf
- #end if
-
- ## =============================================================================
## create a staging directory to build out our network scripts into
## make sure we preserve the loopback device
For RHEL/Centos4 the bonding options will need to be placed in
/etc/modprobe.conf rather than in ifcfg-bondX files.
--- a/snippets/post_install_network_config
+++ b/snippets/post_install_network_config
@@ -189,9 +179,7 @@
#if $bonding.lower() == "master" and $bonding_opts != ""
## configure bonding if required
- cat >> $devfile << EOF
- BONDING_OPTS="$bonding_opts"
- EOF
+ echo "options $iname $bonding_opts" >> /etc/modprobe.conf.cobbler
#end if
echo "ONPARENT=yes" >> $devfile
In general the VLAN stuff looks good too, but it would be hard to know
for sure without testing it pretty well.
Long term it would be great to support VLANs on bonded interfaces, but
there are not a bunch of people doing that right now (and I didn't write
any patches, so I should probably shutup :), so it's probably not a
priority.
-andy
15 years, 4 months
Re: problem with --kexec
by Michael DeHaan
Charles Duffy wrote:
> That usage looks exactly right; the kexec load command done has prepared
> the new kernel and initrd, and when 'kexec -e' is run the new kernel
> will be booted.
>
> Breaking this down into two stages allows modules associated with
> non-kexec-friendly hardware to be unloaded, even if those modules are
> things like network hardware which are necessary for the koan operation
> to complete.
>
>
Excellent, so it's just a matter of koan not invoking it automatically,
and giving interactive users a chance to review the output. This is
goodness.
And yes, this means I haven't tested this yet myself :)
Thanks!
--Michael
15 years, 4 months
Help understanding this part of the network config code?
by Michael DeHaan
I recently made a change so that if a system in Cobbler has multiple
interfaces but no details about those interfaces, the kickstart is still
valid -- that is to say, it's trivially easy to make a virtual machine
again that has no MAC, IP, or hostname assignments if someone wants.
However, when I create such a system, I get a network config post
section that I don't /quite/ understand. As I understand it this code
is intended to reorder the NICs such that they are in the right order
(assumed ok) and optionally set up bonding and vlan information (assumed ok)
Here's what I get:
mkdir /etc/sysconfig/network-scripts/cobbler
cp /etc/sysconfig/network-scripts/ifcfg-lo
/etc/sysconfig/network-scripts/cobbler/
# Start eth1
sed -i "s/eth0/eth1/" /etc/modprobe.conf
(
grep -v "DEVICE=" /etc/sysconfig/network-scripts/ifcfg-eth0
echo "DEVICE=eth1"
) > /etc/sysconfig/network-scripts/cobbler/ifcfg-eth1
# End eth1
# Start eth0
sed -i "s/eth1/eth0/" /etc/modprobe.conf
(
grep -v "DEVICE=" /etc/sysconfig/network-scripts/ifcfg-eth1
echo "DEVICE=eth0"
) > /etc/sysconfig/network-scripts/cobbler/ifcfg-eth0
# End eth0
rm -f /etc/sysconfig/network-scripts/ifcfg-*
mv /etc/sysconfig/network-scripts/cobbler/* /etc/sysconfig/network-scripts/
rm -r /etc/sysconfig/network-scripts/cobbler
cat /etc/modprobe.conf.cobbler >> /etc/modprobe.conf
rm -f /etc/modprobe.conf.cobbler
# End post_install_network_config generated code
From the above, the two sed lines look redundant. What are they
intended to do?
It looks like they change eth0 to eth1 and then eth1 to eth0, but this
doesn't seme to make since to me.
--Michael
15 years, 4 months
1.3.3 Test release out Monday
by Michael DeHaan
For those that were expecting it, I had some "fun" with one of my
computers Friday, so I'll see about building the 1.3.3 test release and
getting that out Monday.
Main things to test:
-- Installs in general -- is everything you're used to still functioning?
-- Upgrades -- kickstarts will be copied to /var/lib/cobbler/kickstarts
for LSB happiness, make sure things continue to run smoothly
-- Networking configuration -- look for
/var/lib/cobbler/kickstarts/*.rpmnew for the new templates and how they
are used. Note prior emails about --dns-name being a new per-interface
variable and --hostname (corresponding to the system hostname, not DNS)
now being global instead. There's also a --static attribute on each
interface for easier static interface setup.
-- CobblerWeb -- new interface for editing the network information on
the systems page.
-- Power Management -- it's new, testing welcome, and let me know if any
of the snippets in /etc/cobbler/power need correcting
-- Puppet integration -- it's on the Wiki, if you use this, testing
welcome, I haven't heard much yet
-- Built In Configuration Management feature -- also see the Wiki, this
is pretty new and optional, but could use more testing and comments.
For reasons of needing to get a stable release out and not having much
time for testing, I probably do /not/ have all of the debian patches
applied.
We will look at merging all of this in once we have 1.6 ready and folks
can help test that. From IRC, it seems like the Wiki instructions do
not entirely
work as described, so we'll call this support "experimental" for 1.4.
I'll also be updating the Illustrated Changelog parts of the Wiki to
better describe the new things that were done recently.
There are still some open bugs on the Wiki, many of these should be
resolved before the 1.4 release, some minor fringe-case ones may be left
outstanding for a 1.4.1, but we'll not leave anything major in to bite
anyone.
(For those using git, no need to wait for me, just do a checkout for the
devel branch and run "make" to build the RPM... for everyone else...
source RPMs out soon)
Thanks!
--Michael
15 years, 4 months