Commit Graph

12951 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
6c5c293f81 obs: scripts: Set bash options (refactor)
Add long name bash options.

Make xtrace optional when DEBUG variable is set.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-14 14:00:36 -05:00
Rob Bradford
d8f80cafe3
Merge pull request #36 from rbradford/use-context-for-launch
qemu: Use the supplied context.Context for launching
2018-08-14 18:11:35 +01:00
Rob Bradford
2706a07be5 qemu: Use the supplied context.Context for launching
This will kill the process when the context is cancelled. As using a nil
context is not permitted it is necessary to substitute with a real
context if it is not initialised in the Config struct.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2018-08-14 15:09:49 +01:00
Graham Whaley
dd2acd26eb
Merge pull request #565 from jodh-intel/support-opentracing
tracing: Add initial opentracing support
2018-08-14 10:32:52 +01:00
Sebastien Boeuf
24ee4be532
Merge pull request #32 from amshinde/add-share-rw
disk: Add --share-rw option for hotplugging disks
2018-08-13 14:44:28 -07:00
Mark Ryan
c202f5d0ba
Merge pull request #30 from xindazhao/gpu-vfio-mdev
qemu/qmp: add vfio mediated device support
2018-08-13 22:07:21 +01:00
Archana Shinde
2b7cba2253
Merge pull request #211 from nitkon/patch-1
architecture.md: Bump Kata Version to 1.2.0, add pseries info.
2018-08-13 10:27:03 -07:00
Jose Carlos Venegas Munoz
1659d4ace7 obs: pkglib: get_obs_pkg_release: Allow find release number in empty repo.
If we can not find a release number in a file this means
it is an new repository. This could happend when upload changes
for a new brach.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-13 12:21:45 -05:00
Graham Whaley
0f5e37cf9f
Merge pull request #134 from nitkon/broken_link
snap: Fix broken link in README
2018-08-13 17:36:24 +01:00
Eric Ernst
f512a087f3
Merge pull request #132 from nitkon/patch-2
snap-build: Fix a typo in README
2018-08-13 07:33:55 -07:00
Graham Whaley
8b69c75144 cli: kata-env: add runtime path to output
`kata-env` did not include the path to the runtime exe itself.
Add that into the Runtime section.

Fixes: #577

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-08-13 14:08:02 +01:00
Nitesh Konkar
d30b523c9f snap: Fix broken link in README
The Integration with docker link in
README is broken. Fix it.

Fixes: #133

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-13 17:01:35 +05:30
Nitesh Konkar
25dfe4ad69 architecture.md: Bump Kata Version to 1.2.0, add pseries info.
Since there have not been any major architecture changes
in Kata Containers since 1.0 release, bump version to latest
1.2.0 release. Also, add another supported machine type
"pseries" for IBM Power Systems. A typo is also fixed in this
commit.

Fixes #210

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-13 15:07:36 +05:30
Nitesh Konkar
25278f9c64 snap-build: Refactor and fix a typo in README
The #usage part of README talks about
cross building snap images for all "supported
architectures" not "supported images".

Also fold the "Usage" part into "Cross-build
snap images" section.

Fixes: #131

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-13 14:57:00 +05:30
Graham Whaley
f23ddb7600
Merge pull request #130 from nitkon/patch-1
snap: Improve README
2018-08-13 09:59:51 +01:00
Gabriela Cervantes
2341d753e2 docs: Add installation guide for SLES
This will add the installation guide for SLES.

Fixes #85

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2018-08-13 02:14:52 -05:00
nitkon
35c1632c2b
snap: Improve README
Improve README by pointing to a specific sub-section 
in runtime repo that actually talks about the possibility 
of having multiple configurations files.

Fixes: #129

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-11 20:14:22 +05:30
Julio Montes
6cea1e14be
Merge pull request #128 from nitkon/snapcraft
snapcraft.yaml: Use the correct powerpc kernel config name
2018-08-10 13:38:19 -05:00
James O. D. Hunt
3a1bbd0271 tracing: Add initial opentracing support
Add initial support for opentracing by using the `jaeger` package.
Since opentracing uses the `context` package, add a `context.Context`
as the first parameter to all the functions that we might want to
trace. Trace "spans" (trace points) are then added by extracting the
trace details from the specified context parameter.

Notes:

- Although the tracer is created in `main()`, the "root span"
  (aka the first trace point) is not added until `beforeSubcommands()`.

  This is by design and is a compromise: by delaying the creation of the
  root span, the spans become much more readable since using the web-based
  JaegerUI, you will see traces like this:

  ```
  kata-runtime: kata-runtime create
  ------------  -------------------
       ^                ^
       |                |
  Trace name        First span name
                    (which clearly shows the CLI command that was run)
  ```

  Creating the span earlier means it is necessary to expand 'n' spans in
  the UI before you get to see the name of the CLI command that was run.
  In adding support, this became very tedious, hence my design decision to
  defer the creation of the root span until after signal handling has been
  setup and after CLI options have been parsed, but still very early in
  the code path.

  - At this stage, the tracing stops at the `virtcontainers` call
  boundary.

- Tracing is "always on" as there doesn't appear to be a way to toggle
  it. However, its resolves to a "nop" unless the tracer can talk to a
  jaeger agent.

Note that this commit required a bit of rework to `beforeSubcommands()`
to reduce the cyclomatic complexity.

Fixes #557.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-08-10 16:13:48 +01:00
Sebastien Boeuf
4220a7a9be
Merge pull request #564 from nitkon/error_message
cli: Make message of using initrd OR rootfs clearer
2018-08-10 07:36:44 -07:00
Graham Whaley
5a500c95f0
Merge pull request #125 from nitkon/master
lib.sh: install_yq fails on ppc64le
2018-08-10 15:35:59 +01:00
James O. D. Hunt
0ede467256 tests: Add cli.Context helper functions
Created two new helper functions to create a `cli.Context` with and without a
`cli.App`.

Calling these functions simplifies a lot of test code.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-08-10 15:25:00 +01:00
James O. D. Hunt
41d1c14c68 tests: Move assert closer to function call
Move a test assertion which seemed to have become separated from its
correct location.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-08-10 15:25:00 +01:00
Sebastien Boeuf
800369d58a
Merge pull request #574 from jodh-intel/update-dep-lock-file-format
vendor: Update dep lock file for new format
2018-08-10 07:17:14 -07:00
Mark Ryan
f3ab90f21b
Merge pull request #35 from rbradford/rtc-valid-tweak
qemu: Do not try and generate invalid RTC parameters
2018-08-10 15:11:15 +01:00
Rob Bradford
e46092e03a qemu: Do not try and generate invalid RTC parameters
If no RTC is specified in the config then do not generate any RTC command line
options. RTC command line options are optional for QEMU so make Valid() return
false when presented with the empty version of the RTC struct containing empty
strings.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2018-08-10 14:54:22 +01:00
Nitesh Konkar
d009421e17 snapcraft.yaml: Use the correct powerpc kernel config name
Kernel building fails as part of "make snap" as
the kernel config file is renamed from ppc64le_kata_kvm_4.14.x
to powerpc_kata_kvm_4.14.x

Fixes:  #127

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-10 19:16:03 +05:30
Nitesh Konkar
63a9b2291e lib.sh: install_yq fails on ppc64le
install_yq() has no arch entry for
ppc64le and hence installing yq
fails on Power systems.

Fixes: #124

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-10 18:25:10 +05:30
Nitesh Konkar
bee8d66ead cli: Make message of using initrd OR rootfs clearer
When starting a kata container, if both initrd and rootfs
are provided in the configuration file then the error message
presented is "cannot specify an image and an initrd in
configuration file" which might be a bit confusing. This
fix makes the error message more explicit.

Fixes:  #563

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-10 17:38:18 +05:30
James O. D. Hunt
d9fa73c054 vendor: Update dep lock file for new format
NOP update that simply updates the file format of the `dep` `Gopkg.lock`
file to the latest format.

Note: `dep ensure` run using `dep` at commit
6b79ccc405.

Fixes #573.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-08-10 09:03:50 +01:00
Zhao Xinda
fcaf61dcb1 qemu/qmp: add vfio mediated device support
In addition to normal VFIO device, this patch adds VFIO mediated device
as a supplement to do hot plug on PCI(E) bridges.

Signed-off-by: Zhao Xinda <xinda.zhao@intel.com>
2018-08-10 12:43:22 +08:00
Sebastien Boeuf
66e05e7d13
Merge pull request #507 from amshinde/error-out-host-net
network: Error out when host-networking is requested
2018-08-09 16:12:00 -07:00
Archana Shinde
2f3f375b88 network: Error out when host-networking is requested
Instead of continuing with the network setup, we should detect
if host network namespace was requested and error out early.

Fixes #499

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-08-09 14:50:58 -07:00
Sebastien Boeuf
aedd749168
Merge pull request #562 from nitkon/master
virtcontainers: ppc64le: Add nvdimm to defaultQemuMachineOption
2018-08-09 14:44:01 -07:00
Eric Ernst
7705d68f7d
Merge pull request #99 from devimc/snap/multiArch
snap: cross-build snap images
2018-08-09 07:35:15 -07:00
Julio Montes
a8a4e15951 snap-build: implement system to cross-build snap images
Add scripts to cross-build snap images for all supported
architectures using virtual machines

fixes #98

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-08-09 09:14:31 -05:00
Julio Montes
f9aef172be snap: support arm and ppc architectures
Use `arch` to identify qemu architecture instead of hardcoding it.

fixes #91

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-08-09 09:14:06 -05:00
Graham Whaley
e863e55cdb
Merge pull request #559 from sboeuf/enable_virt_machine_type
virtcontainers: qemu: x86: Support "virt" machine type
2018-08-09 09:19:26 +01:00
Graham Whaley
e2dc90c2e7
Merge pull request #122 from jcvenegas/fix-tag.sh
tag_repos.sh: fix typo
2018-08-09 09:15:03 +01:00
Nitesh Konkar
ef3a7e80c6 virtcontainers: ppc64le: Add nvdimm to defaultQemuMachineOption
nvdimm is fundamental to get rootfs approach
working for Kata Containers on ppc64le. It should
be added to the default qemu machine option list.

Fixes: #561

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-09 11:36:48 +05:30
Archana Shinde
4461c459a3 disk: Add --share-rw option for hotplugging disks
With qemu 2.10, a write lock was added for qcow images that
prevents the same image to be passed more than once.
This can be over-ridden using the --share-rw option which is
desired for raw images.

This solves an issue with running Kata with devicemapper
using the privileged mode as in this case all devices on the host
are passed to the container using the block device associated
with the rootfs, causing it to be passed twice to qemu.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-08-08 14:48:02 -07:00
Sebastien Boeuf
ef74bc533d virtcontainers: qemu: x86: Support "virt" machine type
In order to start playing with the "virt" machine type for Kata,
we need this new machine type to be part of the list of supported
machines for qemu on x86 architecture.

Fixes #558

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-08-08 14:30:26 -07:00
Jose Carlos Venegas Munoz
eb10d79fa8 tag_repos.sh: fix typo
Fix variable name that breaks the script when creating releases.

Fixes: #121

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-08 14:40:00 -05:00
Sebastien Boeuf
301ea5e989
Merge pull request #34 from devimc/topic/addrBusVsock
qemu/qmp: add addr and bus to hotplug vsock devices
2018-08-08 08:44:09 -07:00
Julio Montes
685199980d qemu/qmp: add addr and bus to hotplug vsock devices
For machines types based on PCIe like q35, device addr and bus must be specified.
For machines types based on PCI like pc, device addr must be specified and bus
is optional since devices can be hot plugged directly on the root bus.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-08-08 09:53:09 -05:00
Sebastien Boeuf
eda239928b
Merge pull request #33 from caoruidong/hotplug-by-fds
qemu/qmp: add function for hotplug network by fds
2018-08-08 07:49:07 -07:00
James O. D. Hunt
6c81e212db
Merge pull request #208 from nitkon/master
Dev-guide: Kernel build fails on ppc64le
2018-08-08 15:43:29 +01:00
Graham Whaley
ae14163ca2
Merge pull request #146 from jcvenegas/1.2.0-branch-bump
# Kata Containers 1.2.0
2018-08-08 14:45:18 +01:00
Graham Whaley
0bcb32f704
Merge pull request #555 from jcvenegas/1.2.0-branch-bump
# Kata Containers 1.2.0
2018-08-08 14:40:08 +01:00
Ruidong Cao
10efa84132 qemu/qmp: add function for hotplug network by fds
Implement function to hotplug a network device to QEMU by fds.
Macvtap can only be hotplug by this way.

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-08-08 11:12:47 +08:00