Commit Graph

4961 Commits

Author SHA1 Message Date
James O. D. Hunt
64e2ca35dd logging: Reset external loggers when cid+sid available
Once `containerID` and `sandboxID` fields are available, re-register
the logger with the external packages to ensure they too display these
important fields.

Fixes #467.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 14:49:58 +01:00
James O. D. Hunt
03d4d4937c logging: Add function to handle external loggers
Created a new `setExternalLogger()` which sets (or resets) the logger
used by the external packages which allow a logger to be specified.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 14:48:43 +01:00
James O. D. Hunt
79e8da0675 create: Remove redundant logging code
Don't add the container ID as a log fields as it is already a field
(added on #453).

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 14:47:19 +01:00
James O. D. Hunt
793a22083c qemu: Pass sandboxID to agent for logging purposes
Add a kernel command-line option that the agent can read to determine
the sandbox ID of the VM. It can use this to create a `sandbox=` log
field for improved log analysis.

Fixes #465.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 13:50:06 +01:00
James O. D. Hunt
c556f1853f
Merge pull request #186 from nitkon/master
dev-guide: Mention distro support for ppc64le for rootfs creation
2018-07-04 13:45:22 +01:00
Nitesh Konkar
26d747fba9 dev-guide: Add note for rootfs platform-distro matrix
Fixes: #185

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-07-04 17:45:15 +05:30
Graham Whaley
49ac33ec5c
Merge pull request #137 from nitkon/comp-matrix
docs: Add Platform-Compatibility matrix
2018-07-04 13:11:07 +01:00
Nitesh Konkar
1e5e915f5a docs: Add Platform-Compatibility matrix
Fixes: #136

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-07-04 15:51:07 +05:30
Graham Whaley
94508c5af4
Merge pull request #80 from jcvenegas/os-builder-tag
tag_repos: Make sure osbuilder is updated.
2018-07-04 09:30:55 +01:00
Graham Whaley
67e7ba3584
Merge pull request #126 from jcvenegas/run-not-add-go
rootfs: docker: Reduce build time by not reinstalling go
2018-07-04 09:17:08 +01:00
Jose Carlos Venegas Munoz
25e9f01fb2 rootfs: docker: Reduce build time by not reinstalling go
Using docker we always add (ADD) the go tarball. But we can avoid do it
all the time if we install Go using RUN dockerfile instruction.

Use RUN to avoid repeat steps already done in dockerfile.

Fixes: #125

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-03 13:30:04 -05:00
Jose Carlos Venegas Munoz
b9b9410b83
Merge pull request #135 from jodh-intel/ci-add-make-for-ubuntu
CI: Install make on Ubuntu
2018-07-03 10:38:42 -05:00
James O. D. Hunt
abb559d52c CI: Install make on Ubuntu
Fix CI build failures on Ubuntu 16.04 due to `make` not being installed
before the static check script runs by:

- Installing make explicitly on Ubuntu.
- Moving the static-check script after the package install setup phase.

Fixes #134.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-03 14:30:52 +01:00
Julio Montes
7a88a7c887
Merge pull request #119 from jcvenegas/1.1.0-branch-bump
# Kata Containers 1.1.0
2018-07-02 11:05:16 -05:00
Julio Montes
bf1cf684f5
Merge pull request #437 from jcvenegas/1.1.0-branch-bump
# Kata Containers 1.1.0
2018-07-02 11:04:53 -05:00
Jose Carlos Venegas Munoz
36cc400656 release: Kata Containers 1.1.0
- versions: Update cri-o to fix race condition test.
- network: Add test for VhostUserEndpoint Attach()
- logging: Add containerID and sandboxID to all log calls
- versions: Update kernel to version 4.14.51
- network: Use pointer for VhostUserNetDevice for Attach
- [RFC] makefile: honor DESTDIR flag.
- cli: kata-check if SMT is off on POWER8 systems
- virtcontainer : sconstification of constifiable vars
- ci: Fix static checks call.
- kata_agent: fix connection race
- test: supplement test cases for kata-check and kata-env in Arm64
- qemu: clean up qmp channel
- sandbox: expose share sandbox pidns setting
- versions: update supported docker version
- cli: add no-pivot flag to be compatible with docker in ramdisk
- virtcontainers : fix shared dir resource remaining
- docs: update debug runtime link
- Versions: Add CNI plugins version
- network: Always bind back physical interfaces
- subsystem: cli
- docs: fix invalid urls
- shm: Create shared /dev/shm
- docs: Fix invalid URLs
- CI: Enable Travis-CI for linux-ppc64le
- Fix golint ppc64le issues and eventually Travis-CI
- cpuinfo/arm64: Refine CPUInfo in Arm64
- docs: Update README with Power Support
- ppc64le: Restrict maxmem to avoid HTAB allocation failure
- make sure kataAgent/createContainer can decode old specs.Spec
- arch/arm64: Fix ARM64 build
- virtcontainers: Remove unnecessary kernel parameters for ppc64le
- Enable Kata container on ppc64le arch
- unittest: tiny fix for incorrect parameters
- Update the README.md so showing that containerd is supported
- Fix pause-remove container
- virtcontainers/api: use RW lock to update containers
- Share pid namespace
- config: Show which config file loaded

150bcaf network: Add test for VhostUserEndpoint Attach()
aeea3f6 versions: Update cri-o to fix racy test.
a3ce121 logging: Add containerID and sandboxID to all log calls
510b333 network: Use pointer for VhostUserNetDevice for Attach
44c8901 versions: Update kernel to version 4.14.51
f890ffd cli: kata-check if SMT is off on POWER8 systems
9d709cd ci: Fix static checks call.
ee33245 kata_agent: fix connection race
f2096f1 test: supplement test cases for kata-check and kata-env in Arm64
39bc5ab makefile: honor DESTDIR flag.
2b94252 sandbox: expose share sandbox pidns setting
8f329db qemu: clean up qmp channel
2d65499 virtcontainer: sconstification of constifiable vars
6b496e4 cli: add no-pivot flag to be compatible with docker in ramdisk
59adb6e versions: update supported docker version
8a6d383 virtcontainers : fix shared dir resource remaining
deaf1e3 docs: update debug runtime link
50579d0 Versions: Add CNI plugins version
a31dd49 cni: Use the vendored version of CNI plugins to install binaries
0806dcc network: Drop mounted parameter in call to deleteNetNS
f2d9632 network: Always bind back physical interfaces
45d0816 docs: fix invalid urls
7069045 subsystem: cli
c2397a0 CI: Enable Travis-CI for x86 linux and linux-ppc64le
d6b956a cli: Add kata-check_ppc64le_test file
4824669 cli: Fix TestCheckCLIFunctionFail failure on ppc64le
bb0488e virtcontainers: Fix comment causing golint issue
4d470e5 shm: Create shared /dev/shm
92470fb docs: Fix invalid URLs
44b9950 docs: Update README with Power Support
7757dce cpuinfo/arm64: Refine CPUInfo in Arm64
3b20aeb ppc64le: Restrict maxmem to avoid HTAB allocation failure
2796b19 virtcontainers: Remove unnecessary kernel parameters for ppc64le
6e161a2 arch/arm64: Fix ARM64 build
9a0434d virtcontainers: make kataAgent/createContainer can decode old specs.Spec
c10db01 unittest: tiny fix for incorrect parameters
ca9f571 subsystem: docs
df05b2c cli: fix pause-remove container
b99cadb virtcontainers: add pause and resume container to the API
e14eab0 runtime: Add testcases for ppc64le and arm64
12e4dbe cli: Leverage the new support for ppc64le
baa553d virtcontainers: Get qemu suppport for ppc64le
4276c0c virtcontainers/cli: refactor code
7d435b8 virtcontainers/api: use RW lock to update containers
704d713 test: Fix tests to include pause/resume api changes
d885782 namespace: Check if pid namespaces need to be shared
6d391c4 vendor: Vendor in agent protocol changes.
054a8ce config: Show which config file loaded

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-02 09:38:04 -05:00
Jose Carlos Venegas Munoz
e31149077f release: Kata Containers 1.1.0
- image-builder: require root earlier for better error messages
- builder: support proxy in distros based on yum or dnf
- tests: Update kata-manager command
- CI: Fix static-checks script invocation
- Support building centos-rootfs on Arm64
- rootfs: add '-rm' to delete intermediate container
- Update README: Fix a minor space issue
- rootfs: correct rootfs script deference var value
- CI: use yum for resolving centos dependencies
- tests: Test generated images and initrd's (+ cleanups)
- rootfs: Default to host architecture
- Image require systemd
- rootfs: copy kernel modules to correct location
- rootfs: Add extra packages to summary file
- rootfs.sh: Add "${AGENT_VERSION}"/"-a" functionality
- kata/osbuilder: Add support for multiple GOPATH directories
- image-builder: fix "paratition" typo
- docs: Add a Usage section
- refactor and create a summary file inside the image

7b1bbac image-builder: require root earlier for better error messages
52d015e builder: support proxy in distros based on yum or dnf
43a2ea4 tests: Run EulerOS tests last
7b581c2 tests: Convert bats test to shell script
5b9b69a tests: Update kata-manager command
547c477 CI: Fix static-checks script invocation
0451db9 rootfs-builder: Support building centos-rootfs on Arm64
e86380a rootfs: add '-rm' to delete intermediate container
11d1d07 docs: Update README, Fix a minor space issue
7015535 CI: Install epel-repositories for centos
9f84cc8 CI: Install bats from sources
6c8c60d CI: use yum for resolving centos dependencies
a81e771 rootfs: correct rootfs script deference var value
4ae6d31 tests: Test generated images and initrd's
340d7b2 tests: Rename function for brevity
3a8da5f tests: Pass parameters to functions
c8e7f42 tests: Remove stale rootfs tree
1c251bd tests: Move osbuilder metadata var to top
c69eb00 tests: Make all globals readonly
aeb5947 tests: Don't pass size option to image builder
60e1e7b tests: cleanup bats tests
c1d22f9 rootfs: Default to host architecture
aca45c5 image: Require systemd
171eceb image: Use variable for referring to init
fd8d9bd rootfs: copy kernel modules to correct location
7732e04 rootfs: Fix incorrect getopts call
f7f2672 rootfs:  Add "${AGENT_VERSION}"/"-a" functionality
3151f35 rootfs: Add extra packages to summary file
c3ac718 rootfs: Add support for multiple GOPATH directories
32aee00 image-builder: fix "paratition" typo
3c19ea4 docs: Add a Usage section
3e0e112 docs: Move TOC to top
f90f652 rootfs: Create a summary file inside the image
93b632c lib: Check rootfs parameter
b14d117 image-builder: Fix incorrect error message
ddb71e8 initrd: Remove mention of USE_DOCKER
f17b5c2 scripts/lib: Fix whitespace
5b6ced5 rootfs/clearlinux: Resolve version
a2a6562 rootfs: Simplify code
b8f1a68 rootfs: Simplify code
f09d4c4 rootfs: Check function parameters
2751de0 rootfs: Reformat functions
48b1dda rootfs: Fix comments
019a80f refactor: Move more functions to script library
a18753b refactor: Remove duplicate variable
f3e89d3 refactor: Simplify enabling debug

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-02 09:37:19 -05:00
Salvador Fuentes
91cb94eff8
Merge pull request #454 from jcvenegas/crio-update
versions: Update cri-o to fix race condition test.
2018-07-02 08:18:39 -05:00
Graham Whaley
9f649c4979
Merge pull request #456 from amshinde/test-vhost-user-attach
network: Add test for VhostUserEndpoint Attach()
2018-07-02 10:07:08 +01:00
Archana Shinde
150bcafc20 network: Add test for VhostUserEndpoint Attach()
Fixes #455

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-06-29 17:57:31 -07:00
Jose Carlos Venegas Munoz
aeea3f6fa4 versions: Update cri-o to fix racy test.
Some test were CI test were failing due to a race condition.

Update cri-o repository to have a stable CI.

Update K8s to latest stable version

Depends-on: github.com/kata-containers/tests#462

Fixes: #435

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-29 15:35:06 -05:00
Archana Shinde
b7e3997bc1
Merge pull request #453 from jodh-intel/logger-add-cid+sid
logging: Add containerID and sandboxID to all log calls
2018-06-29 08:47:44 -07:00
Nitesh Konkar
22f04db80d travis: Enable travis ci for ppc64le
Fixes: #122

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-06-29 21:15:43 +05:30
Stefan Hajnoczi
a7bafc53c9 initrd-builder: make initrd_builder.sh idempotent
If initrd_builder.sh fails partway through it may not be possible to run
it again without creating a new rootfs.

This happens because initrd_builder.sh checks for the presence of
/sbin/init and refuses to run if it is missing.  Later on, the script
moves /sbin/init to /init, where the kernel expects to find it in an
initramfs.  After this step initrd_builder.sh will refuse to run again
since /sbin/init is now missing.

Create a symlink from /init to /sbin/init instead of moving the file.
This allows initrd_builder.sh to be run repeatedly on the same rootfs.

Fixes: #130
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-06-29 15:08:56 +01:00
James O. D. Hunt
4064a4ccb7
Merge pull request #128 from stefanha/image-builder-early-root-check
image-builder: require root earlier for better error messages
2018-06-29 08:38:17 +01:00
Jose Carlos Venegas Munoz
89f7b5eca0 tag_repos: Make sure osbuilder is updated.
Make sure the osbuilder VERSION file is updated before tag

Also, sort repos alphabetically.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-28 20:37:47 -05:00
Stefan Hajnoczi
7b1bbac600 image-builder: require root earlier for better error messages
The image_builder.sh script must be run as root.  The following check is
performed before the script checks for root:

  [ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/usr/bin/${AGENT_BIN}" ] || \
      die "/usr/bin/${AGENT_BIN} is not installed in ${ROOTFS}
      use AGENT_BIN env variable to change the expected agent binary name"

The -x test is "True if the file is executable by you".  It may evaluate
to true as root and false as non-root, depending on the file
permissions.

The permissions for kata-agent given in the Developer Guide are 0550
(https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#add-a-custom-agent-to-the-image---optional).

Therefore image_builder.sh fails with "/usr/bin/${AGENT_BIN} is not
installed" when run as non-root.  This is confusing since the agent
binary is really installed!

Move the root check to the beginning of the script.  This solves the
confusing error and prevents similar problems where the script doesn't
take into account that the user may be non-root.

Fixes: #127
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-06-28 14:16:26 +01:00
James O. D. Hunt
a3ce12179f logging: Add containerID and sandboxID to all log calls
Adding cid+sid fields to the log entries generated by most of the CLI
commands will make debugging across the system easier.

Fixes #452.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-06-28 10:37:51 +01:00
Sebastien Boeuf
93775487c8
Merge pull request #421 from jcvenegas/kernel-4.14.50
versions: Update kernel to version 4.14.51
2018-06-27 11:00:14 -07:00
James O. D. Hunt
4f1519ec64
Merge pull request #447 from amshinde/use-pointer-vhost-user-net
network: Use pointer for VhostUserNetDevice for Attach
2018-06-27 10:01:38 +01:00
Archana Shinde
510b3338d4 network: Use pointer for VhostUserNetDevice for Attach
Use pointer here since api.VhostUserDevice interface is implemented
by VhostUserNetDevice pointer.

Fixes #446

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-06-26 23:39:53 -07:00
Archana Shinde
2b27ddc738
Merge pull request #402 from jcvenegas/destdir
[RFC] makefile: honor DESTDIR flag.
2018-06-26 15:45:27 -07:00
Jose Carlos Venegas Munoz
44c890176c versions: Update kernel to version 4.14.51
Update to kernel to get latest fixes.

Depends-on: github.com/kata-containers/agent#279

Fixes: #420

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-26 16:14:46 -05:00
Jose Carlos Venegas Munoz
ac0c29012f
Merge pull request #124 from devimc/dockerfile/supportProxy
builder: support proxy in distros based on yum or dnf
2018-06-26 10:52:43 -05:00
Julio Montes
52d015e283 builder: support proxy in distros based on yum or dnf
proxy server must be specified in configuration file
of the package manager, /etc/yum.conf for yum or
/etc/dnf/dnf.conf for dnf

fixes #123

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-06-26 10:17:07 -05:00
Graham Whaley
5a6b541caf
Merge pull request #398 from nitkon/master
cli: kata-check if SMT is off on POWER8 systems
2018-06-26 09:05:30 +01:00
zhangwei_cs
2f1bf58b08
Merge pull request #424 from jiulongzaitian/const
virtcontainer : sconstification of constifiable vars
2018-06-26 15:30:38 +08:00
fupan
9155412b24 api: To watch the vm console in FetchSandbox api
When do sandbox release, the kataBuiltInProxy will
be closed, and it will stop the watch of vm's console;
Thus it needs to restart the proxy to monitor the vm
console once to restore the sandbox.

Fixes: #441

Signed-off-by: fupan <lifupan@gmail.com>
2018-06-26 08:04:33 +08:00
Salvador Fuentes
ae5b40ab88
Merge pull request #114 from jodh-intel/kata-manager-update
tests: Update kata-manager command
2018-06-25 17:49:58 -05:00
Nitesh Konkar
f890ffdaf7 cli: kata-check if SMT is off on POWER8 systems
SMT must be turned off on Power8 for KVM to work. Put
this as a check for kata-runtime kata-check.

Fixes: #397

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-06-25 19:40:05 +05:30
James O. D. Hunt
43a2ea4155 tests: Run EulerOS tests last
The EulerOS repository servers can be a little slower to respond than
others. This can lead to timeout issues so move the EulerOS tests to
the end to give the other tests a chance to run.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-06-25 15:06:52 +01:00
James O. D. Hunt
7b581c25d8 tests: Convert bats test to shell script
The tests perform a lot of configuration and call other commands. Since
the tests are running under BATS, any "stdout pollution" results in the
test failing. This is too rigid for current purposes so convert the
BATS test into a `set -e` test. This will still fail if any command
fails, but does not impose the output pollution restriction. It also
makes debugging easier.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-06-25 15:06:49 +01:00
James O. D. Hunt
5b9b69a4b7 tests: Update kata-manager command
The `kata-manger.sh` utility is changing its behaviour so that
`install-packages` *only* installs packages (no container manager).
Update the command to both install Docker and the packages.

Fixes #113.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-06-25 14:03:56 +01:00
Graham Whaley
8e577c19d6
Merge pull request #121 from jodh-intel/fix-static-checks
CI: Fix static-checks script invocation
2018-06-25 13:56:03 +01:00
James O. D. Hunt
547c477f4e CI: Fix static-checks script invocation
The `static-checks.sh` script now requires the repo as an argument.

Fixes #120.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-06-25 11:51:02 +01:00
Sebastien Boeuf
e0c6702790
Merge pull request #172 from sboeuf/update_docs
docs: svc-mesh: Create some documentation about service mesh
2018-06-22 16:06:05 -07:00
Salvador Fuentes
47caba8370
Merge pull request #439 from jcvenegas/ci-static-fix
ci: Fix static checks call.
2018-06-22 17:41:37 -05:00
Sebastien Boeuf
daac13b1d5 docs: svc-mesh: Create some documentation about service mesh
This commit introduces the instructions to be able to run trendy
service mesh Istio and Conduit with Kata Containers. It provides
a bit of feedback on how they actually work to give the reader a
quick overview. After this introduction, it provides restrictions
and instructions to enable them with Kata Containers.

Fixes #171

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-06-22 15:41:01 -07:00
GabyCT
2f2be68d1e
Merge pull request #180 from chavafg/topic/static-checks
CI: update static-checks.sh call
2018-06-22 15:47:20 -05:00
Jose Carlos Venegas Munoz
9d709cd726 ci: Fix static checks call.
The script now has new options.

Add options to make CI work.

Fixes: #438

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-22 15:42:10 -05:00