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

CRI-O: match version against openshift #901

Merged
merged 1 commit into from
Dec 13, 2017

Conversation

runcom
Copy link
Contributor

@runcom runcom commented Dec 2, 2017

@mrunalp @Kargakis @stevekuznetsov PTAL this will fix openshift/origin#17546 by pulling the correct image for the CRI-O system container

Signed-off-by: Antonio Murdaca [email protected]

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 2, 2017
@runcom
Copy link
Contributor Author

runcom commented Dec 3, 2017

Tags live here for now: https://hub.docker.com/r/runcom/cri-o-system-container/tags/ - we'll configure docker.io/crio/cri-o to rebuild those tags when needed and make the required changes here as well (cri-o/cri-o#1201)

@runcom runcom force-pushed the match-crio-versions branch 2 times, most recently from d3063a1 to ef1553b Compare December 3, 2017 10:57
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 3, 2017
@stevekuznetsov
Copy link
Contributor

Historically logic like this has a habit of breaking whenever something crazy happens with versioning. I think it may be better to have a switch-case and very explicit requirements?

@runcom
Copy link
Contributor Author

runcom commented Dec 4, 2017

You mean to not concatenate strings to build up the image string for the installer? We can avoid that, but that requires us to update this repo every time a new release come up no? I think I'm missing something

@stevekuznetsov
Copy link
Contributor

Yes, it would require it to be updated. If you think releases are very frequent then maybe it's a bad idea. If it's once per release of Origin that's usually once every couple of months and totally OK. I would rather heave a static list/mapping we have to update than logic that fails in some weird edge cases or ends up installing something unexpected. Switch/case can have a well defined default

@@ -118,7 +119,7 @@ extensions:
--inventory sjb/inventory/ \
-e deployment_type=origin \
-e openshift_use_crio=True \
-e openshift_crio_systemcontainer_image_override=docker.io/gscrivano/cri-o-centos \
-e openshift_crio_systemcontainer_image_override="docker.io/runcom/cri-o-system-container:v${crio_tag}" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is crio_tag being set? In output that @mrunalp passed over to @sdodson and I the end result looked like:

docker.io/runcom/cri-o-system-container:v

Copy link
Contributor

Choose a reason for hiding this comment

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

true. If this is the version currently used by the CI then crio_tag looks empty

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be merged .... but not "merged". 😕

Copy link
Contributor

Choose a reason for hiding this comment

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

I just talked with @runcom He deployed it to test to see if it works. We need to debug why the tag isn't getting set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, I'll debug it asap

Copy link
Contributor

Choose a reason for hiding this comment

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

@runcom were you able to find the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm debugging here just right now, I'll update this once I find something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be fixed now, I'll work on Steve's switch case for images

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've deployed this to the origin CI already so we can test if it fixes the empty crio_tag issue

@runcom runcom force-pushed the match-crio-versions branch 2 times, most recently from 21ff45b to 8923ed9 Compare December 5, 2017 15:31
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 5, 2017
@runcom
Copy link
Contributor Author

runcom commented Dec 5, 2017

@stevekuznetsov added the case statement for the crio image PTAL (deployed to the CI as well for the crio jobs)

@@ -105,6 +105,21 @@ extensions:
timeout: 7200
repository: "aos-cd-jobs"
script: |-
crio_tag="$( cat ./ORIGIN_PKG_VERSION | cut -d'-' -f2 | cut -d'.' -f1,2 )"
Copy link
Contributor

Choose a reason for hiding this comment

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

I was also interested in this being fragile. Can you use regex in the case statements?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean extracting something like "3.9" with a regexp from that file? I could do that yeah

Copy link
Contributor

Choose a reason for hiding this comment

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

Right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, now using grep

@runcom
Copy link
Contributor Author

runcom commented Dec 5, 2017

@ashcrow so I've fixed the image tag but now we have another issue https://ci.openshift.redhat.com/jenkins/job/test_branch_origin_extended_conformance_crio/185/consoleFull#54402166758b6e51eb7608a5981914356

which is not related to CRI-O

Failure summary:


  1. Hosts:    localhost
     Play:     OpenShift Health Checks
     Task:     Run health checks (install) - EL
     Message:  One or more checks failed
     Details:  check "docker_image_availability":
               One or more required container images are not available:
                   openshift/origin-docker-registry:a5c8037
               Checked with: skopeo inspect [--tls-verify=false] [--creds=<user>:<pass>] docker://<registry>/<image>
               Default registries searched: docker.io

@runcom runcom force-pushed the match-crio-versions branch from 8923ed9 to e3fa4be Compare December 5, 2017 19:26
@stevekuznetsov
Copy link
Contributor

Are you starting the job manually? Use /test. The job expects many parameters to be set that were not provided in that run.

@runcom
Copy link
Contributor Author

runcom commented Dec 5, 2017

Are you starting the job manually? Use /test. The job expects many parameters to be set that were not provided in that run.

oh, I see, I'll just /test crio then

@runcom
Copy link
Contributor Author

runcom commented Dec 5, 2017

So it's failing again https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended_conformance_crio/427/consoleFull#-190934373858b6e51eb7608a5981914356

but this time it tries to restart CRI-O but it hasn't been installed, has something changed in openshift-ansible that now forgets to "atomic install" CRI-O?

@giuseppe @ashcrow

@ashcrow
Copy link
Contributor

ashcrow commented Dec 5, 2017

@runcom not that I'm aware of ... but looking at the code it doesn't look correct. It literally installed node items but didn't install the system container 😕.

I see that the docker role has been renamed container_runtime (which makes sense) ... I wonder if something slipped through the cracks.

@ashcrow
Copy link
Contributor

ashcrow commented Dec 5, 2017

I think this may be it but I'm not sure. The role used to require the docker role, but it no longer has a dependency.

@michaelgugino / @sdodson ^^ Thoughts?

@ashcrow
Copy link
Contributor

ashcrow commented Dec 5, 2017

Looks like it merged yesterday openshift/openshift-ansible#6297

@runcom
Copy link
Contributor Author

runcom commented Dec 5, 2017

So that's another reason to test cri-o as well in openshift ansible ha

@michaelgugino
Copy link
Contributor

Docker has been renamed to container_runtime to more accurately reflect its purpose.

This must now be called from prerequisites.yml before calling byo/config.yml

@ashcrow
Copy link
Contributor

ashcrow commented Dec 6, 2017

@michaelgugino thanks. Was there a reason this wasn't called already or is it a bug from refactoring?

@giuseppe
Copy link
Contributor

giuseppe commented Dec 6, 2017

I have some patches here, I will push them shortly.

Another thing, we should enable container-engine in the system-containers tests.

@runcom runcom force-pushed the match-crio-versions branch from e3fa4be to bb41f5f Compare December 11, 2017 09:48
@sdodson
Copy link
Contributor

sdodson commented Dec 12, 2017

@michaelgugino thanks. Was there a reason this wasn't called already or is it a bug from refactoring?

It's intentional. So we need to ensure those vars are set when calling prerequisites too before this PR will produce the desired outcome.

@runcom
Copy link
Contributor Author

runcom commented Dec 13, 2017

It's intentional. So we need to ensure those vars are set when calling prerequisites too before this PR will produce the desired outcome.

isn't it all fixed now? we have a bunch of PR in both origin and openshift-ansible that are blocked on this cause they're using the wrong cri-o system container image (maybe I'm missing something)

@michaelgugino
Copy link
Contributor

Any and all variables used with any and all of the plays must be used with prerequisites.yml.

In the case of container_runtime, that is all configured during prerequisites.yml. prerequisites.yml configures all of the host-level settings for each container runtime. In the case of system containers, this is when the runtime images are pulled and configured.

I highly recommend refactoring some of the tests to use a extra_vars file instead of passing most things via cli in the script. This will help alleviate some of the issues in the future.

@mrunalp
Copy link
Contributor

mrunalp commented Dec 13, 2017

@michaelgugino Is that something which can be done in a follow-on PR?

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 13, 2017
@ashcrow
Copy link
Contributor

ashcrow commented Dec 13, 2017

@sdodson++

@mrunalp
Copy link
Contributor

mrunalp commented Dec 13, 2017

@sdodson Thanks!

@mrunalp
Copy link
Contributor

mrunalp commented Dec 13, 2017

@michaelgugino Does it look okay now with @sdodson commit?

@sdodson
Copy link
Contributor

sdodson commented Dec 13, 2017

Yeah, the job ran with latest on master so I think this change is good to go.

@sdodson sdodson force-pushed the match-crio-versions branch from 38f2408 to b8e0743 Compare December 13, 2017 20:39
@sdodson sdodson merged commit 241b81f into openshift-eng:master Dec 13, 2017
@ashcrow
Copy link
Contributor

ashcrow commented Dec 13, 2017

I opened up runcom/cri-o-system-container#1 to ensure that this is the image that is in @runcom's namespace. Pulling and looking at it I'm pretty sure it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants