Skip to content

Update container image in PodSpec to use centos:10 #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

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

ashokpariya0
Copy link
Contributor

Changed the container image from "centos" to "centos:10" in the PodSpec function to specify a more specific version of the CentOS image.

What this PR does / why we need it:
We encountered the following test failure while running the Bridge Marker E2E tests from CNAO:

Failure Summary:

[Fail] bridge-marker pod requiring bridge resource [It] should be started only when bridge is available on node 
/tmp/deploy.bridge-marker.oy9U/github.com/kubevirt/bridge-marker/tests/utils.go:157

Ran 2 of 2 Specs in 453.936 seconds
FAIL! -- 1 Passed | 1 Failed | 0 Pending | 0 Skipped

The pod created here(

_, err := clientset.CoreV1().Pods(DefaultNamespace).Create(context.TODO(), podReq, v1.CreateOptions{})
) in this test (bridge-marker-test) encountered an ErrImagePull issue. The pod status was:

NAME                             READY   STATUS         RESTARTS   AGE
bridge-marker-test               0/1     ErrImagePull   0          118s

Upon examining the pod's describe output, we found the following error:

state:
      waiting:
        message: 'reading manifest latest in quay.io/centos: StatusCode: 404, "<!doctype html>\n<html lang=en>\n<title>404 Not Foun..."'
        reason: ErrImagePull

The issue is caused by the Kubernetes node attempting to pull the centos:latest image from the registry, which results in a 404 Not Found error.

Solution:
To resolve this issue, we will update the image to use a specific tag instead of the default centos image.

Special notes for your reviewer:

Release note:

None

Changed the container image from "centos" to "centos:10" in the PodSpec function
to specify a more specific version of the CentOS image.

Signed-off-by: Ashok Pariya <[email protected]>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Mar 26, 2025
@kubevirt-bot kubevirt-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 26, 2025
@kubevirt-bot
Copy link

Hi @ashokpariya0. Thanks for your PR.

I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ashokpariya0
Copy link
Contributor Author

cc @oshoval

@oshoval
Copy link
Collaborator

oshoval commented Mar 26, 2025

Nice thanks
interesting that manually i can pull the image
i wonder if we could see the error you pasted in the artifacts?

lets see if @phoracek is fine with this fix, it just means that we might need to change it in the future, but i think we are good to go, it can be stable for lot of time, and once needed we will find out

@RamLavi
Copy link
Collaborator

RamLavi commented Mar 26, 2025

/ok-to-test

@kubevirt-bot kubevirt-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 26, 2025
@ashokpariya0
Copy link
Contributor Author

i wonder if we could see the error you pasted in the artifacts?

No, I saw the below output files in artifacts , but I don't see the error since the test pod creation itself failed. The error should be available in the kubelet logs and describe output of test pod. Do we collect kubelet logs in case of failure?

ls -lthr
total 24K
-rw-r--r--. 1 root root 1.3K Mar 26 08:23 junit.functest.xml
-rw-r--r--. 1 root root    0 Mar 26 08:23 bridge-marker.log
-rw-r--r--. 1 root root  17K Mar 26 08:23 nodes.yaml

@oshoval
Copy link
Collaborator

oshoval commented Mar 26, 2025

i guess we dont yet, thx

@RamLavi
Copy link
Collaborator

RamLavi commented Mar 27, 2025

@ashokpariya0 thank you for this fix, it would do wonders to CNAO tier1 lanes. <3

One question though - since CNAO is consuming bridge-marker main branch on all stable branches - is it OK to consume centos10 on old stable branches?

@ashokpariya0
Copy link
Contributor Author

ashokpariya0 commented Mar 27, 2025

@ashokpariya0 thank you for this fix, it would do wonders to CNAO tier1 lanes. <3

One question though - since CNAO is consuming bridge-marker main branch on all stable branches - is it OK to consume centos10 on old stable branches?

I don't see any issue using centos with tag 10, we can use any tag: https://quay.io/repository/centos/centos?tab=tags,
somehow just centos without tag(

Image: "centos",
) is resulting to ImagePullBackOff ( message: 'reading manifest latest in quay.io/centos: StatusCode: 404, "<!doctype html>\n\n<title>404 Not Foun..."'
reason: ErrImagePull)resulting into test failure,

are we not seeing same failure with bridge-marker test on older stable branch ??

Also, the test(

It("should be started only when bridge is available on node", func() {
) isn't dependent on the specific CentOS image; we just need any pod with a valid image. The pod in the test is created here: Test Pod Creation. You can use any other image for this test

bridge marker test is to verify that a pod, after waiting for the bridge resource to become available, should transition from the "Pending" state to the "Running" state once the Linux bridge is created. The resource requirements for the test are specified as:

resources:
      limits:
        bridge.network.kubevirt.io/br_podtest: "1"
      requests:
        bridge.network.kubevirt.io/br_podtest: "1"

The test ensures that the pod correctly transitions to a running state once the bridge resource is available.

@oshoval
Copy link
Collaborator

oshoval commented Mar 27, 2025

It is a test, not core code fwiw (we can continue discussion offline according needs please)

Copy link
Member

@phoracek phoracek left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2025
@RamLavi
Copy link
Collaborator

RamLavi commented Mar 27, 2025

/approve

@kubevirt-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RamLavi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2025
@kubevirt-bot kubevirt-bot merged commit 144ffa4 into kubevirt:main Mar 27, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants