GithubHelp home page GithubHelp logo

Comments (2)

egernst avatar egernst commented on June 14, 2024
  1. We grab and validate the config as part of katautils, where we check what max CPUs should be
  2. We call createSandboxConfig with the sandbox config created from step 1. This'll then:
    a. create the sandbox (structures)
    b. setup the network
    c. Move itself into the appropriate resource controller
    d. Start the VM.

katautils depends on virtcontainers, so we can't reuse / call logic for getting default max CPUs again from vc. Reordering creation of resource controller to earlier is complicated b/c we rely on devices getting setup. I think the best option would be to update the value of s.hypervisorconfig.defaultMaxVCPUs between 2.c and 2.d, and figure out how to either reuse existing code, or move the logic out of katautils. 🤷

from kata-containers.

egernst avatar egernst commented on June 14, 2024

The max handling is a bit of a mess to untangle given that we are checking at LoadConfiguration time. Rather than reorder or change too much, I think it makes sense to do what we have in the confirmation toml comments: Validate only against the number of actual CPUs on the host system, not what is visible to the particular process via go runtime. I'm working to just update checking procfs to see number of logical CPUs instead of calling the go runtime to determine.

from kata-containers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.