Network objects ... in peril
by Michael DeHaan
So, talking with John today, neither of us have time to work on this
feature -- and it's not complete.
Unless someone wants to step up to flesh this one out, I see this as a
likely candidate for falling by the wayside for 2.0.
Please reply if you do think you want to work on this feature.
If not, the remaining focus of 2.0 will be on background tasks and
Cobbler Web, and also the Deployment Feature (getting it Web App aware),
probably Web Imports, and other similar things.
I would like to, but I simply can't concentrate on much more than that
(and also making sure everyone else's features get in and happy).
--Michael
14 years, 10 months
Items for Hack Cobbler week
by Glenn Bailey
Howdy Folks,
I've set aside 4 hours a day, for each day next week to spend time on the
"Hacking Cobbler" week. I've already assigned one RFE ticket to myself:
https://fedorahosted.org/cobbler/ticket/400
Which I am thinking is what I want, basically just sub-menus in the PXE
boot screen to have something like 5Server->i386->Web Build .. If this
ticket is not the same, please let me know and I'll create a new request.
Also, before I create a new RFE for the following, I want to make sure
they are in scope.
- Import directly from ISO
Instead of mounting an ISO, then importing the tree, then un-mounting
the ISO just directly import from the ISO itself. I don't think this is
in there yet, and should be easy to implement. This is just me being
lazy and not wanting to mount and unmount ;-)
- VitrualCenter integration
This may be a code snippet instead of an actual RFE. Would use the VI
perl toolkit and give you the ability to create a VM, then pass the
information to cobbler to have it start building upon boot. Would have
to be written in perl. Thinking I can knock this out pretty quick, just
need to figure out how to interface w/Cobbler .. Either command line, or
I think I read there is a XML type API?
- WinPE boot iso import
Would be used in mixed environments to allow PXE booting of the WinPE
boot image to use the actual M$ provisioning system. Would not handle
any provisioning itself, just a way to allow all folks in the env to
PXE boot w/o having to worry about boot ISO's. I'll need to actually
try and get the darn thing to boot from pxelinux first before even
thinking about Cobbler integration. Thought I would have time this
week but such is life ;-)
That should be enough for the 20 hours I'm able to commit next week. Oh,
also, I have the following hardware platforms in my lab if anyone needs
anything tested on these specific platforms next week:
HP
-----------------
Proliant DL360 G5
Proliant DL360 G6
Proliant DL380 G5
Proliant DL380 G6
Proliant DL385 G2
Proliant DL385 G5
Proliant DL580 G5
Proliant DL585 G2
Proliant DL585 G5
IBM
-----------------
System x 3650
System x 3655
System x 3850 M2
Oh, and my nick on irc is "replicant" ..
glenn - terremark worldwide
14 years, 10 months
Tasks now show up in the web application
by Michael DeHaan
I've added a new link "Tasks" right below settings that shows all tasks.
From this page you can see all the background tasks (currently all run
as soon as they are fired, so the idea of a "scheduled" state will
soon go away in favor of just "running").
Since we have this, the next steps are to add links to a reposync button
to the Web app (easy, of course) and also make sync and the power
actions run in the background.
For actions that run in the background, ideally there should be some
brief notification to the user (i.e. "simple global 'flash' notification
DIV trick") to show that there is a background task and to link to the
status page so folks can view the log for that task from the web app.
I'm doing that next.
This will make our web application *much* more functional, so I'm
excited about this one.
Currently task ID's are integers -- I'm going to change this so they are
named after the time and are human readable, making the logfile
directories easier to understand. We'll add a logrotate rule that
does cleanup after a reasonable interval. Currently tasks disappear
from the cobblerd after either cobblerd is restarted or 24 hours,
whichever comes first. I'm not sure the 24 hour number is a good one, I
should probably make it a week or two. We could also link to all
logfiles in /var/log/cobbler/tasks even if there isn't a task record for
them, but I think that might be overkill. Not sure.
Comments welcome.
We're going to keep this simple for starters until we can get more
things using the task bits.
(It might also be nice if we could have the webapp flash notification
area also post if any tasks have changed status, perhaps in some sort of
AJAXY or simulated-AJAXY sort of way, but that can be done later)
--Michael
14 years, 10 months
koan + ubuntu + kvm
by Pete Wright
hi all,
i have had to put getting a full cobblerd port running due to some work
scheduling stuff. anyway, i have gotten koan to work on a ubuntu 8.x
hypervisor - and i am attempting to boot another ubuntu host on this
box. when i run koan on the hypervisor i am getting the following:
pete@vmserver02:~$ sudo koan --server=cobbler --system=vmtest01 --virt
- looking for Cobbler at http://cobbler/cobbler_api
- reading URL: http://10.32.10.199/cblr/svc/op/ks/system/vmtest01
install_tree: http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64
/bin/sh: rpm: not found
- using qemu hypervisor, type=kvm
- virtinst library does not understand variant IntrepidIbex, treating as
generic
- adding disk: /var/virtual_machines/vmtest01-disk0 of size 20
Tue, 07 Jul 2009 01:38:10 DEBUG Disk path not found: Assuming file
disk type.
libvir: QEMU error :
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//fedora.css
Tue, 07 Jul 2009 01:38:10 DEBUG Cannot find file fedora.css
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//Fedora
Tue, 07 Jul 2009 01:38:10 DEBUG Cannot find file Fedora
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//Server
Tue, 07 Jul 2009 01:38:10 DEBUG Cannot find file Server
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//Client
Tue, 07 Jul 2009 01:38:10 DEBUG Cannot find file Client
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//RedHat
Tue, 07 Jul 2009 01:38:10 DEBUG Cannot find file RedHat
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//CentOS
Tue, 07 Jul 2009 01:38:10 DEBUG Cannot find file CentOS
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//directory.yast
Tue, 07 Jul 2009 01:38:10 DEBUG Doesn't look like a Suse distro
Invalid URL location given:
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//directory.yast
[Errno 14] HTTP Error 404: Not Found
Tue, 07 Jul 2009 01:38:10 DEBUG Fetching URI
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//current/images/...
Tue, 07 Jul 2009 01:38:10 DEBUG Doesn't look like a Debian distro
Invalid URL location given:
http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64//current/images/...
[Errno 14] HTTP Error 404: Not Found
<type 'exceptions.ValueError'>
Could not find an installable distribution at
'http://10.32.10.199/cobbler/ks_mirror/ubuntu_8.10-x86_64/'
File "/usr/lib/python2.5/site-packages/koan/app.py", line 209, in main
k.run()
File "/usr/lib/python2.5/site-packages/koan/app.py", line 319, in run
self.virt()
File "/usr/lib/python2.5/site-packages/koan/app.py", line 642, in virt
return self.net_install(after_download)
File "/usr/lib/python2.5/site-packages/koan/app.py", line 561, in
net_install
after_download(self, profile_data)
File "/usr/lib/python2.5/site-packages/koan/app.py", line 640, in
after_download
self.virt_net_install(profile_data)
File "/usr/lib/python2.5/site-packages/koan/app.py", line 1123, in
virt_net_install
virt_auto_boot = virt_auto_boot
File "/usr/lib/python2.5/site-packages/koan/qcreate.py", line 203,
in start_install
guest.start_install()
File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 818,
in start_install
self._prepare_install(meter)
File "/usr/lib/python2.5/site-packages/virtinst/FullVirtGuest.py",
line 272, in _prepare_install
distro = self.os_distro)
File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py",
line 204, in prepare
self._prepare_kernel_and_initrd(guest, distro, meter)
File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py",
line 174, in _prepare_kernel_and_initrd
distro = distro)
File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py",
line 94, in acquireKernel
progresscb=progresscb, distro=distro, scratchdir=scratchdir)
File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py",
line 80, in _storeForDistro
raise ValueError, _("Could not find an installable distribution at
'%s'" % baseuri)
after looking through the code i think koan is trying to get the
location of the initrd and kernel for this kvm instance. my question
is, since i've already defined the kernel+initrd on the cobbler server
is this necessary? or am i completely off?
any help would be appreciated!
cheers,
-pete
--
Pete Wright
Systems Engineer Demonware
pete(a)demonware.net
office: 310.255.2000 ext 3704
mobile: 604.802.5059
14 years, 10 months
[PATCH] Re: Provision vm with many hard drives
by Jasper Capel
----- "Thomas S Hatch" <thatch45(a)gmail.com> wrote:
> So here is my command, but it dosen't work:
> cobbler system edit --virt-file-size="50 25" --name="docs"
>
> Here is the error:
>
> local variable 'inum' referenced before assignment
> File "/usr/lib/python2.5/site-packages/cobbler/cobbler.py", line 83,
> in main
> rc = BootCLI().run(sys.argv)
>
> File "/usr/lib/python2.5/site-packages/cobbler/cobbler.py", line 61,
> in run
> return self.loader.run(args)
>
> File "/usr/lib/python2.5/site-packages/cobbler/commands.py", line 122,
> in run
> return fn.run()
>
> File "/usr/lib/python2.5/site-packages/cobbler/modules/cli_system.py",
> line 165, in run
> obj.set_virt_file_size(self.options.virt_file_size)
>
> File "/usr/lib/python2.5/site-packages/cobbler/item_system.py", line
> 540, in set_virt_file_size
> return utils.set_virt_file_size(self,num)
>
> File "/usr/lib/python2.5/site-packages/cobbler/utils.py", line 1164,
> in set_virt_file_size
> raise CX(_("invalid virt file size (%s)" % inum))
>
>
This error is an error while raising an exception, not the real error. It would most likely say something like "invalid virt file size (somenumber)". This patch fixes the error message (it was already good in the master branch, so only applied to release16):
https://bender.newnewyork.nl/git/gitweb.cgi?p=cobbler/.git;a=commit;h=004...
-Jasper
14 years, 10 months
Patch For Debian support
by Pete Wright
Hi,
Attached is a patch that will allow cobbler to run on a Ubuntu system.
It parses /etc/lsb-release to get the distribution name and version
needed in utils.py os_release() def.
I also have updated the debian/control file that is used to build the
cobbler .deb. It will now pickup some missing dependencies.
-pete
--
Pete Wright
Systems Engineer Demonware
pete(a)demonware.net
office: 310.255.2000 ext 3704
mobile: 604.802.5059
>From 68c527a25f2887558dcd65bef9da097142c2774d Mon Sep 17 00:00:00 2001
From: Pete Wright <pete(a)clyde.demonware.net>
Date: Tue, 30 Jun 2009 21:24:15 +0100
Subject: [PATCH] updating utils.py os_release() so that ubuntu
and other debian based distributions are detected
correctly.
updated control file so that newer dependencies get
picked up.
---
cobbler/utils.py | 18 ++++++++++++------
debian/changelog | 5 +++++
debian/control | 4 ++--
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/cobbler/utils.py b/cobbler/utils.py
index 5639045..7e8786f 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -781,7 +781,7 @@ def check_dist():
"""
Determines what distro we're running under.
"""
- if os.path.exists("/etc/debian_version"):
+ if os.path.exists("/etc/lsb-release"):
return "debian"
elif os.path.exists("/etc/SuSE-release"):
return "suse"
@@ -818,11 +818,17 @@ def os_release():
version = float(version[0])
return (make, float(version), rest)
elif check_dist() == "debian":
- fd = open("/etc/debian_version")
- parts = fd.read().split(".")
- version = parts[0]
- rest = parts[1]
- make = "debian"
+ fd = open("/etc/lsb-release")
+ lines=fd.readlines()
+ for line in lines:
+ if "DISTRIB_ID" in line:
+ dparts = line.split("=")
+ make = dparts[1]
+ if "DISTRIB_RELEASE" in line:
+ vparts = line.split("=")
+ version = vparts[1]
+# just returning nil for now
+ rest = 0
return (make, float(version), rest)
elif check_dist() == "suse":
fd = open("/etc/SuSE-release")
diff --git a/debian/changelog b/debian/changelog
index 7e4a7a1..0a3d198 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,8 @@
+cobbler (1.7.0-1) unstable; urgency=low
+
+ * Release bump
+
+ -- Pete Wright <pete(a)demownare.net> Thu, 25 Jun 2009 23:14:59 +0000
cobbler (1.5.0-1) unstable; urgency=low
* Release bump
diff --git a/debian/control b/debian/control
index 8e8b039..648be4a 100644
--- a/debian/control
+++ b/debian/control
@@ -1,14 +1,14 @@
Source: cobbler
Section: unknown
Priority: optional
-Maintainer: Jasper Poppe <jpoppe(a)ebay.com>
+Maintainer: Pete Wright <pete(a)demonware.net>
Build-Depends: debhelper (>= 7), python-cheetah, python-yaml, git-core, python
Standards-Version: 3.8.0
Homepage: https://fedoraproject.org/cobbler
Package: cobbler
Architecture: all
-Depends: ${python:Depends}, python, apache2, libapache2-mod-python, python-support, python-yaml, python-netaddr, python-cheetah, syslinux | syslinux-common
+Depends: ${python:Depends}, python, apache2, libapache2-mod-python, python-support, python-yaml, python-netaddr, python-cheetah, python-urlgrabber, syslinux | syslinux-common
Suggests: rsync, tftpd-hpa, mkisofs, tftpd-hpa, dhcp3-server, createrepo
Description: Install server
Cobbler is a network install server. Cobbler
--
1.5.4.3
14 years, 10 months
consolidated patches for ubuntu
by Pete Wright
hi all,
sorry for noise. mpdehaan just tipped me off I was being goofy and not
working against the main git branch. i've gone ahead and now created
these patches against the master branch and attached them.
- 1st patch adds dependency for urlgrabber to the debian build system
- 2nd patch is the fix for os_release() in utils.py
- 3rd patch is to fix a typo in check_service.py for debian based systems
- 4th patch bumps debian release to 1.9 as i think this branch will
eventually be 2.0, not sure if this is correct version naming convention
though!
-pete
--
Pete Wright
Systems Engineer Demonware
pete(a)demonware.net
office: 310.255.2000 ext 3704
mobile: 604.802.5059
>From 1c02c5a5ed436d12eb36fa89343d26183e1e3021 Mon Sep 17 00:00:00 2001
From: Pete Wright <pete(a)clyde.demonware.net>
Date: Tue, 30 Jun 2009 23:00:47 +0100
Subject: [PATCH] Adding dependency for python-urlgrabber
---
debian/control | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/debian/control b/debian/control
index 8e8b039..a39de0d 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Homepage: https://fedoraproject.org/cobbler
Package: cobbler
Architecture: all
-Depends: ${python:Depends}, python, apache2, libapache2-mod-python, python-support, python-yaml, python-netaddr, python-cheetah, syslinux | syslinux-common
+Depends: ${python:Depends}, python, apache2, libapache2-mod-python, python-support, python-yaml, python-netaddr, python-cheetah, python-urlgrabber, syslinux | syslinux-common
Suggests: rsync, tftpd-hpa, mkisofs, tftpd-hpa, dhcp3-server, createrepo
Description: Install server
Cobbler is a network install server. Cobbler
--
1.5.4.3
>From 090910efff7a0ade521c9deb290d5f28f05a0bb8 Mon Sep 17 00:00:00 2001
From: Pete Wright <pete(a)clyde.demonware.net>
Date: Tue, 30 Jun 2009 23:04:58 +0100
Subject: [PATCH] Updating os_release() so that debian type distro's
read /etc/lsb-release to gain distro name and version.
This allows cobbler cli tools to work on ubuntu.
---
cobbler/utils.py | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/cobbler/utils.py b/cobbler/utils.py
index a4c6be8..6ca082e 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -780,7 +780,7 @@ def check_dist():
"""
Determines what distro we're running under.
"""
- if os.path.exists("/etc/debian_version"):
+ if os.path.exists("/etc/lsb-release"):
return "debian"
elif os.path.exists("/etc/SuSE-release"):
return "suse"
@@ -817,11 +817,17 @@ def os_release():
version = float(version[0])
return (make, float(version), rest)
elif check_dist() == "debian":
- fd = open("/etc/debian_version")
- parts = fd.read().split(".")
- version = parts[0]
- rest = parts[1]
- make = "debian"
+ fd = open("/etc/lsb-release")
+ lines=fd.readlines()
+ for line in lines:
+ if "DISTRIB_ID" in line:
+ dparts = line.split("=")
+ make = dparts[1]
+ if "DISTRIB_RELEASE" in line:
+ vparts = line.split("=")
+ version = vparts[1]
+ #just returning nil for now
+ rest = 0
return (make, float(version), rest)
elif check_dist() == "suse":
fd = open("/etc/SuSE-release")
--
1.5.4.3
>From 967ffe5506e3537bd7766cc268710a8d65e39861 Mon Sep 17 00:00:00 2001
From: Pete Wright <pete(a)clyde.demonware.net>
Date: Tue, 30 Jun 2009 23:07:23 +0100
Subject: [PATCH] looks like there was a type in check_service() for
debian based systems.
---
cobbler/action_check.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cobbler/action_check.py b/cobbler/action_check.py
index ae15ef9..dd86349 100644
--- a/cobbler/action_check.py
+++ b/cobbler/action_check.py
@@ -112,7 +112,7 @@ class BootCheck:
if os.path.exists("/etc/init.d/%s" % which):
rc = utils.subprocess_call(self.logger,"/etc/init.d/%s status /dev/null 2>/dev/null" % which, shell=True)
if rc != 0:
- status.append(_("service %s is not running%s") % which,notes)
+ status.append(_("service %s is not running%s") % (which,notes))
return False
else:
status.append(_("Unknown distribution type, cannot check for running service %s" % which))
--
1.5.4.3
>From 889fdb11f460af68ad0969a96507e87202607231 Mon Sep 17 00:00:00 2001
From: Pete Wright <pete(a)clyde.demonware.net>
Date: Tue, 30 Jun 2009 23:16:26 +0100
Subject: [PATCH] bumping release to 1.9, we'll be going to 2.0 soon
---
debian/changelog | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7e4a7a1..cc36bdd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,8 @@
+cobbler (1.9.0-1) unstable; urgency=low
+
+ * Release bump
+
+ -- Pete Wright <pete(a)demownare.net> Thu, 30 Jun 2009 23:14:59 +0000
cobbler (1.5.0-1) unstable; urgency=low
* Release bump
--
1.5.4.3
14 years, 10 months