Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

virtcontainers: Initial import #41

Merged
merged 3 commits into from
Mar 13, 2018

Conversation

sameo
Copy link

@sameo sameo commented Feb 23, 2018

This is a virtcontainers 1.0.7 import into Kata Containers runtime.

virtcontainers is a Go library designed to manage hardware virtualized
pods and containers. It is the core Clear Containers framework and will
become the core Kata Containers framework, as discussed at
#33

Some additional pointers:

virtcontainers README, including some design and architecure notes:
https://github.com/containers/virtcontainers/blob/master/README.md

virtcontainers 1.0 API:
https://github.com/containers/virtcontainers/blob/master/documentation/api/1.0/api.md

Fixes #40

Signed-off-by: Samuel Ortiz sameo@linux.intel.com

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

I think there will be obvious things that will need cleanup and adaptation here, including but not limited to:

  • docs
  • CI scripts

but, as a first direct copy import that we can then base PRs on top of to fix up those items, and build the new API upon:

lgtm

@jodh-intel
Copy link
Contributor

Thanks @sameo. There are a few bits I think we can remove:

  • Drop the .ci/ as we already have that at the top-level
    (we can make changes to those top-level scripts specifically for vc if required potentially later).
  • I'd consider removing NEWS entirely as it's something else (to forget) to maintain and can be handled via a normal release PR + tag.
  • Drop .pullapprove.yml + OWNERS as we already have the former at the top-level. We could move OWNERS to the top-level, but again it will need updating with who is in the current top-level .pullapprove.yml so I'd vote we just zap it.
  • Drop CONTRIBUTING.md and CODE_OF_CONDUCT.md as we have those at the top-level too.

@laijs
Copy link
Contributor

laijs commented Feb 23, 2018

The name "vircontainers" is confusing here since there will be a single unified runtime.
And how to update vircontainers/ when the repo vircontainers is updated?

@laijs
Copy link
Contributor

laijs commented Feb 23, 2018

IMO, I hope there will be two repos.
kata-containers/libkata: a repo like "vircontainers" or runv/hypervisor.
kata-containers/runkata: the cli repo like cc-runtime or runv/cli.

sandbox, agent, network, hypervisors and persistence as #32 described should be in different packages under kata-containers/libkata.

both vircontainers and runv can be refactored as it.

@sameo
Copy link
Author

sameo commented Feb 23, 2018

The name "vircontainers" is confusing here since there will be a single unified runtime.

If you're thinking about something like libkata, I'd disagree. We really want this library to not be kata specific. It's always been a design requirement as a driving function for building properly architectured software.

And how to update vircontainers/ when the repo vircontainers is updated?

See #40 for more details, but the idea is that the virtcontainers repo would be frozen, and kata-containers/runtime/virtcontainers/ becomes the single point of development for virtcontainers. There will be a transition period where we'd have to manually update, but we want to make it as short as possible.

@sameo
Copy link
Author

sameo commented Feb 23, 2018

IMO, I hope there will be two repos.
kata-containers/libkata: a repo like "vircontainers" or runv/hypervisor.

A few objections here:

  • I'd prefer not to call it libkata at that point.
  • We already have a lot of repos, I was hoping we could refrain ourselves from creating more as virtcontainers is going to be the biggest runtime dependency.
  • virtcontainers and runc/hypervisor are not comparable.
  • runc/hypervisor is not a repo.

kata-containers/runkata: the cli repo like cc-runtime or runv/cli.

The only reason why we have not put virtcontainers under clearcontainers/cc-runtime is to make it clear it was not designed to be a Clear Containers/Intel dependent component. Kata Containers is a more neutral organization and it's ok to move it there, but I believe both virtcontainers and the runtime cli should live under the runtime repos:

  • gitub.com/kata-containers/runtime/virtcontainers (or some more relevant name if there's a consensus about name changing)
  • github.com/kata-containers/runtime/cli for the actual cli implementation on top of virtcontainers.

We should not forget that a big part of what we build is an OCI compatible runtime and that is mostly defined by the CLI level compatibility.

@WeiZhang555
Copy link
Member

gitub.com/kata-containers/runtime/virtcontainers (or some more relevant name if there's a consensus about name changing)
github.com/kata-containers/runtime/cli for the actual cli implementation on top of virtcontainers.

This is so good to me. As a core part of kata-runtime, it makes sense to put it directly under runtime/ .
So many repos is starting to make me headache 😛

This is a good start, though there are still many further modifications need to do. LGTM as a first step

Copy link

@sboeuf sboeuf left a comment

Choose a reason for hiding this comment

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

I agree with @jodh-intel comments but I am fine if we do that as a follow up PR.
LGTM

@sameo
Copy link
Author

sameo commented Feb 23, 2018

@sboeuf @jodh-intel comments addressed

@sboeuf
Copy link

sboeuf commented Feb 23, 2018

Thanks @sameo
About the CI, we are removing it from virtcontainers since we already have it in the repo. But we need to port what was done in virtcontainers into the kata runtime CI. Particularly, the testing of a PR affecting virtcontainers with Clear Containers. Any PR related to virtcontainers should be tested both for Clear Containers and Kata Containers.

@gnawux
Copy link
Member

gnawux commented Feb 23, 2018

As my comments in #40.

I think we should agree on APIs before merging this PR though I don't want to put a -1 here. I am not saying I don't like the code. I don't like to merge code before the APIs are seriously discussed.

@jessfraz
Copy link

Dope! :) looks good to me

Copy link
Member

@amshinde amshinde left a comment

Choose a reason for hiding this comment

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

lgtm

@devimc
Copy link

devimc commented Feb 23, 2018

LGTM

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

lgtm

@tallclair
Copy link

So it sounds like there are 2 somewhat conflicting goals:

  1. virtcontainers is a generic library that can be reused outside of the kata runtime
  2. Reduce the maintenance burden of managing 2 repos, in particular the need to keep the vendored dependency in runtime up to date.

Is that an accurate summary? One strategy is to move forward with the approach you have here, but in my experience we'll need to put some strict import restrictions in place (through presubmit tests) that prevent virtcontainers from gradually fusing with the runtime. The alternative approach would be to make it a separate repo, which is a much stronger separation, and automate the task of keeping the runtime repo up-to-date. Either way, I think some automation is required.

@sboeuf
Copy link

sboeuf commented Feb 23, 2018

@tallclair that's a very clear description of the problem, and that's also the reason why virtcontainers is currently living in its own repo, decoupled from Intel Clear Containers. Unfortunately, the decision of moving this library to the kata-runtime repo has been taken in order to prevent contributors from confusion...

@sboeuf
Copy link

sboeuf commented Feb 23, 2018

Adding do-not-merge until everybody agreed.

@sameo
Copy link
Author

sameo commented Feb 25, 2018

@tallclair That's an accurate summary indeed. Today we have this automation in place as virtcontainers does not live under the Clear Containers organization.

TL;DR I feel moving virtcontainers under the runtime repo is a safe and an easier approach for new contributors. But I'm not strongly against creating a dedicated repo for it if the community thinks it's a cleaner solution.

I'm happy to create a new virtcontainers repo if folks believe that this is the best solution. From our experience, this makes the developer's experience less straightforward as testing virtcontainers changes means playing with some dep tricks. This can be scripted but makes things less easy than just applying changes directly into the runtime repo.

Honestly I did not take into account the risk of reducing virtcontainers agnosticism by making it a runtime package, because this has been a feature we've been really careful about conserving from the very beginning. But your concerns might be valid as we're adding potentially much more contributors to it now, by moving it here.

@laijs already expressed his opinion about it. @gnawux @bergwolf @WeiZhang555 @jessfraz @sboeuf @jodh-intel @egernst would you prefer having a separate repo for virtcontainers over moving it under the runtime repo directly?

@WeiZhang555
Copy link
Member

would you prefer having a separate repo for virtcontainers over moving it under the runtime repo directly?

Both are ok for me. But I prefer putting virtcontainers under runtime directly.

@sboeuf
Copy link

sboeuf commented Feb 26, 2018

@sameo I would prefer a separate repo.

@sameo
Copy link
Author

sameo commented Mar 5, 2018

So to summarize the current state (please correct me if I misunderstood) we have:

@jessfraz is ok with this
@WeiZhang555 is ok with this
@sameo is ok with this (obviously)
@tallclair gives us a fair warning but does not have a strong preference for where it should live.
@gnawux would prefer to see the API discussion going further but does not want to NACK this PR at that point.
@sboeuf is ok with the PR but would prefer to see the virtcontainers code live in a different repo.
@devimc, @amshinde, @jodh-intel, @egernst and @grahamwhaley (All of them are virtcontainers contributors, whatever that means...) have ACKed this PR.

If that's a fair depiction of the current status, I'd like to consider removing the do-not-merge tag and proceed with that PR. Please speak up if you disagree.

@gnawux
Copy link
Member

gnawux commented Mar 5, 2018

@sameo we are going to have the meeting in hours, let's discuss in the meeting. I don't think it is good to merge code before we have an agreement on APIs.

@laijs
Copy link
Contributor

laijs commented Mar 12, 2018

For ALL APIs(related functions, structures, interfaces ...), please add the document // unstable.
Because the APIs are going to be shifted to smooth the gap and meet the requirement.
We don't need to keep ALL APIs always as they were when the time they were imported.
We don't want the initial APIs block our future progresses.

On the other hand, // unstable should be also added when the new APIs are added or current ones are updated. // unstable will be kept until some milestones.

@devimc
Copy link

devimc commented Mar 12, 2018

LGTM

Samuel Ortiz added 3 commits March 13, 2018 00:49
This is a virtcontainers 1.0.8 import into Kata Containers runtime.

virtcontainers is a Go library designed to manage hardware virtualized
pods and containers. It is the core Clear Containers framework and will
become the core Kata Containers framework, as discussed at
kata-containers#33

Some more more pointers:

virtcontainers README, including some design and architecure notes:
https://github.com/containers/virtcontainers/blob/master/README.md

virtcontainers 1.0 API:
https://github.com/containers/virtcontainers/blob/master/documentation/api/1.0/api.md

Fixes kata-containers#40

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Some virtcontainers pieces of code are importing virtcontainers
packages. We need to change those paths to point at
kata-containers/runtime/virtcontainers

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
We will move the CI part into the top level .ci directory.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
@sameo
Copy link
Author

sameo commented Mar 13, 2018

Updated to import virtcontainers 1.0.8.
@laijs I will add a specific document explicitly stating that all APIs are alpha (i.e. not stable).

@WeiZhang555
Copy link
Member

WeiZhang555 commented Mar 13, 2018

LGTM.

Codes are so many and it's hard to review, but let's trust virtcontainers and use it as our fundamental code base, and keep improving it in following iterations.
We all know these APIs are alpha, and we shouldn't release a 1.0 tag until all requirements we agreed are satisfied . Even without document we still have Github records, that's one nature advantage of a github project :-)

Approved with PullApprove

@laijs
Copy link
Contributor

laijs commented Mar 13, 2018

Ok, let the wheel run.

@laijs laijs merged commit 167d54a into kata-containers:master Mar 13, 2018
@amshinde amshinde removed the review label Mar 13, 2018
mcastelino added a commit to mcastelino/runtime-1 that referenced this pull request Dec 28, 2018
Revendor firecracker go sdk for Firecracker 0.12.0 API changes

git shortlog

9614612 (HEAD -> master, origin/master, origin/HEAD) Merge pull request
653c342 Adding drives builder
3c1f5c3 Merge pr kata-containers#41
c4151ff Migrate firectl to its own repository
433f262 Merge pull request kata-containers#23 from xibz/fifo_logging_file
121ef9a add handler lists to handle initialization
0fd9825 Adding support for capturing fifo logs to file.
6b08ec7 Merge branch 'fc-0.12.0'
25878e7 Update for Firecracker 0.12.0 API changes
ea93f77 Regenerate API client from swagger spec
00d8eee Update swagger.yaml for firecracker 0.12.0

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
zklei pushed a commit to zklei/runtime that referenced this pull request Jun 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.