-
Notifications
You must be signed in to change notification settings - Fork 85
Proof of concept for Amazon Linux 2 conversions #1455
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
Draft
bocekm
wants to merge
7
commits into
oamg:main
Choose a base branch
from
bocekm:allow-amazon-linux-2-conversions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1455 +/- ##
==========================================
- Coverage 96.11% 96.04% -0.08%
==========================================
Files 72 72
Lines 5176 5180 +4
Branches 895 897 +2
==========================================
Hits 4975 4975
- Misses 119 121 +2
- Partials 82 84 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Member
2d06979 to
dd002b3
Compare
9640f20 to
ed602f3
Compare
Steps to get the AL2 converted: yum install -y https://<CDN mirror>/content/dist/rhel/server/7/7Server/x86_64/os/Packages/p/python-dmidecode-3.12.2-2.el7.x86_64.rpm curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://security.access.redhat.com/data/fd431d51.txt curl -o /etc/yum.repos.d/client-tools-for-rhel-7-server.repo https://cdn-public.redhat.com/content/public/repofiles/client-tools-for-rhel-7-server.repo yum -y install subscription-manager subscription-manager register rm -f /etc/yum.repos.d/amzn2-extras.repo yum remove python3-* python2-s3transfer -y echo "allow_unavailable_kmods=true" >> /etc/convert2rhel.ini echo "skip_kernel_currency_check=true" >> /etc/convert2rhel.ini convert2rhel -y --debug
The --setopt=varsdir= option was introduced in dnf. For that reason we can't pass to yum a directory with yum variable files and instead we need to ensure that all necessary yum vars are defined in /etc/yum/vars.
And update grub settings so that convert2rhel can call grub2-mkconfig.
Assisted by GitHub Copilot
ed602f3 to
52fb6ca
Compare
Without that it's not possible to use caplog or other log capturing
mechanisms in unit tests.
QueueHandler in Child Process:
- The child process uses a QueueHandler to send log messages to the logger
queue.
QueueListener in Parent Process:
- The parent process uses a QueueListener to listen for log messages from the
child process and handle them using the parent logger's handlers.
Exception Handling:
- Exceptions raised in the child process are sent back to the parent process
via the result queue.
- This helps with situations where failing functions executed in a child
process lead to the last traceback point to be something like:
```
File "/usr/lib/python2.7/site-packages/convert2rhel/utils.py", line 246, in wrapper
raise process.exception
```
Assisted by GitHub Copilot.
3eb844b to
fd5b7be
Compare
This reverts commit fd5b7be. It was incomplete and led to a traceback: File "/usr/lib/python2.7/site-packages/convert2rhel/utils/__init__.py", line 256, in wrapper listener = logging.handlers.QueueListener(logger_queue, *logging.getLogger().handlers) AttributeError: 'module' object has no attribute 'QueueListener'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps to get the AL2 converted:
What might be causing issues during or after the conversion:
Especially when it comes to kernel drivers.
Demo:
https://github.com/user-attachments/assets/729c200b-bc33-4a9e-a8b2-4deee5841409
Jira Issues:
Checklist
[RHELC-]or[HMS-]is part of the PR titleRelease Pendingif relevant