sockets * cores * threads should be equal to maxcpus otherwise a
warning is thrown: 'warning: Invalid CPU topology deprecated:
sockets * cores * threads != maxcpus'
This warning in the future will be an error and won't be possible to run
kata containers.
fixes#1605
Signed-off-by: Julio Montes <julio.montes@intel.com>
On ppc64le, qemu installed inside a snap image
is qemu-system-ppc64, but referred in config.toml
as qemu-system-ppc64le.
Fixes#467
Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
kata-runtime list command should list all valid container, not fail
when some containers information uncorrent, like rootfs not found.
Fixes: #1592
Signed-off-by: Ace-Tang <aceapril@126.com>
in wait function, should send msg to exit channel after task status has
updated, since shim.Wait() is running in another goroutine, when it
receive msg from exit channel, it will stop waiting and return, then
someone who hold this Wait() get return, it can delete task, if exit msg
is send first, the container status may still be running.
Fixes: #1600
Signed-off-by: Ace-Tang <aceapril@126.com>
Simplify qemu rpm list files using wildcard
this will help to build different qemu versions
without change all the list of files.
- Exclude not needed binaries.
Kata does not use helper binaries, and
4.0 build has a missing qemu-ga by default,
excluding files does not fail if the file exist or not.
Fixes: #464
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
The proxy is in charge to print the agent logs, but when `use_vsocks` is true
the runtime doesn't start the proxy, because it's not needed, hence the agent
logs are ignored. To mitigate this limitation and to make the debugging
processes easier, the fist shim started (the one who monitors the sandbox)
will read the console.sock and print the agent logs.
Depends-on: github.com/kata-containers/shim#172
fixes#1596
Signed-off-by: Julio Montes <julio.montes@intel.com>
Set as default AGENT_INIT=no when not explicitly set, to make it
consistent with the other scripts in osbuilder
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Change weird condition to check qemu >=3.1
Add comment explaining the malloc-trim option.
fixes#462
Signed-off-by: Julio Montes <julio.montes@intel.com>
Fix installing docker on Debian by changing the docker install guide to
ensure that only the `kata-containers.conf` systemd service snippet is
created. Previously, both the snippet and the `daemon.json` Docker
config files were being updated because the latter also specified a bash
code block.
Note that the `daemon.json` section is now consistent with the other
install guides - it just displays the JSON code to add rather than
trying to set it.
Also, added missing shell prompts, changed code blocks into shell (but
not bash) code blocks and fixed a few minor grammar and whitespace
issues.
For further details, see:
- https://github.com/kata-containers/documentation/blob/master/Documentation-Requirements.md
- https://github.com/kata-containers/tests/tree/master/cmd/kata-managerFixes#442.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
modify configure-hypervisor.sh to support Qemu 4 and enable `malloc-trim`
for memory optimization.
fixes#459
Signed-off-by: Julio Montes <julio.montes@intel.com>
Add configuration options to support the various Kata agent tracing
modes and types. See the comments in the built configuration files for
details:
- `cli/config/configuration-fc.toml`
- `cli/config/configuration-qemu.toml`
Fixes#1369.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Updated the agent vendoring for `StartTracing` and `StopTracing`. This
only changed a single file - the auto-generated gRPC protocol
buffer file.
This change resolves four vendoring issues:
- The github.com/kubernetes-incubator/cri-o project was renamed to
github.com/cri-o/cri-o. Although github redirects, `dep` complains that
it cannot find the old `github.com/kubernetes-incubator/cri-o` files
under `vendor/` so remove the old config, relying on the existing (and
in other respects identical) `dep` config.
- There was a stale dependency on `github.com/clearcontainers/proxy`
which should have been removed when the Clear Containers code was
excised.
- The latest version of the agent code vendored into the runtime prior
to this commit was a merge commit (commit
`48dd1c031530fce9bf16b0f6a7305979cedd8fc9`). This somehow confused `dep`
which did *not* correctly pull in the latest version of the
auto-generated gRPC code
(`vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go`).
This is clear because commit `48dd1c031530fce9bf16b0f6a7305979cedd8fc9`
is newer than the agent commit that introduced the `StartTracing` and
`StopTracing` APIs (`00cf907afcb7c8e56f077cf45ae3615f612fdc9d`).
Resolving the other two issues above seems to have resolved this issue
as the correct version of this file has now been included in the
vendoring, however note there is no change to the `dep` files as this
version of `agent.pb.go` should already have been included (!)
- Updating `agent.pb.go` also removed the `AddInterface` and
`RemoveInterface` API calls which should again also have been removed
already.
Updated tests to remove these redundant calls.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
- Add information about package testing pipelines
- Fix release notes command
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Using only one directory to hold kernel patches lead to
difficult maintenance. Instead use a list of patches per
kernel version.
If patches for a kernel version does not exist, dont fail.
Fixes: #308
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Add the yaml for kata RuntimeClasses. It is useful to
include this explicitly, rather than just having it in the docs.
Also, this feature has transitioned from alpha to beta from k8s 1.13
to 1.14. Hence maintain separate yamls for these versions.
Fixes#444
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Previously, the agent behaviour was controlled entirely using the
`kernel_params=` config option. This mechanism suffers from a subtle
problem - the runtime is not aware of how the agent will behave.
From now on, all significant agent options will be controlled from the
agent section in the configuration file. This allows the runtime to be
more aware of -- and in control of -- such agent settings. It would also
allow the underlying kernel CLI options to be modified in the future if
required.
This PR adds the only useful agent option as an explicit option by
adding an `enable_debug=true` option to the Kata agent section in
`configuration.toml`. This allows controlling agent debug to be handled
in the same manner as the other debug options.
This change is somewhat foundational: it permits the agent to be handled
consistently with other config file sections which is useful, but
arguably not essential (the old way worked). However, the new way of
handling agent options will be essential when introducing agent tracing
control as the runtime must be aware of the agent trace mode to allow
the runtime to modify its behaviour accordingly.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Replace the two versions of `makeRuntimeConfigFileData()` with a single
`MakeRuntimeConfigFileData()` in a new `katatestutils` package and a new
`katautils.GetDefaultHypervisorConfig()` to query the default hypervisor
details.
This isn't ideal but a new package had to be created to avoid circular
dependencies. It was also required since test code cannot be exported
from a package.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Removed the unused `KataShimConfig` type and updated an error message
that incorrectly mentioned it.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>