[cobbler] How to debug...

Michael Tiernan mtiernan at MIT.EDU
Fri Aug 8 14:09:13 UTC 2014


So, my adventure has yielded some interesting results.

I've been putting debug instrumenting/tracing statements into the code
as I go along and I've found out that indeed the code in pxegen is the
jumping off point for this issue. (N.B. I use my initials MCT to mark my
debugs and the first thing I do is put a marker into each
procedure/subroutine/method/function I go through.)

I tracked it down to the point where I figured out that the output I'm
expecting should be coming from:
  pxegen.write_all_system_files(system, menu_items)

So I tracked this down and found that it is in the tftpd module named
manage_in_tftpd.py but not in the alternative one manage_tftpd_py.py

So, I tried using both.

First test I ran as I've been configured previously, using the tftpd.py
server:

task started: 2014-08-08_094804_sync
task started (id=Sync, time=Fri Aug  8 09:48:04 2014)
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/scilinall-x86_64
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-03
removing: /var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-91
removing: /var/lib/tftpboot/grub/01-F4-6D-04-37-26-91
removing: /var/lib/tftpboot/grub/grub-x86.efi
removing: /var/lib/tftpboot/grub/grub-x86_64.efi
removing: /var/lib/tftpboot/grub/efidefault
removing: /var/lib/tftpboot/grub/01-F4-6D-04-37-26-03
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/images/scilinall-x86_64
removing: /var/lib/tftpboot/images/memtest
copying bootloaders
copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
copying: /boot/memtest -> /var/lib/tftpboot/images/memtest
copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
copying: /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
copying: /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying files for distro: scilinall-x86_64
MCT Not remote kernel.
trying hardlink /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/scilinall-x86_64/vmlinuz
MCT Not remote initrd.
trying hardlink /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/scilinall-x86_64/initrd.img
Writing template files for scilinall-x86_64
MCT make_actual_pxe_menu.
MCT get_menu_items.
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
cleaning link caches
running: find /var/lib/tftpboot/images/.link_cache -maxdepth 1 -type f -links 1 -exec rm -f '{}' ';'
received on stdout:
received on stderr:
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout:
received on stderr:
running: service dhcpd restart
received on stdout: Shutting down dhcpd: [  OK  ]
Starting dhcpd: [  OK  ]

received on stderr:
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

And when I looked into the tftp directory I got:

# find /var/lib/tftpboot/ -type f
/var/lib/tftpboot/pxelinux.cfg/default
/var/lib/tftpboot/pxelinux.0
/var/lib/tftpboot/grub/grub-x86.efi
/var/lib/tftpboot/grub/grub-x86_64.efi
/var/lib/tftpboot/grub/efidefault
/var/lib/tftpboot/boot/grub/menu.lst
/var/lib/tftpboot/yaboot
/var/lib/tftpboot/memdisk
/var/lib/tftpboot/menu.c32
/var/lib/tftpboot/images/memtest

As we know, this is what I've been complaining about, no system specific
PXE files. So, now I switch tftp modules and use "in_tftpd" in the
modules.conf file and do the exact same test:

task started: 2014-08-08_100040_sync
task started (id=Sync, time=Fri Aug  8 10:00:40 2014)
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/scilinall-x86_64
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/grub-x86.efi
removing: /var/lib/tftpboot/grub/grub-x86_64.efi
removing: /var/lib/tftpboot/grub/efidefault
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/images/memtest
copying bootloaders
copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
copying: /boot/memtest -> /var/lib/tftpboot/images/memtest
copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
copying: /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
copying: /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying distros to tftpboot
copying files for distro: scilinall-x86_64
MCT Not remote kernel.
running: /usr/bin/sha1sum /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/vmlinuz
received on stdout: d790f5599e0a7a30183961bab3265e7441f40748  /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/vmlinuz

received on stderr:
trying to create cache file /var/lib/tftpboot/images/.link_cache/d790f5599e0a7a30183961bab3265e7441f40748
copying: /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/d790f5599e0a7a30183961bab3265e7441f40748
trying cachelink /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/d790f5599e0a7a30183961bab3265e7441f40748 -> /var/lib/tftpboot/images/scilinall-x86_64/vmlinuz
MCT Not remote initrd.
running: /usr/bin/sha1sum /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/initrd.img
received on stdout: e96255d62197a0390278ecf82046d13764f2e6f8  /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/initrd.img

received on stderr:
trying to create cache file /var/lib/tftpboot/images/.link_cache/e96255d62197a0390278ecf82046d13764f2e6f8
copying: /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/e96255d62197a0390278ecf82046d13764f2e6f8
trying cachelink /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/e96255d62197a0390278ecf82046d13764f2e6f8 -> /var/lib/tftpboot/images/scilinall-x86_64/initrd.img
copying images
generating PXE configuration files
MCT get_menu_items.
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
MCT write_all_system_files. system=hprcf102
MCT write_all_system_files. Checking is management supported.
MCT write_pxe_file.
MCT write_pxe_file. filename=/var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-91; system=<cobbler.item_system.System object at 0x1a65350>; profile.name=T2_Worker; distro.name=scilinall-x86_64
generating: /var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-91
MCT write_pxe_file.
MCT write_pxe_file. filename=/var/lib/tftpboot/grub/01-F4-6D-04-37-26-91; system=<cobbler.item_system.System object at 0x1a65350>; profile.name=T2_Worker; distro.name=scilinall-x86_64
generating: /var/lib/tftpboot/grub/01-F4-6D-04-37-26-91
MCT write_all_system_files. Checking is management supported.
MCT write_pxe_file.
MCT write_pxe_file. filename=/var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-03; system=<cobbler.item_system.System object at 0x1a65350>; profile.name=T2_Worker; distro.name=scilinall-x86_64
generating: /var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-03
MCT write_pxe_file.
MCT write_pxe_file. filename=/var/lib/tftpboot/grub/01-F4-6D-04-37-26-03; system=<cobbler.item_system.System object at 0x1a65350>; profile.name=T2_Worker; distro.name=scilinall-x86_64
generating: /var/lib/tftpboot/grub/01-F4-6D-04-37-26-03
generating PXE menu structure
MCT make_actual_pxe_menu.
MCT get_menu_items.
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
copying files for distro: scilinall-x86_64
MCT Not remote kernel.
trying hardlink /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/scilinall-x86_64/vmlinuz
MCT Not remote initrd.
trying hardlink /var/www/cobbler/ks_mirror/scilinall-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/scilinall-x86_64/initrd.img
Writing template files for scilinall-x86_64
MCT make_actual_pxe_menu.
MCT get_menu_items.
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Server; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=T2_Worker; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
MCT write_pxe_file.
MCT write_pxe_file. filename=None; system=None; profile.name=scilinall-x86_64; distro.name=scilinall-x86_64
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
processing boot_files for distro: scilinall-x86_64
cleaning link caches
running: find /var/lib/tftpboot/images/.link_cache -maxdepth 1 -type f -links 1 -exec rm -f '{}' ';'
received on stdout:
received on stderr:
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout:
received on stderr:
running: service dhcpd restart
received on stdout: Shutting down dhcpd: [  OK  ]
Starting dhcpd: [  OK  ]

received on stderr:
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

A look into the tftp directory nets me this:

# find /var/lib/tftpboot/ -type f
/var/lib/tftpboot/pxelinux.cfg/default
/var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-03
/var/lib/tftpboot/pxelinux.cfg/01-f4-6d-04-37-26-91
/var/lib/tftpboot/pxelinux.0
/var/lib/tftpboot/grub/01-F4-6D-04-37-26-91
/var/lib/tftpboot/grub/grub-x86.efi
/var/lib/tftpboot/grub/grub-x86_64.efi
/var/lib/tftpboot/grub/efidefault
/var/lib/tftpboot/grub/01-F4-6D-04-37-26-03
/var/lib/tftpboot/boot/grub/menu.lst
/var/lib/tftpboot/yaboot
/var/lib/tftpboot/memdisk
/var/lib/tftpboot/menu.c32
/var/lib/tftpboot/images/.link_cache/e96255d62197a0390278ecf82046d13764f2e6f8
/var/lib/tftpboot/images/.link_cache/d790f5599e0a7a30183961bab3265e7441f40748
/var/lib/tftpboot/images/scilinall-x86_64/vmlinuz
/var/lib/tftpboot/images/scilinall-x86_64/initrd.img
/var/lib/tftpboot/images/memtest

Which is what I've been expecting all along.

The reason I'd not seen this /before/ now is that I had been hardwiring
the tftpd template in /etc/cobbler to use the tftpd.py file but the
modules.conf file still said I was using in_tftpd.

So, *I'VE FOUND IT!!!!!!!*

The reparing of this is currently beyond my depth so I'm going to use
this message to open a ticket and then, run and hide. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/cobbler/attachments/20140808/487fec76/attachment-0001.html>


More information about the cobbler mailing list