Skip to content
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

Proof of concept for Amazon Linux 2 conversions #1455

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bocekm
Copy link
Member

@bocekm bocekm commented Feb 4, 2025

Steps to get the AL2 converted:

yum install -y https://download.copr.fedorainfracloud.org/results/@oamg/convert2rhel/epel-7-x86_64/08607304-convert2rhel/convert2rhel-2.2.0-1.20250204233429584613.pr1455.2.g3b255d4.el7_9.noarch.rpm  # rpm made out of upstream PoC PR https://github.com/oamg/convert2rhel/pull/1455
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  # The python-dmidecode version in AL2 repos is older than the RHEL 7 sub-man requires
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  # this repofile is not owned by any package
yum remove python3-* python2-s3transfer -y  # in the VM I used for testing (jaredeh/amazonlinux2 vagrant box) these packages were installed of versions that are not available in AL2 repos
echo "allow_unavailable_kmods=true" >> /etc/convert2rhel.ini
echo "skip_kernel_currency_check=true" >> /etc/convert2rhel.ini
convert2rhel -y --debug

What might be causing issues during or after the conversion:

  • kernel 4.14.355 (vs 3.10.0 on RHEL 7)
  • glibc 2.26 (vs 2.17 on RHEL 7)

Especially when it comes to kernel drivers.

Jira Issues:

Checklist

  • PR has been tested manually in a VM (either author or reviewer)
  • Jira issue has been made public if possible
  • [RHELC-] or [HMS-] is part of the PR title
  • Label depicting the kind of PR it is
  • PR title explains the change from the user's point of view
  • Code and tests are documented properly
  • The commits are squashed to as few commits as possible (without losing data)
  • When merged: Jira issue has been updated to Release Pending if relevant

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
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.04%. Comparing base (f21f6cf) to head (1cbc5d4).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...el/actions/system_checks/rhel_compatible_kernel.py 0.00% 1 Missing and 1 partial ⚠️
convert2rhel/pkghandler.py 33.33% 1 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
centos-linux-7 91.56% <20.00%> (-0.08%) ⬇️
centos-linux-8 92.41% <20.00%> (-0.08%) ⬇️
centos-linux-9 92.54% <20.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant