It appears that when using pulp (http://www.pulpproject.org/) to synchronise and manage yum repositories, pulp categorises a repository with the following in mind
- OS Major Release Number (E.g. CentOS 7)
- OS Minor Release number (e.g. CentOS 7.2)
- These are stored under the release number, e.g. 7.2.1511 (November 2015)
Most files in the repo are specific to that release (e.g. 7.2.1511) and all packages in the repo will reside in a directory structure speicifically for that release
kernel, initrd and squashed rootfs
A special case / exception seems to be these three files. For some reason, Pulp seems to link these versions to the OS Major Release number. Given that I'm using a combination of Cobbler and Pulp, this creates a problem when PXE booting, as I use the kernel and initrd from Cobbler then the squashed rootfs from pulp (as directed in a kickstart):
- PXE boot via Cobbler (version 2.6.7-1) on CentOS 7.1
- initrd loaded via TFTP (managed by Cobbler)
- kernel loaded via TFTP (managed by Cobbler)
- Kickstart loaded via HTTP (generated by Cobbler)
- URL for installation points to a Pulp repo
- squashed rootfs served from pulp
The CentOS 7 vmlinuz (kernel) files on the pulp server are as below:
[root pulp-server ~]# find /var/lib/pulp -name vmlinuz -ls 139105341 0 lrwxrwxrwx 1 apache apache 77 Aug 12 09:29 /var/lib/pulp/published/yum/master/yum_distributor/centos7.1_os/1439335752.46/images/pxeboot/vmlinuz -> /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/images/pxeboot/vmlinuz 269922911 0 lrwxrwxrwx 1 apache apache 77 Aug 10 13:35 /var/lib/pulp/published/yum/master/yum_distributor/centos7.0_os/1439177642.07/images/pxeboot/vmlinuz -> /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/images/pxeboot/vmlinuz 1073746446 0 lrwxrwxrwx 1 apache apache 77 Jan 4 22:01 /var/lib/pulp/published/yum/master/yum_distributor/centos7.2_os/1451904964.13/images/pxeboot/vmlinuz -> /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/images/pxeboot/vmlinuz 811174016 4912 -rwxr-xr-x 1 apache apache 5029136 Jan 5 08:52 /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/images/pxeboot/vmlinuz
Likewise the CentOS 7 squashed rootfs files are as below:
[root pulp-server ~]# find /var/lib/pulp -name squashfs.img -ls 270143315 0 lrwxrwxrwx 1 apache apache 74 Aug 12 09:29 /var/lib/pulp/published/yum/master/yum_distributor/centos7.1_os/1439335752.46/LiveOS/squashfs.img -> /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/LiveOS/squashfs.img 404071217 0 lrwxrwxrwx 1 apache apache 74 Aug 10 13:35 /var/lib/pulp/published/yum/master/yum_distributor/centos7.0_os/1439177642.07/LiveOS/squashfs.img -> /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/LiveOS/squashfs.img 1280938 0 lrwxrwxrwx 1 apache apache 74 Jan 4 22:01 /var/lib/pulp/published/yum/master/yum_distributor/centos7.2_os/1451904964.13/LiveOS/squashfs.img -> /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/LiveOS/squashfs.img 939607697 390556 -rw-r--r-- 1 apache apache 399929344 Jan 7 08:14 /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64/LiveOS/squashfs.img
This appears to be related to kickstart trees tied to a single distribution. Pulp doesn't seem to have the ability to split this manually (or it is an undocumented feature).
[root pulp-server~]# pulp-admin rpm repo content distribution --repo-id=centos7.1_os Id: ks-CentOS--7-x86_64 Family: CentOS Architecture: x86_64 Variant: Storage Path: /var/lib/pulp/content/distribution/ks-CentOS--7-x86_64 Files: Filename: initrd.img Relative Path: images/pxeboot/initrd.img Size: None Checksum Type: sha256 Checksum: ad1f8fc2bebe9ec1eb5c36d4c38177e39fe8423602098d60c29804081f81b8 bd Filename: vmlinuz Relative Path: images/pxeboot/vmlinuz Size: None Checksum Type: sha256 Checksum: ee2df000e29c79ae96db95f61766a8c5adc527d8c92c4114badedf251f73b2 0e ...(output truncated)
So far I haven't been able to find a way of reconfiguring this in Pulp without breaking the symlinks.
It does however work OK if I destroy the symbolic links and replace them with the correct files. Not desirable (as this requires manual intervention for each repo sync'd from here).