Bug 2308671
Summary: | crb enable fails with 'subscription-manager: error: no such option' | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Miguel Martin <mmartinv> |
Component: | epel-release | Assignee: | Troy Dawson <tdawson> |
Status: | MODIFIED --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | epel9 | CC: | carl, kevin, maxwell, smooge, tdawson |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Miguel Martin
2024-08-30 11:28:37 UTC
You are correct, but I have no rhui machines to test on. What do you get when you do dnf repolist --all | grep -i -e crb -e powertools -e codeready codeready-builder-for-rhel-9-x86_64-debug-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-eus-debug-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-eus-rhui-debug-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-eus-rhui-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-eus-rhui-source-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-eus-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-eus-source-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-rhui-debug-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-rhui-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-rhui-source-rpms Red Hat C disabled codeready-builder-for-rhel-9-x86_64-rpms Red Hat C enabled codeready-builder-for-rhel-9-x86_64-source-rpms Red Hat C disabled I think you just need to add -e rhui to all the ocurrences of 'grep -v -i -e debug -e source -e eus -e virt' (In reply to Miguel Martin from comment #3) > I think you just need to add -e rhui to all the ocurrences of 'grep -v -i -e > debug -e source -e eus -e virt' Yep Simple enough fix. I'm not sure why this wasn't automatically updated, but here are the builds. epel9: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-5e6d90ccde epel8: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-6e5a4ffb91 On a RHUI connected system, shouldn't the preference be for codeready-builder-for-rhel-9-x86_64-rhui-rpms, not codeready-builder-for-rhel-9-x86_64-rpms? I think you would only have the later on a RHUI system if there was a regular subscription on that system as well, which seems like a mistake. The script is going to need a bit better logic than just always excluding repos with "rhui" in the repo ID. You have a good point. Although excluding rhui still get's you crb enabled, it doesn't give you an efficient repo (one that is close to you.) The error was happening because we have more than one item coming from our logic. What if we fix that, and make it so the rhui line would be the prefered line. We currently have crb_repo=$(dnf repolist | grep -i -e crb -e powertools -e codeready | grep -v -i -e debug -e source -e eus -e virt -e rhui | awk '{print $1}') But if we switch it to this, it should give us what we want. crb_repo=$(dnf repolist | grep -i -e crb -e powertools -e codeready | grep -v -i -e debug -e source -e eus -e virt | awk '{print $1}' | head -n1) "dnf repolist" gives the repo's sorted in an alphabetical order. Thus 'codeready-builder-for-rhel-9-x86_64-rhui-rpms' will always be before 'codeready-builder-for-rhel-9-x86_64-rpms' and "head -n1" will give us the repo that we want. If that sounds good, I'll get a pull request written up. I am slightly worried long term about relying on an alphabetical sort because that seems fragile (for instance, if the id of the RHUI repos changes), but it would work for now until we get around to implementing more advanced logic. Let's do it. Drop a link to the PR here once you have it worked up and I'll try to review. |