Re: Cobbler 2.0 startup error.
Hej! I go the same problem upgrading from 1.6.6. I had a distro with with files that dont exist any more. Old cobbler just complained and started. I removed the distro file and now it start. /Jonas Michael DeHaan wrote: On 09/18/2009 12:34 PM, Michael DeHaan wrote: On 09/18/2009 12:04 PM, Jeremy Rosengren wrote: I just installed Cobbler 2.0 on a server that was running 1.6.6 and am seeing the following error: [r...@srvr ~]# service cobblerd start Starting cobbler daemon: Traceback (most recent call last): File /usr/bin/cobblerd, line 76, in main api = cobbler_api.BootAPI(is_cobblerd=True) File /usr/lib/python2.4/site-packages/cobbler/api.py, line 117, in __init__ self.deserialize() File /usr/lib/python2.4/site-packages/cobbler/api.py, line 678, in deserialize return self._config.deserialize() File /usr/lib/python2.4/site-packages/cobbler/config.py, line 208, in deserialize serializer.deserialize(self._systems) File /usr/lib/python2.4/site-packages/cobbler/serializer.py, line 122, in deserialize rc = storage_module.deserialize(obj,topological) File /usr/lib/python2.4/site-packages/cobbler/modules/serializer_catalog.py, line 189, in deserialize obj.from_datastruct(datastruct) File /usr/lib/python2.4/site-packages/cobbler/collection.py, line 153, in from_datastruct self.add(item) File /usr/lib/python2.4/site-packages/cobbler/collection.py, line 234, in add ref.check_if_valid() File /usr/lib/python2.4/site-packages/cobbler/item_system.py, line 527, in check_if_valid raise CX(profile is required) CX: 'profile is required' [ OK ] I have a very simple configuration, as I mainly use cobbler to do non-kickstart PXE installs and therefore don't have any systems defined. Thanks, -- jeremy ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler Hi Jeremy, Looking over your configuration I see you do have one system record, stored as win7.json.That's fine, you've encountered a Cobbler bug because of it though. Here's the contents of that file: {comment: , kickstart: inherit, name_servers_search: [], ks_meta: {}, kernel_options_post: {}, image: win7-x64_64, redhat_management_key: inherit, virt_path: inherit, power_user: , kernel_options: {}, name_servers: [], mtime: 1243049642.635572, template_files: {}, gateway: , uid: MTI0MzA0OTY0Mi42NDk0MTE3MjQuNTAxOTc, power_type: ipmitool, virt_cpus: inherit, hostname: , mgmt_classes: [], power_pass: , netboot_enabled: true, profile: , virt_bridge: inherit, parent: , virt_type: inherit, interfaces: {}, power_address: , virt_file_size: inherit, ctime: 1243049642.635572, owners: [admin], name: win7, virt_ram: inherit, power_id: , random_id: FQ3L, server: inherit, redhat_management_server: inherit, depth: 1} It looks like 2.0 has a bug WRT image objects that we need to fix. Our code to validate systems looks like this: def check_if_valid(self): if self.name is None or self.name == : raise CX(name is required) if self.profile is None or self.profile == : raise CX(profile is required) Basically the validation code assumes that the profile be set to something, but for a systems object, it can also be parented from an image. Either a profile or an image must be assigned, but not both. This has drifted from what it used to do. Images have largely been used by OVirt.org at this point (which, IIRC, does not use system records), so I believe this warrants some wholesale testing of the image chain, all the way through to koan. They are clearly subject to a little bit of bitrot as I mostly concentrate on kickstart installations.We need to fix this as well as add-in a good series of tests to validate lesser-exercised sections of the app, no doubt. If you want to get the rest of Cobbler working for testing purposes, you could temporarily move the win7.json file out the systems directory and restart cobblerd. Profiles should work fine, though it is clear we need to pound on images some more. Thanks very much for the info! --Michael ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler I've pushed some changes into git that allow the image objects to be loaded, and also fixed a CLI problem related to image adding/editing. This should allow the basics around images to be workable. We still need to go through the image based workflow and make sure (end-to-end, through koan) everything is happy, though this should fix
Re: How do you modify cobbler to send two email messages?
Why not just create an email alias and put the two smtp addresses to the alias? -Chris On Tue, Sep 22, 2009 at 1:41 PM, Paul Company pjcs...@gmail.com wrote: I'm trying to modify cobbler so it sends out two emails after a successful install. Here's what I did to try to accomplish this - but it didn't work. I get the first (default) email, but I don't get the second email. Any ideas. # vi /etc/cobbler/reporting/build_my_report_email.template From: $from_addr To: pcomp...@mydomain.com Subject: Installed bar.baz.mydomain.com USER=($user) NEWHOST=[$system_name] :wq! # vi /usr/lib/python2.4/site-packages/cobbler/modules/install_post_report.py ## I added the following to the bottom of this file, before the return 0 input_template = open(/etc/cobbler/reporting/build_my_report_email.template) input_data = input_template.read() input_template.close() message = templar.Templar().render(input_data, None, None) server_handle = smtplib.SMTP(smtp_server) server_handle.sendmail(from_addr, pcomp...@mydomain.com, message) server_handle.quit() :wq! ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
/etc/dhcpd.conf - /etc/dhcp.conf on upgrading cobbler 1.6.x to 2.0
Hi, sorry if this has been discussed, but havent seen something related here on @users: upgrading 1.6 to 2.0 i used the new /etc/cobbler/settings file, just customized 5 things over the default contents. Apparently dhcpd_conf is no longer in the settings-file and dhcpd.conf is templated to /etc/dhcp.conf . dhcpd of rhel5 still expects dhcpd.conf, using a symlink now. Using a different config-file in /etc/sysconfig/dhcpd is also possible. Was that by intention, is something broken with the setup here? Seen it on the first 2 of a dozen cobbler-slaves we plan to migrate to 2.0. 2.0 feels really faster in some places, our existing snippets for rhel and sles do not seem broken, thanks for the release :) Christian ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: 2.0 prevents kopts from being removed
Cool -- I tested out your patch here and it looks good. Lets get this pushed to mainline if possible. -Chris On Fri, Sep 25, 2009 at 3:53 PM, Bill Peck bp...@redhat.com wrote: Michael DeHaan wrote: On 09/22/2009 10:26 AM, Christopher Johnston wrote: Behavior on 1.6.x allows you to zero out any params as part of a kopt. I noticed in 2.0 I can append more entries but cant remove the existing ones or remove all of them. Also is kopts-post even valid anymore? I don't see it printed when looking at a system report, but I see it in the json file. If the usual CLI sequence that I am used to is different now please feel free to chime in. # cobbler system edit --name=host --kopts=debug=1 # cobbler system report host | grep options kernel options: {'debug': '1'} kernel options post : {} # cobbler system edit --name=host --kopts= # cobbler system report host | grep options kernel options: {} kernel options post : {} 2.0 behavior: # cobbler system report --name=host | grep Kernel Kernel Options : {'igb.LLISize': '128', 'igb.LLIPush': '1', 'mtos_nic': '1', 'pinirq': '1'} # cobbler system edit --name=host --kopts='' # cobbler system report --name=host | grep Kernel Kernel Options : {'igb.LLISize': '128', 'igb.LLIPush': '1', 'mtos_nic': '1', 'pinirq': '1'} ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler Indeed, it seems to be doing --in-place by default in the CLI.Can you see that there is a Trac item open on this? --Michael I believe I have fixed this in my git repo. http://fedorapeople.org/gitweb?p=bpeck/public_git/cobbler.git;a=blobdiff;f=cobbler/remote.py;h=c803dbb4886041a0b27bfefecf4b2993f341835b;hp=6688bd3404ca84d97ed5adefc7c28bdae2bb5878;hb=f693fe08b587a3617506ae380f58471e9ad1ca57;hpb=6150cc70b9b0381ed1344495bf1bb4d144f9932a ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: /etc/dhcpd.conf - /etc/dhcp.conf on upgrading cobbler 1.6.x to 2.0
On 09/28/2009 09:21 AM, Christian Horn wrote: Hi, sorry if this has been discussed, but havent seen something related here on @users: upgrading 1.6 to 2.0 i used the new /etc/cobbler/settings file, just customized 5 things over the default contents. Apparently dhcpd_conf is no longer in the settings-file and dhcpd.conf is templated to /etc/dhcp.conf . dhcpd of rhel5 still expects dhcpd.conf, using a symlink now. Using a different config-file in /etc/sysconfig/dhcpd is also possible. Was that by intention, is something broken with the setup here? Seen it on the first 2 of a dozen cobbler-slaves we plan to migrate to 2.0. 2.0 feels really faster in some places, our existing snippets for rhel and sles do not seem broken, thanks for the release :) Christian ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler Posted on the list many many times, we're aware of this one :) ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: Reminder: Is your bug listed in Trac?
On 09/28/2009 10:44 AM, Michael DeHaan wrote: Hi folks, Thanks for sticking with us last week.I'll be fixing lots of Cobbler 2.0 bugs this week with the intent on getting a 2.0.1 release together for testing, and, if all goes as planned, pushing to the stable repos. If you have mentioned a bug, and it's not in Trac, you need to make sure it is there so we make sure the item in question is fixed, or at least, read -- some minor bugs will likely get fixed in a later release, but we'll hit the big ones for 2.0.1. Right now it looks like some things mentioned are not in Trac -- I'll try to make sure all major items are dealt with, but having a bug open is the best way to go to make sure we don't lose track [sic] of the item. To get a Trac account visit: https://admin.fedoraproject.org/accounts Then visit http://fedorahosted.org/cobbler (if your ticket isn't in the list of tickets, click login, then click new ticket) Thanks! --Michael ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler One more tip -- when you get an account, that's all you need. You don't need to get access to the cobbler group to be able to use Trac. This is something that is currently a little confusing in the Fedora Account System. Those groups are only needed for commit access. So, if you requested and get denied a request to join cobbler, it is not personal! In fact, you can still contribute patches just fine without needing commit access. See the Developer Docs section of the Wiki for easy instructions. --Michael ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: /etc/dhcpd.conf - /etc/dhcp.conf on upgrading cobbler 1.6.x to 2.0
On Mon, Sep 28, 2009 at 10:40:07AM -0400, Michael DeHaan wrote: On 09/28/2009 09:21 AM, Christian Horn wrote: Apparently dhcpd_conf is no longer in the settings-file and dhcpd.conf is templated to /etc/dhcp.conf . Posted on the list many many times, we're aware of this one :) Urgs, sorry. for i in $(seq 1 30); do echo 'will use cobbler-trac-search besides $searchengine in future'; done Christian ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
cobbler 2.0 workaround for SELinux and misc issues
Hi, to share my testing experience with cobbler2.0 (thanks for it!) hoping it can hepls others. My context: - having one cobbler server1 being migrated from 1.6.x to 2.0. - having one cobbler server2 directly installed in 2.0 Both servers configured with ldap authentication in /etc/cobbler/[settings, modules.conf] authorization is also on in modules.conf [module = authz_ownership] Both servers are running with SELinux in enforcing mode. The cobbler 2.0 SW was built from the source in each case. I noticed the following: - on server2 set up from scratch cobbler import was complaining that the issued rsync command was failing I had to disable selinux for rsync to make cobbler import working with the following command. root# setsebool -P rsync_disable_trans=1 may be a better way exist ? or something to be notified by the cobbler check command ? Note this is not an issue is selinux is _not_ in enforcing mode. - on server1 (migrated from 1.6.x) and after migration: - Had to removed the omapi section from the /etc/cobbler/dhcp.template file a task for cobbler check ? (not sure but that helps dumb guy like myself not reading the docs... :-( ) - Some text comments attached with the systems had accents/diacritics char. I had to removed them (from jason files) to avoid a python stack trace in the new WEB interface (1.6.x was not having issue there - may be due to the move to django) - In the new WEB interface, I got python stack trace when trying to sort the Systems view on a per profile basis The pb was with the /usr/share/cobbler/session/sessionid. file the following solved the issue: root# chcon -t httpd_sys_content_t /usr/share/cobbler/web/sessions and to be sure it will be persistent: root # /usr/sbin/semanage fcontext -a -t httpd_sys_content_t /usr/share/cobbler/web(/.*)? may be something that can be addressed at installation time ? Note this is not an issue is selinux is _not_ in enforcing mode. - The owners field is not displayed anymore in the web interface. That was very usefull to figure out who to contact. Any easy way to make it visible again ? Apart the small annoyance sabove, cobbler2.0 on server1 (the migrated one) works very well and I continue testing and experimenting with it. thanks, Phil. ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: cobbler 2.0 workaround for SELinux and misc issues
I noticed the following: - on server2 set up from scratch cobbler import was complaining that the issued rsync command was failing I had to disable selinux for rsync to make cobbler import working with the following command. root# setsebool -P rsync_disable_trans=1 What OS were you running from? (General note -- Cobbler+SELinux is not supported on RHEL 4 (it is too primitive to share content between Apache and TFTP) but RHEL 5 and on it is) This may be a rule we want to indicate in cobbler check alongside the httpd_can_network_connect item it already reports about today. Let's make sure there's a Trac open on this one. - on server1 (migrated from 1.6.x) and after migration: - Had to removed the omapi section from the /etc/cobbler/dhcp.template file a task for cobbler check ? (not sure but that helps dumb guy like myself not reading the docs... :-( ) OMAPI is no longer supported in 2.0, so I am not sure what the problem is or why you would have to remove it. Can you explain further what the problem was? - Some text comments attached with the systems had accents/diacritics char. I had to removed them (from jason files) to avoid a python stack trace in the new WEB interface (1.6.x was not having issue there - may be due to the move to django) Hmm, interesting.Please make sure there is a Trac item for this one. See my earlier note about how to get an account and file a bug. - In the new WEB interface, I got python stack trace when trying to sort the Systems view on a per profile basis The pb was with the /usr/share/cobbler/session/sessionid. file the following solved the issue: root# chcon -t httpd_sys_content_t /usr/share/cobbler/web/sessions and to be sure it will be persistent: root # /usr/sbin/semanage fcontext -a -t httpd_sys_content_t /usr/share/cobbler/web(/.*)? Ah, nice find.It is true we haven't done much SELinux testing with cobbler_web.This should be added to the rules that cobbler check reports that the user should set. Let's make sure we have a record of this bug in Trac. - The owners field is not displayed anymore in the web interface. That was very usefull to figure out who to contact. Any easy way to make it visible again ? I've just fixed that, it appears we had two objects that had this still marked as a hidden field. Thanks! (no need for a Trac item on this one). Apart the small annoyance sabove, cobbler2.0 on server1 (the migrated one) works very well and I continue testing and experimenting with it. Much appreciated! Again, if you can make sure the two bugs noted above have Trac items we'll make sure they are fixed. Thanks! --Michael ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: How do you modify cobbler to send two email messages?
I want to different messages sent to two different addresses. On Mon, Sep 28, 2009 at 6:15 AM, Christopher Johnston cjohnstonw...@gmail.com wrote: Why not just create an email alias and put the two smtp addresses to the alias? -Chris On Tue, Sep 22, 2009 at 1:41 PM, Paul Company pjcs...@gmail.com wrote: I'm trying to modify cobbler so it sends out two emails after a successful install. Here's what I did to try to accomplish this - but it didn't work. I get the first (default) email, but I don't get the second email. Any ideas. # vi /etc/cobbler/reporting/build_my_report_email.template From: $from_addr To: pcomp...@mydomain.com Subject: Installed bar.baz.mydomain.com USER=($user) NEWHOST=[$system_name] :wq! # vi /usr/lib/python2.4/site-packages/cobbler/modules/install_post_report.py ## I added the following to the bottom of this file, before the return 0 input_template = open(/etc/cobbler/reporting/build_my_report_email.template) input_data = input_template.read() input_template.close() message = templar.Templar().render(input_data, None, None) server_handle = smtplib.SMTP(smtp_server) server_handle.sendmail(from_addr, pcomp...@mydomain.com, message) server_handle.quit() :wq! ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: cobbler repo rename
cobbler-1.6.6-1.fc10.i386 I just did the same thing. I haven't run reposync again yet because even if I restrict it to just the repository in question (using the old name or the new one?) that could be an expensive command if it does have to download the entire repository in question from scratch. Neither the old name nor the new one are present in /var/www/cobbler/ after the repo rename, but the rest of my repositories are. If the data wasn't deleted, where could I look to verify it still exists? Bryan Schneiders bschneid...@woti.com 301-562-1900 ext 305 Michael DeHaan wrote: Baptiste AGASSE wrote: Hi all, Today i have rename a repo in cobbler. The rename works but all data of this repository has been deleted. Is it a normal behavior of cobbler repo rename --name=myoldname --newname=mynewname ? Thanks for your answers. Baptiste. ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler We probably should tweak cobbler to make it try to rename directories in /var/www/cobbler/repo_mirror when doing repo renames. Your data wasn't deleted, it's just not where it should be. Running reposync again would fix it, as would cp'ing the data. File a bug in Trac if you don't mind. Thanks! ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Re: cobbler repo rename
On 09/28/2009 02:12 PM, Bryan Schneiders wrote: cobbler-1.6.6-1.fc10.i386 I just did the same thing. I haven't run reposync again yet because even if I restrict it to just the repository in question (using the old name or the new one?) that could be an expensive command if it does have to download the entire repository in question from scratch. Neither the old name nor the new one are present in /var/www/cobbler/ after the repo rename, but the rest of my repositories are. If the data wasn't deleted, where could I look to verify it still exists? I think you mean '/var/www/cobbler/repo_mirror/', right? I'm sure you do. That sounds like a bug. Anyway, run cobbler reposync and things should be good to go, in case. Though, true, we don't users to have to do that. Anyway, all new development is being done against 2.0, so if you can test to see whether 2.0 removes your repo (or does not rename it), that would be helpful. One idea might be to keep an internal field for the repo names and not have them named after the repo... and the same for the imports. We already do this for imports today (distro imports, not repos... which work differently) by storing the address of the tree in the distro. If we did the same for repos, we could keep the names auto-generated and it wouldn't be required that we rename them. --Michael ___ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler