cobbler cli user doesn't work after 1.x to 2.0.1 upgrade
by Chris Kelly
Hello-
I upgraded from 1.x to 2.0.1 and the cobbler cli user no longer works.
example:
[root@admin1 ~]# cobbler system add --name=foobar
cobbler.cexceptions.CX:'user <DIRECT> does not have access to
resource: xedit_system'
[root@admin1 ~]#
Looking around in the source code, I see:
/usr/lib/python2.4/site-packages/cobbler/modules/authz_ownership.py
def authorize(api_handle,user,resource,arg1=None,arg2=None):
"""
Validate a user against a resource.
All users in the file are permitted by this module.
"""
if user == "<DIRECT>":
# CLI should always be permitted
return True
...
so that should fall through fine. However, we are using LDAP
([authentication] module = authn_ldap) and I don't see any such code
in the LDAP module. It doesn't seem that adding similar code to the
authn_ldap.py file (and clearing pyo and pyc files and restarting
cobblerd) does the trick.
We are using the config file to manage users ([authorization] module =
authz_configfile) and adding <DIRECT> as a user there doesn't let root
on the command line back in.
Any ideas? Thanks!
-Chris
14 years
[PATCH] Logging and cli error patches for master
by Vreman, Peter
I have the following list of patches for master available at http://github.com/pvreman/cobbler/commits/master/.
Koan:
+ afda8a88249ed3a124651a25fc52e9f78d1ab414 update string_to_hash and hash_to_string from cobblerd to support multiple kernel options with the same name
Logging improvements for background tasks:
+ 90c00b3abba0d15a2e6857469ea24fad00f95b0b make sync actions always verbose, before the copy actions were only logged without context
+ 1a09c11eb2c546d53c366b26ab4acce96d3bc314 logging for creation of dhcp and dns configurations
+ 9867963dc8eb11052ec3521c5baf18803fe826e9 log creation of pxe files
+ 9ee3887130fe2beb49d332a3420166398595242d log updates, add criteria to find_items and make more debug
CLI error handling:
+ e9d0cf90df35dd351c954c097a28ddf752edeb6b exit with error code 1 if command fails
+ 92ba9bb9c5594223083029cc8676b5c20d826c33 raise error in blended data if profile or system not found
WebUI redundant code:
+ efbc6519b34e9b9c95a9298d68fbf340b0a82c1d remove duplicate code
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.
14 years, 5 months
proposal: stop using duplicated/bundled libraries
by Cristian Ciupitu
As some of you might already know, bundling libraries isn't a good
practice for various reasons. You can read more about this subject at
http://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries.
Unfortunately cobbler comes with its own subprocess and optparse
modules: cobbler/sub_process.py, koan/sub_process.py and
koan/opt_parse.py. As far as I know, this is needed because the Python
from RHEL is old and its stdlib doesn't include them. On the other hand,
the Python from Fedora has them and it would be nice to use these.
What I would like to propose is to try using the system provided
libraries and if they aren't available fall back to the bundled ones.
I'm waiting for your opinions on this.
Thank you,
Cristian Ciupitu
14 years, 5 months
cobbler check: BIND detection not working
by Cristian Ciupitu
cobbler check doesn't properly detect that BIND is available on Fedora
11. It runs "named --help" and it searches in its stdout for "unknown
option". On Fedora 11, this is printed on stderr, not on stdout.
What I would like to propose is to run "named -v" which prints to stdout
something like "BIND 9.6.1-P1-RedHat-9.6.1-6.P1.fc11". I think that
it's saner to use an option that's actually supported, than one that
is not. Unfortunately I don't have access to a RHEL system, so I don't
know if this idea would work on RHEL, too. I'm waiting for your feedback
and opinions regarding this.
Thank you,
Cristian
14 years, 5 months
cobbler 2.0.1 fix for reposync --only
by Alexander, Ian
This is in reference to https://fedorahosted.org/cobbler/ticket/491. It
looks like an indentation error in the remote file. Once you've patched
remote.py, you will have to restart cobblerd.
root@cobbler:/usr/lib/python2.4/site-packages/cobbler#diff -u
remote.py.orig remote.py
--- remote.py.orig 2009-10-02 15:53:16.000000000 -0500
+++ remote.py 2009-10-18 01:07:18.000000000 -0500
@@ -230,11 +230,11 @@
only = options.get("only", None)
if only is not None:
repos = [ only ]
- if repos != "":
+ if len(repos) != 0:
for name in repos:
self.remote.api.reposync(tries=self.options.get("tries",3), name=name,
nofail=True, logger=self.logger)
- else:
-
self.remote.api.reposync(tries=self.options.get("tries",3), name=None,
nofail=False, logger=self.logger)
+ else:
+
self.remote.api.reposync(tries=self.options.get("tries",3), name=None,
nofail=False, logger=self.logger)
return True
return self.__start_task(runner, token, "reposync", "Reposync",
options)
14 years, 6 months
[PATCH] Support for autostarting qemu/libvirt virts
by Tim Bielawa
Greetings all!
This is my first patch to the project, hopefully the first of many!
This patch provides the ability to auto start any VM that registers
itself in libvirt. In the code it works on virts with virt_type of
'qemu'.
A pause was required for the lookupByName(domain_name) call to
succeed. In my testing lookupByName was consistently unable to locate
the domain unless a brief pause was forced before the lookup.
The current behavior should the lookup fail is to throw an InfoException.
This patch closes https://fedorahosted.org/cobbler/ticket/408 All code
is based off 65bf5c1fa.... from the FedoraHosted git repository.
I look forward to your feedback and working with everyone more in the future.
--- Tim 'Shaggy' Bielawa
http://peopleareducks.com
14 years, 6 months