Skip to content

NO-JIRA: ci/get-ocp-repo.sh: add --enablerepo when installing centos packages#1762

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
Prashanth684:okd-scos-extensions-fix
Mar 7, 2025
Merged

NO-JIRA: ci/get-ocp-repo.sh: add --enablerepo when installing centos packages#1762
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
Prashanth684:okd-scos-extensions-fix

Conversation

@Prashanth684
Copy link
Copy Markdown
Contributor

@Prashanth684 Prashanth684 commented Mar 6, 2025

This PR: openshift/release#62296 now builds scos images. The extensions image build hit this error:

INFO: Neutering RHEL repos for SCOS
centos-stream-release-9.0-26.el9.noarch
package centos-release-cloud is not installed
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

This is because the centos-release* repos are disabled in the node image which is used for building extensions

@openshift-ci openshift-ci Bot requested review from cverna and jbtrystram March 6, 2025 05:45
Comment thread ci/get-ocp-repo.sh Outdated
fi
cat "$workdir/c9s.repo" >> "$repo_path.tmp"
mv "$repo_path.tmp" "$repo_path"
# copy the repo file to /etc/yum.repos.d - this is needed when building extensions as we need to install
Copy link
Copy Markdown
Contributor Author

@Prashanth684 Prashanth684 Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm wondering if a better solution is to not do dnf remove on the centos-release packages during cleanup and avoid this altogether. I don't see any harm in those packages being around

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just read through the other PR comments and if I understand what's happening I think we need to cleanup otherwise the ci repos definitions will stick in the image and mess things down the line, as in https://issues.redhat.com/browse/OCPBUGS-52363

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we can keep the repo cleanup as such (removing the ocp.repo file), but instead of doing this - I wonder if we can just keep the centos packages around.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not against keeping the repo files around for SCOS if you'd like. The reason I suggested that is for parity with RHCOS, where we don't either keep any repo files around in the image.

That said, I don't think that's actually the issue here. Isn't the problem actually that the repos are disabled? The default ones (e.g. baseos and appstream) at least should definitely still be there, but in postprocess we disable it (that's the sed you fixed in the previous PR).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So basically, instead of this, try just adding --enablerepo baseos --enablerepo appstream to the dnf install invocation in create_gpg_keys.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh..right because we only remove the ocp.repo and not the others. thanks @jlebon I missed that.

@Prashanth684
Copy link
Copy Markdown
Contributor Author

/retest

@Prashanth684 Prashanth684 force-pushed the okd-scos-extensions-fix branch 2 times, most recently from 5fd11cb to 587059a Compare March 6, 2025 21:28
@Prashanth684 Prashanth684 changed the title ci/get-ocp-repo.sh: copy ocp.repo to /etc/yum.repos.d when building extensions container for scos ci/get-ocp-repo.sh: add --enablerepo when installing centos packages Mar 6, 2025
This PR: openshift/release#62296 now builds scos
images. The extensions image build hit this error:

```
INFO: Neutering RHEL repos for SCOS
centos-stream-release-9.0-26.el9.noarch
package centos-release-cloud is not installed
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
```

This is because the centos-release* repos are disabled in the node image
which is used for building extensions
Copy link
Copy Markdown
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2025
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlebon, Prashanth684

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2025
@Prashanth684 Prashanth684 changed the title ci/get-ocp-repo.sh: add --enablerepo when installing centos packages NO-JIRA: ci/get-ocp-repo.sh: add --enablerepo when installing centos packages Mar 6, 2025
@openshift-ci-robot
Copy link
Copy Markdown

@Prashanth684: This pull request explicitly references no jira issue.

Details

In response to this:

This PR: openshift/release#62296 now builds scos images. The extensions image build hit this error:

INFO: Neutering RHEL repos for SCOS
centos-stream-release-9.0-26.el9.noarch
package centos-release-cloud is not installed
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

This is because the centos-release* repos are disabled in the node image which is used for building extensions

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 6, 2025
@openshift-ci-robot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD d195b64 and 2 for PR HEAD 587059a in total

1 similar comment
@openshift-ci-robot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD d195b64 and 2 for PR HEAD 587059a in total

@Prashanth684
Copy link
Copy Markdown
Contributor Author

/override ci/prow/rhcos-9-build-test-metal
/override ci/prow/scos-9-build-test-metal
/override ci/prow/e2e-aws

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 7, 2025

@Prashanth684: Overrode contexts on behalf of Prashanth684: ci/prow/e2e-aws, ci/prow/rhcos-9-build-test-metal, ci/prow/scos-9-build-test-metal

Details

In response to this:

/override ci/prow/rhcos-9-build-test-metal
/override ci/prow/scos-9-build-test-metal
/override ci/prow/e2e-aws

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 7, 2025

@Prashanth684: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit a4f655d into openshift:master Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants