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

Install cloud images from oscontainer (or at least pretend) #307

Closed
jlebon opened this issue Sep 19, 2018 · 8 comments
Closed

Install cloud images from oscontainer (or at least pretend) #307

jlebon opened this issue Sep 19, 2018 · 8 comments
Assignees

Comments

@jlebon
Copy link
Member

jlebon commented Sep 19, 2018

Right now, the oscontainer and cloud images are completely separate. In theory, the latest container pushed and the latest cloud image should contain the same commit. Though it's not as direct as installing the OS from the oscontainer. The reason for this is that at the cluster level, all it cares about is the oscontainer. It doesn't know anything about OSTree commits or OSTree versions.

One hacky but easiest path for now would be to "fake it" in %post by fiddling with the origin file. Though we'd have to check first that the cloud image we just built corresponds to the latest oscontainer in the registry, and if not... jump ship? Yuck.

@jlebon
Copy link
Member Author

jlebon commented Sep 19, 2018

Alternatively, change the status quo and make it care about OSTree commits/versions? Basically, broaden the MachineConfig spec to also include not just the OSImageURL but also the matching OSTree commit/version it expects. That just seems like a hack too though and it's just more fields that could be out of sync.

@ashcrow
Copy link
Member

ashcrow commented Sep 19, 2018

Versioning should be handled at the Version Control Operator (or similar named) which handles preparing manifest for each release. Those then reference the proper OSImageURL among other things which are to be used for a release, update, change, etc..

@ashcrow
Copy link
Member

ashcrow commented Sep 19, 2018

/cc @crawford

@cgwalters
Copy link
Member

I was hoping to add support for oscontainers into coreos-assembler. This would follow up from coreos/coreos-assembler#90

@jlebon
Copy link
Member Author

jlebon commented Sep 19, 2018

I was hoping to add support for oscontainers into coreos-assembler.

That's just to teach c-a to output oscontainers, right? It would help with the binding problem if the oscontainer and the cloud image is built in one shot, but we still need that cloud image to have the right custom-url.

So one thing we could do here:

  1. in the cloud pipeline, key off of the latest pushed container to determine whether there are changes
  2. on changes, use the commit from the io.openshift.os-commit label as the arg to ostreesetup
  3. tweak origin file in %post to add custom-url

?

@jlebon
Copy link
Member Author

jlebon commented Sep 19, 2018

Related: #281

It sounds like we need to weigh whether this needs to be done now, or wait until we pivot to the latest c-a and implement it there. The way the MCD is set up, things would still work OK without this (it'll just force an update to whatever oscontainer it was handed). Though for our developers, it can get annoying to always endure a reboot even if using the latest private AMI. (On the public side, the AMIs are outdated anyway, so rebooting is expected).

One thing we could do to alleviate this until then is to teach pivot to modify the origin in place without rebooting if the commit matches and tell the MCD there's no need to reboot.

@cgwalters
Copy link
Member

I roughly agree with #307 (comment) - I am indirectly working on this via taking on coreos-assembler+ootpa and that's mostly hitting 1+2. Then I'll look at step 3, shouldn't be too hard to inject some bits into %post.

@cgwalters
Copy link
Member

This is done now.

jlebon added a commit to jlebon/machine-config-operator that referenced this issue Oct 31, 2018
Now that RHCOS is pre-pivoted (see
openshift/os#307), we need to tweak the logic
here on how we handle `osImageURL`. Notably, we allow `://dummy` from
the installer to always match the current image, regardless of whether
we're pivoted or not. In fact, that should've been the logic from the
start.

Closes: openshift#150
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

No branches or pull requests

3 participants