Commit b8f1a68834 ("rootfs: Simplify
code") introduced a variable called destdir but accidentally used
dest_dir with cp(1) instead. This causes kernel modules to be copied to
the wrong location.
Rename the variable to dest_dir to be consistent with module_dir and
rootfs_dir variables used in this function.
Fixes: #94
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
The `getopts` call in the rootfs builder was incorrect
meaning the `-a $agent_version` option would never have worked.
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
For now, the flag "-a" or relevant shell variant "${AGENT_VERSION}"
hasn't been used, only defined. Using 'git checkout' command to go
into requested branch.
Fixes: #90
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
We can only set disable fno-semantic-interposition if the
gcc used to build qemu is 5.3 or newer.
CentOS provides an older gcc, then we need to not enable this
option if it is the case.
Fixes#32.
Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
Remove the agent version from the output of `kata-env`. The value was
always a static string (`<<unknown>>`) because the runtime cannot
determine the agent version without creating a container.
Note that agent details, including the version, *are* displayed when
the user runs `kata-collect-data.sh`.
Fixes#310.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add details to the developer guide of how to obtain a backtrace by
sending a `SIGUSR1` signal to the component.
Fixes#70.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add brief details to the developer guide explaining that the
log parser can convert the format of the logs.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Don't fail if a new container with a CPU constraint was added to
a POD and no more vCPUs are available, instead apply the constraint
and let kernel balance the resources.
Signed-off-by: Julio Montes <julio.montes@intel.com>
There is a relation between the maximum number of vCPUs and the
memory footprint, if QEMU maxcpus option and kernel nr_cpus
cmdline argument are big, then memory footprint is big, this
issue only occurs if CPU hotplug support is enabled in the kernel,
might be because of kernel needs to allocate resources to watch all
sockets waiting for a CPU to be connected (ACPI event).
For example
```
+---------------+-------------------------+
| | Memory Footprint (KB) |
+---------------+-------------------------+
| NR_CPUS=240 | 186501 |
+---------------+-------------------------+
| NR_CPUS=8 | 110684 |
+---------------+-------------------------+
```
In order to do not affect CPU hotplug and allow to users to have containers
with the same number of physical CPUs, this patch tries to mitigate the
big memory footprint by using the actual number of physical CPUs as the
maximum number of vCPUs for each container if `default_maxvcpus` is <= 0 in
the runtime configuration file, otherwise `default_maxvcpus` is used as the
maximum number of vCPUs.
Before this patch a container with 256MB of RAM
```
total used free shared buff/cache available
Mem: 195M 40M 113M 26M 41M 112M
Swap: 0B 0B 0B
```
With this patch
```
total used free shared buff/cache available
Mem: 236M 11M 188M 26M 36M 186M
Swap: 0B 0B 0B
```
fixes#295
Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit adds the necessary spec files and scripts in order to be able to create
packages in OBS (Open Build System) and locally.
Fixes#15
Signed-off-by: Erick Cardona <erick.cardona.ruiz@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
The link to the release checklist in the Releases document was linking
to the parent document, not the separate checklist document.
Fixes#73.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Our tests CI is dependent on `gometalinter` which are run by the static
checks script. However, `gometalinter` changes a lot
and when it does, it breaks (what were) valid PRs.
Add `gometalinter` to the versions database so we can pin the version
we use to a known good one.
Fixes#304.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Added the extra packages the user requested to the summary file as
previously only the default packages were listed.
Fixes#92.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This new version of kata-agent brings support for
stats of a certain container
Short logs:
077e6f9 grpc : Add the StatsContainer api for `events cli`
d29bf53 block: Get rid of device prediction for Storage as well
3b565ad block: Use PCI address to determine block device name
Signed-off-by: Haomin <caihaomin@huawei.com>
Since we want to test under kubernetes 1.10 and we also
want to supoort latest version of Openshift, which is v3.9.0,
we need to test with with different versions of CRI-O.
K8s 1.10 should use cri-o 1.10, while openshift v3.9.0
should use v1.9
Depends-on: github.com/kata-containers/tests#277
Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
Reduce the virtcontainers prefix path to avoid hitting the 107 byte
Unix domain socket path limit.
Related #268.
Fixes#290.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
A Unix domain socket is limited to 107 usable bytes on Linux. However,
not all code creating socket paths was checking for this limits.
Created a new `utils.BuildSocketPath()` function (with tests) to
encapsulate the logic and updated all code creating sockets to use it.
Fixes#268.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
An empty string for an environment variable simply means that the
variable is unset. Do not error out if the env value is empty.
Fixes#288
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This new version of kata-agent brings support for
updating resources and cpuset cgroups
Shortlog:
28cf91a grpc: implement update command
d96b8e1 grpc: update cpuset cgroup
4bcacdc network: Don't remove network routes or DNS when destroying sandbox
1f5cf20 network: Don't store the network info as pointers if slices used
8f828bb uevent: Fix netlink error while assigning pid in netlink client
093f61b agent: add grpc tracer UT
33bd601 agent: add server interceptor to log grpc requests
134d5d5 test: add start/stop grpc server UT
7e94246 agent: track grpc server
9fb8024 UT: add tests for channel
bea6183 agent: wait serial channel to be ready before reading
f8c8c4c agent: accept grpc connections multiple times
Signed-off-by: Julio Montes <julio.montes@intel.com>
Update command is used to update container's resources at run time.
All constraints are applied inside the VM to each container cgroup.
By now only CPU constraints are fully supported, vCPU are hot added
or removed depending of the new constraint.
fixes#189
Signed-off-by: Julio Montes <julio.montes@intel.com>