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

Pick image from release payload for crio.conf pause_image #471

Merged
merged 1 commit into from
Feb 28, 2019

Conversation

umohnani8
Copy link
Contributor

We want to pick the release payload image for the infra image.
Passing along the image we get from bootkube during bootstrap to
crio.conf.
Removed infraImage from the ctrcfg CR as well.

Note: we don't know what the infra image is called in the release payload yet, still working on figuring that out. I have seen it being `docker.io/openshift/origin-pod:v4.0.0" in openshift-ansible so using that for now. Will update that once we get a confirmation.
Also opening a PR in installer to add the infra image to bootkube.sh

Fixes #455

Signed-off-by: Urvashi Mohnani umohnani@redhat.com

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 21, 2019
@umohnani8
Copy link
Contributor Author

@runcom @mrunalp PTAL

@umohnani8
Copy link
Contributor Author

bootkube PR openshift/installer#1292

@abhinavdahiya
Copy link
Contributor

missing

templatectrl.SetupEtcdEnvKey: imgs.SetupEtcdEnv,

@runcom
Copy link
Member

runcom commented Feb 21, 2019

Let's chase down what's the pod image, apart from Abhinav comment, code looks already good (I'll defer a full review after we have everything in place)

@umohnani8
Copy link
Contributor Author

umohnani8 commented Feb 21, 2019

@abhinavdahiya
Copy link
Contributor

missing

machine-config-operator/pkg/operator/operator.go

Line 327 in 5b65a3c
templatectrl.SetupEtcdEnvKey: imgs.SetupEtcdEnv,

sorry missed the change below all the test_data :P

@ashcrow
Copy link
Member

ashcrow commented Feb 21, 2019

/retest

@cgwalters
Copy link
Member

Could also add a test to verify that k8s.gcr.io/pause hasn't been pulled to a node. But looks sane to me.

@umohnani8
Copy link
Contributor Author

Fixed the infra_image name. Ready for review and merge.

@runcom
Copy link
Member

runcom commented Feb 21, 2019

This looks good but I'm wondering about orders of PRs now between here and installer since the note here https://github.com/openshift/machine-config-operator/pull/471/files#diff-c15e2a465008fe4b86940c96d54a17eaR3

@cgwalters ^^^

@cgwalters
Copy link
Member

Yep this needs to land first, then the installer PR.

@runcom
Copy link
Member

runcom commented Feb 21, 2019

Yep this needs to land first, then the installer PR.

cause this is what actually generates the pod image in the release right?

@runcom
Copy link
Member

runcom commented Feb 21, 2019

Just a comment, looks good to me otherwise and we verified with @umohnani8 and @mrunalp that the pod image is indeed in the payload generated from this PR, with #472 @umohnani8 you should be able to test the flow with a dummy value as well.

@runcom
Copy link
Member

runcom commented Feb 21, 2019

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2019
@cgwalters
Copy link
Member

cause this is what actually generates the pod image in the release right?

No, at least I'm pretty sure that's not true. Is pod an image that's built out of an existing repo? Answer, looks like yes:

# podman inspect quay.io/openshift/origin-pod:v4.0|grep source-location | head -1
                "io.openshift.build.source-location": "https://github.com/openshift/images",

So...if this works, I think it only works because that image is already part of the build system.

(But I am fuzzy on this part. I know for "external" images like etcd and machine-os-content, Clayton added those manually)

@runcom
Copy link
Member

runcom commented Feb 22, 2019

So...if this works, I think it only works because that image is already part of the build system.

yes, we went through the doc explaining that yesterday and I forgot to cancel my message 👍

@runcom
Copy link
Member

runcom commented Feb 22, 2019

/lgtm

I guess the path now is, merge this, merge installer PR, create another PR here to remove the default

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2019
@runcom
Copy link
Member

runcom commented Feb 22, 2019

aws limit hit

/retest

@cgwalters
Copy link
Member

OK I think I understand the problem. You need to drop the change to image-references temporarily. The value is being substituted in the target cluster, but not at bootstrap time.

@cgwalters
Copy link
Member

Although...one thing that changed recently is we started gating installs on machine-config operator being successful. Before that...we could land changes that caused this problem.

I have a feeling we were actually relying on that in order to be able to make a change like this...

@umohnani8
Copy link
Contributor Author

@cgwalters by temporarily you mean till we get the installer PR in openshift/installer#1292 ?

@cgwalters
Copy link
Member

cgwalters commented Feb 25, 2019

I am thinking the flow needs to be something like this:

diff --git a/pkg/operator/images.go b/pkg/operator/images.go
index 825bbcc..5bcdf5f 100644
--- a/pkg/operator/images.go
+++ b/pkg/operator/images.go
@@ -4,8 +4,12 @@ package operator
 // bootkube.sh provides.  If you want to add a new image, you need
 // to "ratchet" the change as follows:
 //
-// Add the image here and also a CLI option with a default value
-// Change the installer to pass that arg with the image from the CVO
+// 1. Add the image here and also a CLI option to bootstrap.go
+//    with a default value (e.g. something quay.io).  But *ignore* the
+//    value passed on the CLI; always use the default.
+// 1. Change the installer to pass that arg with the image from the CVO
+// 1. Change the code in bootstrap to honor the passed image, and add
+//    it to image-references so it's substituted in the images configmap.
 // (some time later) Change the option to required and drop the default
 type Images struct {
 	MachineConfigController string `json:"machineConfigController"`

@cgwalters
Copy link
Member

To rephrase #471 (comment) - we need to add the CLI option to bootstrap.go and land the installer PR to use it, but have it be a no-op. Only then can we enable it in both bootstrap and runtime in this repo.

@cgwalters
Copy link
Member

(And the need to do this dance would go away if we changed the MCO bootstrap phase to gain access to the CVO directly)

@cgwalters
Copy link
Member

cgwalters commented Feb 25, 2019

Concretely, I would make a new PR that has this single line change:

bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.infraImage, "infra-image", "quay.io/openshift/origin-pod:v4.0", "Image for Infra Containers.")

And keep this PR open - land the installer change, then rebase this PR on top of that.

umohnani8 added a commit to umohnani8/machine-config-operator that referenced this pull request Feb 25, 2019
Adding this, so we can get the installer PR in first
before landing in openshift#471.
This is from an approved and lgtm'ed PR openshift#471.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
We want to pick the release payload image for the infra image.
Passing along the image we get from bootkube during bootstrap to
crio.conf.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
@umohnani8
Copy link
Contributor Author

So the tests here are passing now... Did we just have to break it down into 2 steps? So we get this in first then openshift/installer#1292?

@cgwalters
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, runcom, umohnani8

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

@umohnani8
Copy link
Contributor Author

/test e2e-aws-op

@umohnani8
Copy link
Contributor Author

Now the tests are failing :/ Are the failures expected?

@cgwalters
Copy link
Member

Hmm. Something failed early in the bootstrap node there.

@umohnani8
Copy link
Contributor Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants