-
Notifications
You must be signed in to change notification settings - Fork 82
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
[RHELC-895] Fix error message when repoquery fails to retrieve information on kmod packages #818
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #818 +/- ##
==========================================
+ Coverage 93.78% 93.87% +0.09%
==========================================
Files 47 47
Lines 4345 4360 +15
Branches 769 773 +4
==========================================
+ Hits 4075 4093 +18
+ Misses 192 190 -2
+ Partials 78 77 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
/packit test |
/packit test |
f3035b4
to
7a35307
Compare
7a35307
to
835d7b7
Compare
/packit build |
@@ -67,8 +76,26 @@ def _get_rhel_supported_kmods(self): | |||
if system_info.version.major == 8: | |||
basecmd.append("--setopt=module_platform_id=platform:el8") | |||
|
|||
active_repos = ["--disablerepo=*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tricky. What if the user uses the --disablerepo
c2r option?
We handle it in the call_yum_cmd
(https://github.com/oamg/convert2rhel/blob/v1.3.2/convert2rhel/pkghandler.py#L123).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --disablerepo
from the c2r options is safe to ignore as --disablerepo=*
is a superset of anything that the user might have specified.
OTOH, prior to this change, we didn't disable any repos when running repoqery in this function. I'm not sure how that worked... It seems like we would be running repoquery using both the vendor's repos and the RHEL repos in that case, but we only want to find kernel modules that are in packages in the RHEL repos here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --disablerepo from the c2r options is safe to ignore as --disablerepo=* is a superset of anything that the user might have specified.
Ah, right, that makes sense.
It seems like we would be running repoquery using both the vendor's repos and the RHEL repos in that case, but we only want to find kernel modules that are in packages in the RHEL repos here?
Yes, we want to query just the RHEL repos. Previously we've been using the --repoid
option.
--repoid=<repo>
Specify which repository to query. Using this option disables all repositories not explicitly enabled with --repoid option (can be used multiple times). By default repoquery uses whatever repositories are enabled in YUM configuration.
So we were really querying just the RHEL repos. Now given that yum doesn't have this option and you've switched to using --enablerepo
then passing --disablerepo=*
makes sense.
54a32a6
to
0ebd74f
Compare
@bocekm Does the latest set of changes address your concerns? |
@@ -67,8 +76,26 @@ def _get_rhel_supported_kmods(self): | |||
if system_info.version.major == 8: | |||
basecmd.append("--setopt=module_platform_id=platform:el8") | |||
|
|||
active_repos = ["--disablerepo=*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --disablerepo from the c2r options is safe to ignore as --disablerepo=* is a superset of anything that the user might have specified.
Ah, right, that makes sense.
It seems like we would be running repoquery using both the vendor's repos and the RHEL repos in that case, but we only want to find kernel modules that are in packages in the RHEL repos here?
Yes, we want to query just the RHEL repos. Previously we've been using the --repoid
option.
--repoid=<repo>
Specify which repository to query. Using this option disables all repositories not explicitly enabled with --repoid option (can be used multiple times). By default repoquery uses whatever repositories are enabled in YUM configuration.
So we were really querying just the RHEL repos. Now given that yum doesn't have this option and you've switched to using --enablerepo
then passing --disablerepo=*
makes sense.
This is Dev complete. Just needs integration tests. |
Probably its best to rebase this and get the newest changes? Making sure the other targets will run the tests properly as well |
4510e83
to
c7e1530
Compare
Rebased and also squashed into one commit. |
c7e1530
to
f12e780
Compare
@abadger Needs a rebase then we can merge |
…d packages * When repoquery fails to run (for instance, when repoquery decides that there isn't enough disk space to download metadata from the repository), we were printing an error message that there were no kmod containing packages. With this change, we will print an error message that says repoquery failed. * Now that we are printing a unified report for pre-check failures, we need to include the referenced yum output in the logger.critical message. Otherwise, the report will say to look at the "above yum output", but that output won't be present in the report handed to insights. Fixes https://issues.redhat.com/browse/RHELC-895 Fixes oamg#610
f12e780
to
bcece6f
Compare
@SpyTec Rebased and pushed! |
When repoquery fails to run (for instance, when repoquery decides that there isn't enough disk space to download metadata from the repository), we were printing an error message that there were no kmod containing packages. With this change, we will print an error message that says repoquery failed.
Fixes https://issues.redhat.com/browse/RHELC-895
Fixes #610
Jira Issues: RHELC-895
Checklist
[RHELC-]
is part of the PR titleRelease Pending
if relevant