Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default createrepo flags break productid on import of RHEL 6.4 distro. #647

Closed
mstargard opened this issue Nov 14, 2013 · 3 comments
Closed

Comments

@mstargard
Copy link

This probably applies to other versions of RHEL. The default createrepo flags in cobbler 2.4.0 as they appear in /etc/cobbler/settings are "-c cache -s sha".

When you import the distribution, createrepo runs and recreates repomd.xml, which removes this element from the original:

<data type="productid"><location href="repodata/productid.gz"/><checksum type="sha">c0150e34800edcef42a43d0d0f051b3b3a421b34</checksum><timestamp>135957
7376</timestamp><open-checksum type="sha">5dfbaa2ef24689b4141ae655d3f352be62a128d7</open-checksum></data>

When the OS installs on the client, it checks the checksum from this element to the checksum of the productid.gz file. If they don't match then the installer cannot identify the OS, which results in the /etc/pki/product/69.pem not being created. 69.pem is just the productid file from the repo. This file is needed to successfully subscribe to the software channel at RHN.

# sha1sum productid.gz
c0150e34800edcef42a43d0d0f051b3b3a421b34  productid.gz

The symptom that this has happened is that if you attempt to subscribe via subscription-manager, then you get "no installed products" type error messages. You can fix the client by manually copying the productid file to /etc/pki/product/69.pem.

To workaround this issue, I have set the following in /etc/cobbler/settings:

createrepo_flags: "-c cache -s sha --update -C"

before importing the distribution. Now createrepo won't update the perfectly good metadata from the DVD, leaving repomd.xml intact.

@opoplawski
Copy link
Contributor

I just spent a few days tracking this down. My question - is it necessary to run createrepo at all?

@mark987
Copy link
Contributor

mark987 commented Jan 26, 2014

I have a pull request addressing this - createrepo is needed only for the non-yum based RHEL releases (5.x and earlier, not 6.x or 7), nor for Fedora, and as noticed above does not even recreate what redhat put onto the installer so is destructive.

@jmaas
Copy link
Member

jmaas commented Jan 27, 2014

Merged, closing issue.

@jmaas jmaas closed this as completed Jan 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants