-
Notifications
You must be signed in to change notification settings - Fork 87
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-16] Do not disable RHSM repos before pkg backup #627
[RHELC-16] Do not disable RHSM repos before pkg backup #627
Conversation
Codecov ReportBase: 93.47% // Head: 93.57% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #627 +/- ##
==========================================
+ Coverage 93.47% 93.57% +0.09%
==========================================
Files 22 22
Lines 3188 3222 +34
Branches 568 575 +7
==========================================
+ Hits 2980 3015 +35
+ Misses 146 142 -4
- Partials 62 65 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
d4290ed
to
436b8a8
Compare
436b8a8
to
ad30c15
Compare
Rebased, conflict solved |
ad30c15
to
0fd2d2c
Compare
Heh, I used probably a wrong command and I see there is a bit mess... |
328d550
to
8bda952
Compare
There are few things left that needs to be done to get the integration test running properly:
Otherwise the test works just for the CentOS 7 so I think I should limit that just for this system and not to run it with others. The second variant is to ask satellite guys to provide servers that we need for another systems. What do you think @SpyTec or @r0x0d? |
@hosekadam ping @kokesak to merge your PR. I don't have write access to that repository. I don't know how the satellite guys would react if we ask them for more servers for the other distros we use… Furthermore, I don't know if @SpyTec or @bocekm knows how that works, if so, can any of you help us here? As far as limiting the test to CentOS 7, I think it's a good idea if your test is only related to CentOS 7 and not anything else... But looking at your PR, I see that you changed the preparation of one test that runs under all distros to use the activation key for CentOS 7 you created, is that supposed to like that? |
tests/integration/conftest.py
Outdated
@@ -26,7 +26,7 @@ | |||
logging.basicConfig(level="DEBUG" if env.str("DEBUG") else "INFO", stream=sys.stderr) | |||
logger = logging.getLogger(__name__) | |||
|
|||
SATELLITE_URL = "satellite.sat.engineering.redhat.com" |
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.
We are actually trying to use the new satellite URL (https://issues.redhat.com/browse/RHELC-732). The dogfood is going to be removed.
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.
Yeah, I see. But if you register the system using subscription-manager to get the CentOS 7 satellite server, there are still urls to the dogfood in /etc/yum.repos.d/redhat.repo
. Maybe adding both of them, so once it would be finally changed, nothing breaks and just be needed to remove the dogfood url from /etc/dnsmasq.conf
?
The test was running for all distros so I would keep that. IIUC, it's the offline-conversion test in which we currently use the env variables to omit bug this PR fixes. However, we need centos and oracle content in the satellite server, currently, we have just centos7 right?. Is this fix going to be in the next release? I would rather have it tested on all distros before merging. |
/packit test |
# Need to remove the file, if it would stay there would be leftover /etc/os-release.rpmorig | ||
# after conversion | ||
# RHELC-16 | ||
os_release_file.remove() |
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 part feels a little unclean but we can fix it in the next release. I've written up what's unclean about it and how we can fix it later here: https://issues.redhat.com/browse/RHELC-809
# The file /etc/os-release is needed for subscribing the system and is being removed with | ||
# <system-name>-release package in one of the steps before | ||
# RHELC-16 |
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.
# The file /etc/os-release is needed for subscribing the system and is being removed with | |
# <system-name>-release package in one of the steps before | |
# RHELC-16 | |
# The file /etc/os-release is needed for subscribing the system and is being removed with | |
# <system-name>-release package in one of the previous steps: | |
# Fixes RHELC-16 | |
# | |
# This code should be cleaned up in the future. See https://issues.redhat.com/browse/RHELC-809 | |
# for what should be done. |
/packit test |
On centos7 it seems that the satellite repos do not have the kernel we update to during the update system phase:
|
@kokesak Yes, I've mentioned this problem in the comment :D Do you know somebody who we can contact to help us with that? I thought, they (who prepared the satellite server) have some automated way to stay updated with the original repositories. When I was testing that, I used the older version of vagrant box and removed the update step from ansible setup. |
f974d0b
to
42a80d7
Compare
42a80d7
to
d1eef72
Compare
Hmm, seem that passing the the env var |
Trying to revert the merge commit that was previously created. Signed-off-by: Rodolfo Olivieri <[email protected]>
5e90827
to
e683f85
Compare
We had to do a workaround around the get_avail_subs function to place a releasever file in /etc/dnf/vars for it to work again. Signed-off-by: Rodolfo Olivieri <[email protected]>
ff72fd4
to
cc7cc06
Compare
@@ -26,11 +26,11 @@ | |||
import pytest | |||
import six | |||
|
|||
from convert2rhel import logger, systeminfo, unit_tests, utils # Imports unit_tests/__init__.py | |||
from convert2rhel import logger, pkgmanager, systeminfo, unit_tests, utils # Imports unit_tests/__init__.py |
Check notice
Code scanning / CodeQL
Unused import
/packit test |
/packit build |
1 similar comment
/packit build |
Signed-off-by: Rodolfo Olivieri <[email protected]>
/packit build |
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.
Just a couple of minor changes, we can sort this out with another PR.
- name: workaround_kernel | ||
how: shell | ||
script: "yum install kernel-3.10.0-1160.76.1.el7 -y && yum remove kernel-3.10.0-1160.80.1.el7 -y" | ||
- name: reboot machine | ||
how: ansible | ||
playbook: tests/ansible_collections/roles/reboot/main.yml |
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.
Do we need to reboot?
Wouldn't grubby --set-default-kernel
be sufficient?
I would probably add some comment about the kernel workaround being temporary.
Or a #TODO
to remove it, when the repository gets synced over at Satellite.
But I guess for the sake of saving some time, we can also keep it as is.
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.
The reboot is needed I believe as the c2r check is done against the running kernel which changes only after reboot.
summary: | | ||
Convert systems that have no access to the Internet. This test require having the repositories of original | ||
distro available in the satellite server. As of now we only have CentOS7 repositories available. |
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.
Summary should be shorter, 50 characters if possible.
Description can be longer.
But we can fix this whenever.
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 created a Jira issue for this so we can tackle all the missing stuff in future fix and not block current PR.
Link to the Jira: https://issues.redhat.com/browse/RHELC-824
Co-authored-by: Rodolfo Olivieri <[email protected]> Co-authored-by: Martin Litwora <[email protected]>
Co-authored-by: Rodolfo Olivieri <[email protected]> Co-authored-by: Martin Litwora <[email protected]>
There is a problem with backing up the packages on systems which use satellite server. During the conversion is system unregistered from previous subscription - in that step we lose access to the CentOS repositories. And then we need to backup packages, which could come from CentOS.
So the step with backup and remove the package is moved before the unregistration. With that show up another problem - the backed up and then removed package remove
os-release
file too. The file is needed for subscribing the system, so it is restored from backup and then removed (if it won't be removed, the file would stay there after conversion asos-release.rpmorig
)Jira Issue: RHELC-16
Checklist
[RHELC-]
is part of the PR titleRelease Pending