[PATCH] - update for anamon to watch any files.
by Bill Peck
Hello,
Here are some simple patches to update anamon.py to support watching any
file and it also updates the pre_anamon snippet to report on bootup.
This plays into our bigger goal of making a lab in a box spin of
cobbler+fedora for install testing. This is step one, step two is to
cut a hole in the box.
15 years, 5 months
Kickstart template variables not working
by Jared Hodge
So now that I've upgraded to 1.4, I'm still having the same issue I was
having back in 1.0 (though with better debugging output). I have the
following lines:
#if $ip_address
network --bootproto static --ip $ip_address --netmask 255.255.0.0
--gateway 10.0.0.62 --nameserver 10.0.100.1 --onboot=true --noipv6
--device=eth0
#end if
which are very similar to some I've seen online (to see if ip_address is
defined), so they should work, yet I get the following errors when I try
to view the rendered kickstart (from the webUi):
# *** ERROR ***
#
# There is a templating error preventing this file from rendering
correctly.
#
# This is most likely not due to a bug in Cobbler and is something you
can fix.
#
# Look at the message below to see what things are causing problems.
#
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
#
# Try fixing the problem and then investigate to see if this message
goes
# away or changes.
#
#
# cannot find 'ip_address'
# File "/usr/lib/python2.5/site-packages/cobbler/templar.py", line
114, in render
# data_out = str(t)
#
# File "/usr/lib64/python2.5/site-packages/Cheetah/Template.py", line
982, in __str__
# def __str__(self): return getattr(self, mainMethName)()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1231532768_64_25621.py",
line 122, in respond
#
<pre>
MOD_PYTHON ERROR
ProcessId: 10225
Interpreter: 'linux-jared.militho.com'
ServerName: 'linux-jared.militho.com'
DocumentRoot: '/var/www/html'
URI: '/cblr/svc/op/ks/profile/Fedora10-x86_64'
Location: None
Directory: '/var/www/cobbler/svc/'
Filename: '/var/www/cobbler/svc/op'
PathInfo: '/ks/profile/Fedora10-x86_64'
Phase: 'PythonHandler'
Handler: 'services'
Traceback (most recent call last):
File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line
1128, in _execute_target
result = object(arg)
File "/var/www/cobbler/svc/services.py", line 98, in handler
return apache.HTTP_ERROR
AttributeError: 'module' object has no attribute 'HTTP_ERROR'
MODULE CACHE DETAILS
Accessed: Fri Jan 9 14:27:48 2009
Generation: 2
_mp_cb62af599b9ec7a553f07c92e369abb6 {
FileName: '/var/www/cobbler/svc/services.py'
Instance: 1
Generation: 1
Modified: Fri Dec 19 10:17:37 2008
Imported: Fri Jan 9 13:37:26 2009
}
</pre>
Sorry if this is a very simple syntax issue, but I'm new to cobbler (and
never used cheetah). It seems to me though, that my install is broken.
I had the same issues before I rebuilt 1.4 from srpms, so I don't think
that's the issue. Thanks.
-Jared
15 years, 5 months
[ANNOUNCE] Cobbler 1.4.1 and Koan 1.4.1 available
by Michael DeHaan
It's time to release 1.4.1 and koan 1.4, codename "zombie llama
accountant" *
This is primarily a bugfix release (as will be any future releases of
the 1.4.X stable branch), though you also get a small feature a bit
early -- the system batch editing in the webapp which turns out to be
very cool -- due to a slight error of mine with git. So if you think
fix releases are boring, this one has a feature for you :)
Cobbler changes:
- Bash errors with respect to network configuration are corrected (the
big fix for this release)
- Cobbler check now is more correct on SuSE.
- Cobbler no longer programatically calls restorecon, making sync
operations much much faster. (if yours is still slow, please follow up!)
- Cobbler check now suggests semanage rules to apply (the RPM does not
apply them)
- An obscure xmlrpclib corner case is now corrected
- External (non-templated) kickstarts are now served correctly
- Systems can now be batch edited in the web application.
Koan changes:
- Kickstarts are no longer embedded in the initrd by default for
reinstallations, use --embed-kickstart for this behavior (fixes some
Fedora 10 issues, but is also faster)
- a missing import for qemu image based installs (not kickstarts) has
been corrected
- LVM based virt installations now do not fail if the SELinux context on
the volume has already been set.
These will be available in Fedora (stable) and EPEL-testing shortly (and
EPEL when it next rolls over)
For those that don't want to wait, see
http://people.fedoraproject.org/~mdehaan/files/cobbler/ where you can
get the src rpms and rebuild things.
Development work will continue on the 1.5.X branch in git, though if
anyone reports defects on 1.4.1, we'll try to fix them and produce a
1.4.2 in the future.
As always, a huge thanks to everyone who contributed ideas, testing,
documentation, or code to this release. You all rock.
--Michael
* = codenames are not guaranteed to make sense.
15 years, 5 months
FW: Feature request - cobbler version
by Jared Hodge
OK, this one is a very simple request. Could you set cobbler to report
its version when you do something simple like:
cobbler -v
cobbler --version
Also, reporting the cobbler version on the CobblerWebUi would be
helpful.
Finally, reporting the current version on the main fedorahosted.org page
would be a good idea. I infer that I have the latest stable version of
cobbler (checked with "yum info cobbler") at 1.0.2, but that wasn't
immediately clear.
Anyway, good work. I like what I've seen using it the little bit I have
so far.
-Jared
15 years, 5 months
Re: [Fwd: Re: [et-mgmt-tools] Help perfect Cobbler SELinux policy]
by Michael DeHaan
domg472 g472 wrote:
> 2009/1/9 Michael DeHaan <mdehaan(a)redhat.com>:
>
>
>> Just thinking about things offhand cobbler needs to be able to read and
>> write to Apache and tftp-server content, read and write to /var/lib/cobbler
>> and /var/log/cobbler, and read to /etc/cobbler.
>>
>
> /var/lib/cobbler, /etc/cobbler and /var/log/cobbler is for a large
> part taken care of.
> There is also an apache_content_template for the cobbler web app but
> that needs testing and more work.
>
Yeah there is some mod_python stuff in there, we can run the test code
next week and look for denial info.
> tftp-server content may or may not prove to be a bigger issue. Again
> this also needs testing before we can even start thinking about a
> solution.
>
Cobbler recommends setting /tftpboot to public_content_t with an
semanage rule right now so we can hardlink content that is also in /var/www
and elsewhere. (Without public_content_t this must be copied).
With those restrictions that may not be a problem.
> AVC denials is the best feedback i can hope for.
>
> Thing that i would like to know are:
>
> 1. I noticed Cobbler wants to bind tcp and udp sockets to ports, what
> are the port numbers and what is the proper (tcpd) name for ports that
> cobbler owns (what name works with tcp wrappers for example)
>
ldd /usr/bin/python doesn't show any libwrap linked in, so AFAIK it's
not used.
Default ports:
25150 -- udp syslog listener (going away in the next release)
25151 -- tcp (XMLRPC port)
25152 -- tcp (XMLRPC read-write-api port)
> 2. I noticed that Cobbler wants to search /tmp. What is it looking
> for? Does Cobbler own any content in /tmp?
>
The "make test" code should use /tmp. The regular usage of cobblerd
should not.
Verification: grep "/tmp" *.py
If it does, that's pretty odd.
> 3. How does Cobbler interact with RPM? I noticed that cobbler wants to
> execute and interact with files owned by RPM. Is RPM optional or
> required?
>
Required. It's using rpm -q --whatprovides redhat-release for
distribution checks in a few places.
This should be the only place it calls RPM.
> 4. I assume DBUS is optional ( Cobbler would also work on system
> without DBUS running?)
>
Yes. I don't explicitly use dbus anywhere. I'm guessing the avahi
package (if installed) might use dbus, and cobbler will try to use Avahi
if installed.
> That is all that i can think of for now.
>
> Dominick
>
Very cool, thanks for all the help and input -- I'll see if we can get
this tested sometime next week. Trying to get a release out today.
Much appreciated!
--Michael
15 years, 5 months
Re: [PATCH] Added suse as distribution type in action_check.py
by Kevin James
Hi,
It appears that the first part of this patch (line 99, adding a check
for suse in the check_service function) didn't get applied - only the
second part (checking for apache2 instead of httpd if the distro is
suse).
Oversight? Or did I get something wrong?
Cheers,
KEv.
On Mon, 2008-12-22 at 11:41 -0500, Michael DeHaan wrote:
> Kevin James wrote:
> > Another SuSE-related patch. This one fixes "cobbler check" so that it
> > doesn't see suse as an unknown distribution when checking the running
> > services. It also checks for service apache2 instead of httpd if the
> > distro is SuSE.
> >
> >
> > ---
> > cobbler/action_check.py | 7 +++++--
> > 1 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/cobbler/action_check.py b/cobbler/action_check.py
> > index 99fffbb..416267f 100644
> > --- a/cobbler/action_check.py
> > +++ b/cobbler/action_check.py
> > @@ -95,7 +95,7 @@ class BootCheck:
> > if notes != "":
> > notes = " (NOTE: %s)" % notes
> > rc = 0
> > - if utils.check_dist() == "redhat":
> > + if utils.check_dist() == "redhat" or utils.check_dist() ==
> > "suse":
> > if os.path.exists("/etc/rc.d/init.d/%s" % which):
> > rc = sub_process.call("/sbin/service %s status
> >
> >> /dev/null 2>/dev/null" % which, shell=True, close_fds=True)
> >>
> > if rc != 0:
> > @@ -185,7 +185,10 @@ class BootCheck:
> > """
> > Check if Apache is installed.
> > """
> > - self.check_service(status,"httpd")
> > + if utils.check_dist()=="suse":
> > + self.check_service(status, "apache2")
> > + else:
> > + self.check_service(status,"httpd")
> >
> >
> > def check_dhcpd_bin(self,status):
> >
>
> I was getting some weird "corrupt patch" content on this one, was this
> generated using "git-format-patch" ? If so, I might recommend using
> attachments so mail readers
> don't get in the way.
>
> Either way, this is a good feature and I've applied it, with some minor
> changes -- namely only making the "utils.check_dist()" call once and
> just saving the value.
>
> As this was a simple patch, I've applied this on both devel and master
> branches.
>
> --Michael
>
>
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler
--
Kevin James
Applied Technology Senior Strategist
Novell Global Enablement
------------------------
Novell, Inc.
http://www.novell.com
15 years, 5 months
[PATCH] lvm selinux context: remove exit code check for semanage tool
by Anton Arapov
semanage fails in case if context was already set. This lead to
problems with guest [re]installation using koan for the case when
fcontext was previously set to target partition.
We can check for context before executing semanage, but this will
unnecessary complicate code. So it is easier just to drop this check
for semanage.
All the fail cases, we afraid of, will happen with chcon, so once
we will have the problem with selinux, target partition or weirdness
with selinux, the chcon will fail and semanage will not be executed.
---
koan/app.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/koan/app.py b/koan/app.py
index e889c80..33714a1 100755
--- a/koan/app.py
+++ b/koan/app.py
@@ -1450,15 +1450,14 @@ class Koan:
args = "/usr/bin/chcon -t %s %s" % (context_type, partition_location)
print "%s" % args
change_context = sub_process.call(args, close_fds=True, shell=True)
+ if change_context != 0:
+ raise InfoException, "SELinux security context setting to LVM partition failed"
# modify SELinux policy in order to preserve security context
# between reboots
args = "/usr/sbin/semanage fcontext -a -t %s %s" % (context_type, partition_location)
print "%s" % args
- change_context |= sub_process.call(args, close_fds=True, shell=True)
-
- if change_context != 0:
- raise InfoException, "SELinux security context setting to LVM partition failed"
+ sub_process.call(args, close_fds=True, shell=True)
# return partition location
return partition_location
--
1.6.0.6
15 years, 5 months
Re: [et-mgmt-tools] koan error on creating image based guest
by Tom Brown
Michael DeHaan wrote:
> Tom Brown wrote:
>> For the first time i am trying to create a windows guest with koan -
>> Its quite possible i missed something but this is the result from koan.
>>
>> I am using the latest 1.4 of koan and cobbler
>>
>> # koan --virt --image=win-xp --server=192.168.11.1
>> - ISO or Image based installation, always uses --virt-type=qemu
>> - no virt-type specified, auto-selecting qemu
>> libvirtd (pid 2313) is running...
>> - using qemu hypervisor, type=qemu
>> exceptions.NameError
>> global name 'utils' is not defined
>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 186, in main
>> k.run()
>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 403, in run
>> self.virt()
>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 678, in virt
>> return self.net_install(after_download)
>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 597, in
>> net_install
>> after_download(self, profile_data)
>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 676, in
>> after_download
>> self.virt_net_install(profile_data)
>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 1082, in
>> virt_net_install
>> virt_type = self.virt_type
>> File "/usr/lib/python2.4/site-packages/koan/qcreate.py", line 92,
>> in start_install
>> (tempdir, filename) = utils.nfsmount(input_path)
>>
>>
>> thanks
>>
>> _______________________________________________
>> et-mgmt-tools mailing list
>> et-mgmt-tools(a)redhat.com
>> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
>
> It does appear to be a missing import. Perhaps some weird Python
> interpreter thing allowed the utils to "just work" as the parent
> module had already imported it? Really that shouldn't happen.
>
> Ultimately though, you probably want the cobbler mailing list for
> stuff like this -- https://fedorahosted.org/mailman/listinfo/cobbler
>
> I'll fix it.
looks much better now -
# koan --virt --image=win-xp --server=192.168.11.1
- ISO or Image based installation, always uses --virt-type=qemu
- no virt-type specified, auto-selecting qemu
libvirtd (pid 2313) is running...
- using qemu hypervisor, type=qemu
- running: /bin/mount -t nfs -o ro
192.168.11.1:/var/www/cobbler/ks_mirror/windows /tmp/koan_6eIz11.mnt
after install completes, you may unmount and delete /tmp/koan_6eIz11.mnt
- adding disk: /opt/qemu//Thu_Jan__8_21_42_32_2009-disk0 of size 10
libvir: QEMU error :
libvir: QEMU error :
use virt-manager and connect to qemu to manage guest:
Thu_Jan__8_21_42_32_2009
Sorry for wrong list - mixup with my folders
thanks
15 years, 5 months
Cobbler requiring koan
by Michael DeHaan
Cobbler's starting to share just a few functions with koan.
Dual maintaince seems to be a /bad/ thing to me, so any objections to
cobbler requiring koan? Creating a cobbler-common package is something
I very much want to avoid.
Koan does /not/ require libvirt, so what it pulls in is minimal.
--Michael
15 years, 5 months