Experiences with Cobbler deploying Ubuntu Precise (12.04 LTS)
It’s been a long time since I’ve worked with Cobbler in any serious capacity. While I encouraged the original Debian/Ubuntu support to happen, I never really used it for anything but Fedora, CentOS, and RHEL. So, when the very first thing I had to do for my new job was to fight some preseeds and set up a new Cobbler server, here’s a few things I encountered. This may be helpful to others doing the same.
apt-get install cobbler on Ubuntu Precise (12.04 LTS) installs Cobbler 2.2, not 2.4, out of the box. This is mostly ok, though at minimum the “reboot” power management command is broken in this release. I’m not really sure what else in 2.4 I wanted, but suspect LTS won’t update it.
As a nice surprise, the /etc/cobbler/settings file is generated by the package rather than packaged in a default state. As a result, the initial ‘cobbler check’ command only reported one thing I needed to change, which to me was extremely well done, as a typical Red Hat install will not try to do things like fill in your hostname. I still recommend reading /etc/cobbler/settings after installing to make sure it has what you want in it though.
Some initial confusion out of the gate — Ubuntu mislabels the /etc/cobbler template files for the preseed menu to be “Ubuntu Maas” even when MAAS is not installed. This is easy to fix by editing the template, but strikes me as an undesirable misappropriation of the project similar to the way I felt about Ubuntu Orchestra mostly being Cobbler-web. I don’t like folks taking credit from the community for software they didn’t write.
cobbler import works mostly as advertised on the Ubuntu 12.04 LTS DVD ISO. That was great. Glad to see that going after many many years of seeing people ask questions about why that didn’t work as well as the Red Hat ones! Awesome.
Of course, cobbler just drives PXE, and you still have kickstart/preseed/autoyast to deal with. Preseeds are nicer than AutoYAST (not XML), but WAY more painful than Anaconda kickstarts, due to needs of stringing together late commands and needing to be overly verbose about the answers to lots of questions. Here’s a link to one work is using.
On top of that, Precise 12.04 LTS exhibits a bug where the network interface set in the preseed is ignored and can only be set by kernel arguments. Seems like it should have an option to just use the boot interface like Anaconda does.
"cobbler system edit —name=foo —kopts="netcfg/choose_interface=eth1" fixes the problem
Finally, the installer doesn’t handle old LVM data well at all, requireing the following hack in the preseed that is, as far as I can tell, completely impossible for standard users to do manually without launching into the shell.
The fix is just:
d-i partman/early_command string vgs —separator=: —noheadings | cut -f1 -d: | while read vg ; do vgchange -an $vg ; done ; pvs —separator=: —noheadings | cut -f1 -d: | while read pv ; do pvremove -ff -y $pv ; done
The sad part is, it has to be all on one line.
Very minor — I noticed the logrotate file for cobbler was also not packaged, so I picked up the one from upstream so logs wouldn’t grow unbounded. Still, it seemed like packaging was kind of quick and dirty in that regard and people didn’t really use it in production, or didn’t care about really huge log files. I’ll admit the logging in Cobbler is not very good anyway, and in 2.0, it is pretty noisy and needs controls — even so, more need for logrotate.
Another minor packaging error was that cobbler-register wasn’t packaged, but some random NIH “cobbler-enlist” tool was instead, which was inexplicably a C program. I am guessing this was used for MAAS at one point, but it seems misnamed, and I think all binaries packaged by the upstream package should be there. Koan also didn’t seem to be available, but I didn’t need it — guests are going to be installed via openstack and I don’t need —replace-self because I have actual power management hardware. I filed a bug about this as well as the above issues.
I’ll note that the Cobbler 2.2 default Ubuntu preseed was pretty bad and didn’t result in an automated install — this is an upstream thing, not a packaging thing. I have higher hopes for the one packaged with 2.4, and am hoping pxe_just_once and all that just works — it would be much cooler if all the network templating stuff did as well — but if not, that’s ok. Work has patched up our preseed pretty well to make things run all of the triggers and so forth.
In all, I think things worked pretty well and most problems lie with the Ubuntu installer — and Cobbler is able to manage pretty well, and the packaging for Ubuntu vs EPEL/Fedora rates a solid B. App worked pretty darn well, really.
In all, I’m glad to see Cobbler in such a great state so many years later. I don’t quite agree with the additions of the “config management” features in Cobbler (they are pretty basic and you will have to replace them pretty quick, plus don’t have good ways to manage them), but all in all, I’d still pick Cobbler again for a new project, no question…. and I’m happy to see Cobbler+Debian has gotten a lot easier to install. Cross platform is important and a huge factor in doubling the size of your community.
Now if only Ubuntu and Debian would just switch completely over to Anaconda + kickstart, things would be much easier!