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

feat: build rocky linux 9.1 images #637

Merged
merged 8 commits into from
Jan 26, 2023
Merged

feat: build rocky linux 9.1 images #637

merged 8 commits into from
Jan 26, 2023

Conversation

supershal
Copy link
Collaborator

What problem does this PR solve?:

  • E2E tests for rocky linux 9.1

Which issue(s) does this PR fix?:

Special notes for your reviewer:

We had disabled yum version lock for RHEL 8 because of dependency errors with already installed packets.
https://github.com/mesosphere/konvoy-image-builder/blob/main/ansible/roles/setup_versionlock/tasks/redhat.yaml#L2-L5
We had fixed this issue by not upgrading already installed packages.
We will need to revisit this logic for RHEL 8 and see if we can add back this version lock for RHEL 8.
I will test and file separate PR for this.

Does this PR introduce a user-facing change?:


@@ -1,6 +1,6 @@
---
- name: remove versionlock for containerd
command: yum versionlock delete containerd.io
command: yum versionlock {{ '--disablerepo "*" --enablerepo offline' if offline_mode_enabled else '' }} delete containerd.io
Copy link
Collaborator Author

@supershal supershal Jan 24, 2023

Choose a reason for hiding this comment

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

yum versionlock commands try to download repo metadata from internet. Adding logic for preventing yum from updating repo metadata when using yum versionlock in air-gapped installations for "RHEL" ansible distributions.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wow so that means the rockylinux already comes wit Containerd installed? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Discussed offline, the behavior for RockyLinux is different from CentoOS/RHEL yum and it tries to reach other repos when running yum versionlock.
But this is a good generic change that will prevent this bug in future RHEL releases too.

@supershal supershal requested review from faiq, dkoshkin, a team and dlipovetsky and removed request for faiq January 24, 2023 01:39
@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2023

File Coverage
All files 14%
cmd/konvoy-image-wrapper/cmd/wrapper.go 8%
cmd/konvoy-image-wrapper/image/common.go 0%
cmd/konvoy-image-wrapper/image/image_not_embedded.go 0%
pkg/ansible/runner.go 0%
pkg/app/artifacts.go 0%
pkg/app/build.go 0%
pkg/app/build_azure.go 2%
pkg/app/build_gcp.go 0%
pkg/app/config.go 50%
pkg/app/errors.go 0%
pkg/app/provision.go 0%
pkg/app/root.go 0%
pkg/app/utils.go 7%
pkg/app/validate.go 0%
pkg/appansible/io.go 0%
pkg/appansible/playbook.go 0%
pkg/azure/azure.go 0%
pkg/logging/logger.go 0%
pkg/packer/manifest.go 0%
pkg/packer/packer.go 0%
pkg/stringutil/rand.go 0%
pkg/version/info.go 8%

Minimum allowed coverage is 75%

Generated by 🐒 cobertura-action against cc4575c

make/ci.mk Outdated
Comment on lines 83 to 90
e2e.build.rocky-9.1-offline: rocky91-offline infra.aws.destroy

e2e.build.rocky-9.1: rocky91

e2e.build.rhel-8.6-nvidia: rhel86-nvidia

Copy link
Collaborator

Choose a reason for hiding this comment

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

should we not do these any more?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am keeping it in sync with other related targets for other OS. We can remove all related target at once when we deprecate them in separate PR.

packer:
distribution: "rockylinux-9" # Offer
distribution_version: "rockylinux-9" # SKU
image_publisher: "erockyenterprisesoftwarefoundationinc1653071250513"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

🤮

@supershal
Copy link
Collaborator Author

Created TC configurations for building Rockylinux release AMI (fips, non-fips) , Azure image (non-fips)

@@ -1,6 +1,6 @@
---
- name: remove versionlock for containerd
command: yum versionlock delete containerd.io
command: yum versionlock {{ '--disablerepo "*" --enablerepo offline' if offline_mode_enabled else '' }} delete containerd.io
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow so that means the rockylinux already comes wit Containerd installed? 🤔

ansible/roles/kubeadm/tasks/redhat.yaml Show resolved Hide resolved
packer:
distribution: "rockylinux-9" # Offer
distribution_version: "rockylinux-9" # SKU
image_publisher: "erockyenterprisesoftwarefoundationinc1653071250513"
Copy link
Contributor

Choose a reason for hiding this comment

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

🤮

rocky91-offline:
$(MAKE) aws-rocky-9.1_offline

.PHONY: rocky91-fips-offline
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we build FIPS offline packages? I do't think RockyLinux supports the correct 140-2 FIPS version only https://rockylinux.org/news/certifications-fips-2022-06-11/ 140-3.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FIPS offline packages for rocky. Link
I have still not run any FIPS validation tests

image_publisher: "erockyenterprisesoftwarefoundationinc1653071250513"
image_version: "latest"
ssh_username: "azureuser"
plan_image_sku: "rockylinux-9" # SKU
Copy link
Collaborator Author

@supershal supershal Jan 25, 2023

Choose a reason for hiding this comment

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

Azure plan information needed to use marketplace image.
Packer throwing following error when plan information was not provided.
Creating a virtual machine from Marketplace image or a custom image sourced from a Marketplace image requires Plan information in the request . TC log link

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for looking it up

@supershal supershal changed the title feat: build rocky linux 9.1 images feat: build rocky linux 9.1 images Jan 25, 2023
@github-actions github-actions bot added feature and removed feature labels Jan 25, 2023
@supershal supershal changed the title feat: build rocky linux 9.1 images feat: build rocky linux 9.1 images Jan 26, 2023
@github-actions github-actions bot added feature and removed feature labels Jan 26, 2023
@@ -469,7 +469,7 @@ build {
vars_inline = {
ARCH = "amd64"
OS = lower(var.distribution)
PROVIDER = "amazon"
PROVIDER = "azure"
Copy link
Collaborator

Choose a reason for hiding this comment

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

wow good find.

@supershal
Copy link
Collaborator Author

RHEL 8.6 NVIDIA tests are failing because kernel header rpm version 4.18.0-372.41.1.el8_6.x86_64 is not available yet. To unblock further work on rockylinux, I plan to merge this PR now.

@supershal supershal merged commit 579e620 into main Jan 26, 2023
@supershal supershal deleted the shalin/rocklylinux-9.1 branch January 26, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants