Description of problem: cobbler can't create pxelinux.cfg/default due missing pxelinux.0 file Could not find files matching /usr/share/syslinux/pxelinux.0 Version-Release number of selected component (if applicable): How reproducible: on s390(x) Steps to Reproduce: 1. install on s390(x) satellite 2. create kickstart profile 3. list cobbler profiles and one of them add as default - 'cobbler system add --name=default --profile=PROFILE_NAME' 4. run 'cobbler sync' Actual results: 'cobbler sync' fails, because required files are available only on i386, x86_64 platforms, where syslinux if shipped Expected results: 'cobbler sync' will pass without errors Additional info:
PXE is not supported on s390(x) due to the fact that we do not have this file within syslinux. Cliff
So maybe just add this to the docs?
*** Bug 505186 has been marked as a duplicate of this bug. ***
*** Bug 523432 has been marked as a duplicate of this bug. ***
Created attachment 441145 [details] Patch to cobbler: Don't require pxelinux.0 or memdisk for architectures that don't support syslinux
Applied a modified version of brad's patch to cobbler. Will submit upstream once QA is able to test this bug. cobbler-2.0.3.1-9
taking QE contact for verification
test procedure up to Comment 1 and command "cobbler sync" works well in sat540 on s390x. There is no checking of pxelinux.0 there.
#VERIFIED against stage signed Satellite iso: satellite-5.4.0-20101019-rhel-5-s390x.iso Procedure output: mount nfs.englab.brq.redhat.com:/pub/fedora/linux/releases/13/Fedora/x86_64/os/ /tmp/fedora13-x86_64/ then prepare custom channel and make ks distribution and then profile based on this mounted ks tree. After run the commands below: --- [root@ibm-z10-10 ~]# cobbler system add --name=default --profile=ks-profile-fedora13-x86_64:1:RedHat [root@ibm-z10-10 ~]# echo $? 0 [root@ibm-z10-10 ~]# rpm -q cobbler cobbler-2.0.7-2.el5sat ---
# REOPEN Err, sorry forget to run cobbler sync: it actually fails with: --- cobbler sync task started: 2010-10-22_084125_sync task started (id=Sync, time=Fri Oct 22 08:41:25 2010) running pre-sync triggers cleaning trees removing: /var/www/cobbler/pub removing: /var/www/cobbler/images/ks-distrib-fedora13-x86_64:1:RedHat removing: /tftpboot/pxelinux.cfg/default removing: /tftpboot/images/ks-distrib-fedora13-x86_64:1:RedHat removing: /tftpboot/s390x/profile_list copying bootloaders Exception occured: cobbler.cexceptions.CX Exception value: 'Could not find files matching /usr/lib/syslinux/pxelinux.0' Exception Info: File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 95, in run rc = self._run(self) File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 184, in runner return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger) File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 610, in sync return sync.run() File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 112, in run self.pxegen.copy_bootloaders() File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 94, in copy_bootloaders utils.copyfile_pattern('/usr/lib/syslinux/pxelinux.0', dst, api=self.api, logger=self.logger) File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 1170, in copyfile_pattern raise CX(_("Could not find files matching %s") % pattern) !!! TASK FAILED !!! ---
I bet the patch was lost when we rebased cobbler ...
Taking.
Note to self: the cobbler version on 5.4.0 ISO is cobbler-2.0.7-2.el5sat.noarch.rpm.
The current code looks like this: def copy_bootloaders(self): """ Copy bootloaders to the configured tftpboot directory NOTE: we support different arch's if defined in /etc/cobbler/settings. """ dst = self.bootloc # copy syslinux from one of two locations try: try: utils.copyfile_pattern('/var/lib/cobbler/loaders/pxelinux.0', dst, api=self.api, logger=self.logger) utils.copyfile_pattern('/var/lib/cobbler/loaders/menu.c32', dst, api=self.api, logger=self.logger) except: utils.copyfile_pattern('/usr/share/syslinux/pxelinux.0', dst, api=self.api, logger=self.logger) utils.copyfile_pattern('/usr/share/syslinux/menu.c32', dst, api=self.api, logger=self.logger) except: utils.copyfile_pattern('/usr/lib/syslinux/pxelinux.0', dst, api=self.api, logger=self.logger) utils.copyfile_pattern('/usr/lib/syslinux/menu.c32', dst, api=self.api, logger=self.logger) # copy memtest only if we find it utils.copyfile_pattern('/boot/memtest*', dst, require_match=False, api=self.api, logger=self.logger) # copy elilo which we include for IA64 targets utils.copyfile_pattern('/var/lib/cobbler/loaders/elilo.efi', dst, require_match=False, api=self.api, logger=self.logger) # copy yaboot which we include for PowerPC targets utils.copyfile_pattern('/var/lib/cobbler/loaders/yaboot', dst, require_match=False, api=self.api, logger=self.logger) try: utils.copyfile_pattern('/usr/lib/syslinux/memdisk', dst, api=self.api, logger=self.logger) except: utils.copyfile_pattern('/usr/share/syslinux/memdisk', dst, require_match=False, api=self.api, logger=self.logger)
I propose the following patch: --- ./cobbler/pxegen.py.orig 2010-07-28 17:48:48.000000000 +0200 +++ ./cobbler/pxegen.py 2010-11-24 10:48:30.000000000 +0100 @@ -91,8 +91,9 @@ utils.copyfile_pattern('/usr/share/syslinux/menu.c32', dst, api=self.api, logger=self.logger) except: - utils.copyfile_pattern('/usr/lib/syslinux/pxelinux.0', dst, api=self.api, logger=self.logger) - utils.copyfile_pattern('/usr/lib/syslinux/menu.c32', dst, api=self.api, logger=self.logger) + if os.path.exists('/usr/lib/syslinux'): + utils.copyfile_pattern('/usr/lib/syslinux/pxelinux.0', dst, api=self.api, logger=self.logger) + utils.copyfile_pattern('/usr/lib/syslinux/menu.c32', dst, api=self.api, logger=self.logger) # copy memtest only if we find it utils.copyfile_pattern('/boot/memtest*', dst, require_match=False, api=self.api, logger=self.logger) I didn't want to merely require_match=False it because on i386 and x86_64 the thing should fail if the copyfile_pattern fails. So I opted for a test of /usr/lib/syslinux -- if it exists, copy from it should succeed as well. Brad, does it sound reasonable?
Sounds good to me. From the way it looks, it will still succeed if pxelinux.0/menu.c32 are not found in either /usr/share/syslinux or /usr/lib/syslinux, which is good for s390x because it won't necessarily exist.
(In reply to comment #29) > Sounds good to me. From the way it looks, it will still succeed if > pxelinux.0/menu.c32 are not found in either /usr/share/syslinux or > /usr/lib/syslinux, which is good for s390x because it won't necessarily exist. Right, that was the plan. Thank you for the review.
The patch from comment 28 is now in cobbler-2.0.7-5.el5sat.
# VERIFIED The scenario in: comment#19 works fine (+ cobbler sync afterwards). --- cobbler sync task started: 2010-12-07_072245_sync task started (id=Sync, time=Tue Dec 7 07:22:45 2010) running pre-sync triggers cleaning trees removing: /var/www/cobbler/pub copying bootloaders copying distros copying files for distro: ks-distrib-fedora13-x86_64:1:RedHat trying cachelink /tmp/fedora13-x86_64/images/pxeboot/vmlinuz -> /tftpboot/images/.link_cache/a03f18a45cda20e905b5cf06e26ae20f84bd601e -> /tftpboot/images/ks-distrib-fedora13-x86_64:1:RedHat/vmlinuz trying cachelink /tmp/fedora13-x86_64/images/pxeboot/initrd.img -> /tftpboot/images/.link_cache/f1c792bd22d9672c2311a202e56c524555568b87 -> /tftpboot/images/ks-distrib-fedora13-x86_64:1:RedHat/initrd.img trying symlink /tmp/fedora13-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/ks-distrib-fedora13-x86_64:1:RedHat/vmlinuz trying symlink /tmp/fedora13-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/ks-distrib-fedora13-x86_64:1:RedHat/initrd.img copying images generating PXE configuration files cleaning link caches running: find /tftpboot/.link_cache -maxdepth 1 -type f -links 1 -exec rm -f '{}' ';' received: running: find /var/www/cobbler/.link_cache -maxdepth 1 -type f -links 1 -exec rm -f '{}' ';' received: rendering Rsync files generating PXE menu structure running post-sync triggers running python triggers from /var/lib/cobbler/triggers/sync/post/* running python trigger cobbler.modules.sync_post_restart_services 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 *** ---
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0952.html