Vacation
by Michael DeHaan
I'm going to be on vacation starting tomorrow and should be back online
Halloween.
(and no, I'm not going to be a TFTP server for Halloween either)
If you have any patches or other problems, still send them to the list
-- I'll deal with the patch queue when I get back, and I'm sure everyone
can help themselves pretty well on IRC and the mailing list.
If any issues /can't/ be solved on the list after a day or two, please
open Trac tickets on them so they don't get lost in the shuffle.
(Defects not written against 1.2.8 or git/devel's head are invalid).
Thanks! I am confident you guys can help hold down the fort. We'll
work on getting 1.4 hammered into shape when I get back so we can have a
test release out sometime in mid November.
--Michael
15 years, 6 months
ESX import patch
by Hyclak, Matthew
All,
This patch let us import an ESX 3.5u2 ISO into cobbler. I can never get
git-send to work or whatever, so I'm just including it here since it's only a
couple lines.
Michael said some work might be needed on koan. We haven't gotten that far
yet with our current deployment of cobbler, so if anyone else out there is
using ESX and Cobbler, let me know if there's anything that needs addressed.
Thanks,
Matt
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 05c7e7b..a5bc1d9 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -710,6 +710,8 @@ def guess_breed(kerneldir,path):
'Fedora/rpms' : "redhat",
'CentOS/RPMS' : "redhat",
'CentOS/rpms' : "redhat",
+ 'VMware/RPMS' : "redhat",
+ 'VMware/rpms' : "redhat",
'Packages' : "redhat",
'Server' : "redhat",
}
@@ -886,6 +888,9 @@ class RedHatImporter ( BaseImporter ) :
for x in [ "2AS", "2ES", "2WS", "2Desktop" ]:
if rpm.find(x) != -1:
return ("redhat", 2, 0)
+ for x in [ "vmw" ]:
+ if rpm.find(x) != -1:
+ return ("redhat", 3, 0)
# now get the flavor:
flavor = "redhat"
(END)
--
Matt Hyclak
Systems and Operations
Office of Information Technology
Ohio University
(740) 593-1222
15 years, 6 months
(devel) added images to the webapp
by Michael DeHaan
For those that are interested, I've added "Cobbler images" to the
webapp. For those of you using distributions, profiles, systems, and
repos so far, you're probably asking "what did images do again?".
The answer is that they are there to fulfill the rare corner cases of
provisioning.
Principally they do two things right now, in order of usefulness:
(1) They allow koan to track ISOs over NFS and install them, for
instance in deploying Virtualized Windows on top of RHEL via KVM or Xen
fullvirt. (Xenpv does not support this)
(2) Providing a way to add very simple diagnostic tools (like memtest)
to cobbler's PXE menus, and deploying them to specific systems or
networks using PXE infrastructure.
(3) They are a placeholder for being able to rapidly clone virtual
images as opposed to kickstarting them. We're working with the
thincrust appliance guys (http://thincrust.org) and should have some
more info on this later as to what the workflow is. Basically it will
probably involve creating an image, running virtconvert on it, and then
adding the resultant info into cobbler with a "cobbler image add"
command. This command will have lots of command line flags but will
also be able to use the XML data that will come out of virt-convert (or
thincrust). Cobbler will then save this configuration internally (as
editing XML would be less desirable when we have a nice API and a decent
webapp already) and then koan will know how to make this image very easy
to redeploy on lots of systems. Basically the reason to do this would
be (A) you want to create appliances because you are an ISV, and you
want your appliances to be usable by Cobbler users, or (B) you want to
shave some time off your VM deployments. Physical image cloning is
still a pain, we don't recommend images for that.
(4) Deploying hard disk images with memdisk, for folks that want to do
that. Though I find this option least likely and haven't found a
useful use case for it yet.
This is described further (and perhaps more clearly) here --
https://fedorahosted.org/cobbler/wiki/AllAboutImages
We'll pass along more information about the virtual use cases as we get
that hammered out. Most likely those tools to better handle virtual
disk cloning (as opposed to virtual disk installations -- which koan
already does very well and has done for some time) -- will come along in
1.5 as we're trying to tie up 1.3 presently.
--Michael
15 years, 6 months
1.2.8 cobbler webUI <-> cobblerd issue
by Steven Wagner
Hi list!
I'm looking at overhauling an existing PXE-based provisioning system for
a blend of older Fedora servers and some
CentOS development machines. I installed cobbler from the 1.2.8 source
RPM a couple days ago and I'm having some
trouble getting the web UI to authenticate to cobblerd. I can
authenticate as far as Apache is concerned, but
as soon as I click on a link in the UI that requires an XMLRPC call, I
get an exception that turns out to be
"403: Forbidden."
I've tried restarting both daemons, switching authentication methods to
something besides digest (didn't help).
The user is listed as an admin group member in the authorization group
config file. cobblerd doesn't seem to
be logging output to /var/log/cobbler/cobblerd.log, even if I uncomment
all the debug log info at the top of
cobblerd.
I also poked around in my Apache httpd configs, but didn't see anything
immediately off - the cobbler.conf is from
the cobbler distribution, and authentication works as far as Apache and
mod_python are concerned.
Does anyone have any ideas on how/where I can fix this? Cobbler's main
functionality seems to be okay, but I'd
really like to get the web UI working before I go any further.
Any help would be appreciated. Thanks!
-steve
15 years, 6 months
A problem after upgrading to 1.2.8-1
by Douglas Wade Needham
Hi everyone,
This is probably a PEBKAC, but here goes. After a period of
inactivity, I needed to use install some systems at home. Since 1.0.3
was giving me some grief during sync, I upgraded to 1.2.8-1. Before
the upgrade, I was getting
2008-10-17 21:37:42,151 - api - sync
2008-10-17 21:37:57,045 - remote - Exception occured: exceptions.AttributeError
2008-10-17 21:37:57,073 - remote - Exception value: 'NoneType' object has no attribute 'name'
2008-10-17 21:37:57,395 - remote - Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 507, in _dispatch
return method_handle(*params)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 739, in sync
return self.api.sync()
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 327, in sync
return sync.run()
File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 101, in run
self.pxegen.make_pxe_menu()
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 185, in make_pxe_menu
if distro.name.find("-xen") != -1:
And now, I am getting...
2008-10-17 21:57:40,055 - api - sync
2008-10-17 21:57:44,226 - remote - Exception occured: exceptions.AttributeError
2008-10-17 21:57:44,227 - remote - Exception value: 'NoneType' object has no attribute 'arch'
2008-10-17 21:57:44,229 - remote - Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 612, in _dispatch
return method_handle(*params)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 844, in sync
return self.api.sync()
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 381, in sync
return sync.run()
File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 106, in run
self.pxegen.make_pxe_menu()
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 210, in make_pxe_menu
self.make_s390_pseudo_pxe_menu()
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 226, in make_s390_pseudo_pxe_menu
if distro.arch == "s390x":
The upgrade was done from the 1.2.8-1 src rpm, and after cobbler was
upgraded, I updated my configuration files (dhcp.template,
modules.conf and settings), restarted cobblerd, and the error occurred
during a `cobbler sync`.
For additional info, you can find details about my configuration at
the following URLs:
http://www.ka8zrt.com/files/cobbler.516a/cobbler.report
http://www.ka8zrt.com/files/cobbler.516a/settings
So, with that, can someone please tell me what I am missing this
evening, or let me know what additional diagnostics I should gather.
Thanks!
- Doug
15 years, 6 months
(devel) [PATCH] switching spacewalk login method
by Mike McCune
Simple method name change in the authn_spacewalk.py file.
We can't call the regular login() method because that actually calls
back to cobbler to setup a ticket for the session which creates an
infinite loop.
Mike
--
Mike McCune
mmccune AT redhat.com
Engineering | Portland, OR
RHN Satellite | 650.567.9039x79248
>From d8701ceb51b583a1f8009c2252285ef37dd855cc Mon Sep 17 00:00:00 2001
From: Mike McCune <mmccune(a)gmail.com>
Date: Fri, 17 Oct 2008 15:34:00 -0700
Subject: [PATCH] switching to cobbler specific login method that doesn't attempt to re-login
back to cobbler causing an infinite loop of login attemps.
---
cobbler/modules/authn_spacewalk.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cobbler/modules/authn_spacewalk.py b/cobbler/modules/authn_spacewalk.py
index 2636400..958120c 100644
--- a/cobbler/modules/authn_spacewalk.py
+++ b/cobbler/modules/authn_spacewalk.py
@@ -48,7 +48,7 @@ def authenticate(api_handle,username,password):
client = xmlrpclib.Server(spacewalk_url, verbose=0)
- key = client.auth.login(username,password)
+ key = client.auth.loginAndSkipIntegrationAuth(username,password)
if key is None:
return False
--
1.5.6.5
15 years, 6 months
FYI -- koan code for --replace-self also works on RHEL3 ... and RHEL 2
by Michael DeHaan
I just tested this as we're going to be needing it as part of Spacewalk
using cobbler as an XMLRPC service.
We knew RHEL 3 worked but now we know RHEL 2 also works.
You will of course have to get the kickstarts right, the stock templates
contain many things that older Anaconda does not like.
Currently RHEL 2 PXE does not seem to work, so I'm wondering, is anyone
PXE'ing RHEL 2 with cobbler in the field? I'm investigating to see
whether it wants different kernel arguments.
--Michael
15 years, 6 months
[PATCH] adding --noheaders option to cobbler report
by Anderson Silva
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Allows cobbler report to show output w/o headers.
AS
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkj4Di4ACgkQECmX3C4JWKgiyQCgkbSn7VGlrO2KO4pbGbUeO8Sf
7PEAn1MnUMb/qADWohX8KQ8RB89CkCBA
=+Gjv
-----END PGP SIGNATURE-----
>From 3500f77b36d6b8cf0ba05b4b28bba3f6da1df14f Mon Sep 17 00:00:00 2001
From: Anderson Silva <ansilva(a)bean2test.re.redhat.com>
Date: Thu, 16 Oct 2008 16:04:35 -0400
Subject: [PATCH] add --noheaders to cobbler report
---
cobbler/action_report.py | 61 ++++++++++++++++++++++++++---------------
cobbler/api.py | 5 ++-
cobbler/modules/cli_report.py | 15 ++++++----
3 files changed, 51 insertions(+), 30 deletions(-)
diff --git a/cobbler/action_report.py b/cobbler/action_report.py
index e57946d..4f2e0d7 100644
--- a/cobbler/action_report.py
+++ b/cobbler/action_report.py
@@ -34,8 +34,9 @@ class Report:
self.report_what = None
self.report_name = None
self.report_fields = None
+ self.report_noheaders = None
- def reporting_csv(self, info, order):
+ def reporting_csv(self, info, order, noheaders):
"""
Formats data on 'info' for csv output
"""
@@ -60,9 +61,13 @@ class Report:
outputbody += '\n'
outputheaders += '\n'
+
+ if noheaders:
+ outputheaders = '';
+
return outputheaders + outputbody
- def reporting_trac(self, info, order):
+ def reporting_trac(self, info, order, noheaders):
"""
Formats data on 'info' for trac wiki table output
"""
@@ -88,9 +93,13 @@ class Report:
outputbody += '||\n'
outputheaders += '||\n'
+
+ if noheaders:
+ outputheaders = '';
+
return outputheaders + outputbody
- def reporting_doku(self, info, order):
+ def reporting_doku(self, info, order, noheaders):
"""
Formats data on 'info' for doku wiki table output
"""
@@ -117,9 +126,13 @@ class Report:
outputbody += sep2 + '\n'
outputheaders += sep1 + '\n'
+
+ if noheaders:
+ outputheaders = '';
+
return outputheaders + outputbody
- def reporting_mediawiki(self, info, order):
+ def reporting_mediawiki(self, info, order, noheaders):
"""
Formats data on 'info' for mediawiki table output
"""
@@ -154,20 +167,24 @@ class Report:
outputbody += '\n' + sep3 + '\n'
outputheaders += '\n' + sep3 + '\n'
+
+ if noheaders:
+ outputheaders = '';
+
return opentable + outputheaders + outputbody + closetable
- def print_formatted_data(self, data, order, report_type):
+ def print_formatted_data(self, data, order, report_type, noheaders):
"""
Used for picking the correct format to output data as
"""
if report_type == "csv":
- print self.reporting_csv(data, order)
+ print self.reporting_csv(data, order, noheaders)
if report_type == "mediawiki":
- print self.reporting_mediawiki(data, order)
+ print self.reporting_mediawiki(data, order, noheaders)
if report_type == "trac":
- print self.reporting_trac(data, order)
+ print self.reporting_trac(data, order, noheaders)
if report_type == "doku":
- print self.reporting_doku(data, order)
+ print self.reporting_doku(data, order, noheaders)
return True
@@ -196,7 +213,7 @@ class Report:
print obj.printable()
return True
- def reporting_print_all_fields(self, collection, report_type):
+ def reporting_print_all_fields(self, collection, report_type, report_noheaders):
"""
Prints all fields in a collection as a table given the report type
"""
@@ -229,11 +246,11 @@ class Report:
data.append(item)
- self.print_formatted_data(data = data, order = out_order, report_type = report_type)
+ self.print_formatted_data(data = data, order = out_order, report_type = report_type, noheaders = report_noheaders)
return True
- def reporting_print_x_fields(self, collection, report_type, report_fields):
+ def reporting_print_x_fields(self, collection, report_type, report_fields, report_noheaders):
"""
Prints specific fields in a collection as a table given the report type
"""
@@ -260,13 +277,13 @@ class Report:
data.append(item)
- self.print_formatted_data(data = data, order = fields_list, report_type = report_type)
+ self.print_formatted_data(data = data, order = fields_list, report_type = report_type, noheaders = report_noheaders)
return True
# -------------------------------------------------------
- def run(self, report_what = None, report_name = None, report_type = None, report_fields = None):
+ def run(self, report_what = None, report_name = None, report_type = None, report_fields = None, report_noheaders = None):
"""
Get remote profiles and distros and sync them locally
"""
@@ -310,27 +327,27 @@ class Report:
elif report_type != 'text' and report_fields == 'all':
if report_what in [ "all", "distros", "distro" ]:
- self.reporting_print_all_fields(self.api.distros(), report_type)
+ self.reporting_print_all_fields(self.api.distros(), report_type, report_noheaders)
if report_what in [ "all", "profiles", "profile" ]:
- self.reporting_print_all_fields(self.api.profiles(), report_type)
+ self.reporting_print_all_fields(self.api.profiles(), report_type, report_noheaders)
if report_what in [ "all", "systems", "system" ]:
- self.reporting_print_all_fields(self.api.systems(), report_type)
+ self.reporting_print_all_fields(self.api.systems(), report_type, report_noheaders)
if report_what in [ "all", "repos", "repo" ]:
- self.reporting_print_all_fields(self.api.repos(), report_type)
+ self.reporting_print_all_fields(self.api.repos(), report_type, report_noheaders)
else:
if report_what in [ "all", "distros", "distro" ]:
- self.reporting_print_x_fields(self.api.distros(), report_type, report_fields)
+ self.reporting_print_x_fields(self.api.distros(), report_type, report_fields, report_noheaders)
if report_what in [ "all", "profiles", "profile" ]:
- self.reporting_print_x_fields(self.api.profiles(), report_type, report_fields)
+ self.reporting_print_x_fields(self.api.profiles(), report_type, report_fields, report_noheaders)
if report_what in [ "all", "systems", "system" ]:
- self.reporting_print_x_fields(self.api.systems(), report_type, report_fields)
+ self.reporting_print_x_fields(self.api.systems(), report_type, report_fields, report_noheaders)
if report_what in [ "all", "repos", "repo" ]:
- self.reporting_print_x_fields(self.api.repos(), report_type, report_fields)
+ self.reporting_print_x_fields(self.api.repos(), report_type, report_fields, report_noheaders)
diff --git a/cobbler/api.py b/cobbler/api.py
index cb9ddc7..a50b969 100644
--- a/cobbler/api.py
+++ b/cobbler/api.py
@@ -538,13 +538,14 @@ class BootAPI:
include_systems = systems
)
- def report(self, report_what = None, report_name = None, report_type = None, report_fields = None):
+ def report(self, report_what = None, report_name = None, report_type = None, report_fields = None, report_noheaders = None):
"""
Report functionality for cobbler
"""
reporter = action_report.Report(self._config)
return reporter.run(report_what = report_what, report_name = report_name,\
- report_type = report_type, report_fields = report_fields)
+ report_type = report_type, report_fields = report_fields,\
+ report_noheaders = report_noheaders)
def get_kickstart_templates(self):
return utils.get_kickstar_templates(self)
diff --git a/cobbler/modules/cli_report.py b/cobbler/modules/cli_report.py
index 328337a..9c94e25 100644
--- a/cobbler/modules/cli_report.py
+++ b/cobbler/modules/cli_report.py
@@ -34,10 +34,11 @@ class ReportFunction(commands.CobblerFunction):
return "report"
def add_options(self, p, args):
- p.add_option("--what", dest="what", default="all", help="distros/profiles/systems/repos")
- p.add_option("--name", dest="name", help="report on just this object")
- p.add_option("--format", dest="type", default="text", help="text/csv/trac/doku/mediawiki")
- p.add_option("--fields", dest="fields", default="all" , help="what fields to display")
+ p.add_option("--what", dest="what", default="all", help="distros/profiles/systems/repos")
+ p.add_option("--name", dest="name", help="report on just this object")
+ p.add_option("--format", dest="type", default="text", help="text/csv/trac/doku/mediawiki")
+ p.add_option("--fields", dest="fields", default="all" , help="what fields to display")
+ p.add_option("--noheaders", dest="noheaders", help="don't output headers", action='store_true', default=False)
def run(self):
@@ -45,9 +46,11 @@ class ReportFunction(commands.CobblerFunction):
raise CX(_("Invalid value for --what"))
if self.options.type not in ["text", "csv", "trac", "doku", "mediawiki" ]:
raise CX(_("Invalid vavlue for --type"))
-
+
+
return self.api.report(report_what = self.options.what, report_name = self.options.name, \
- report_type = self.options.type, report_fields = self.options.fields)
+ report_type = self.options.type, report_fields = self.options.fields, \
+ report_noheaders = self.options.noheaders)
########################################################
# MODULE HOOKS
--
1.5.4.1
15 years, 6 months