image-builder: fill out device namespace information into kata image#236
image-builder: fill out device namespace information into kata image#236jodh-intel merged 6 commits intokata-containers:masterfrom
Conversation
|
/test |
| @@ -0,0 +1,171 @@ | |||
| /* | |||
| * Copyright(c) 2013-2019 Intel Corporation. All rights reserved. | |||
There was a problem hiding this comment.
yep, copy&paste from NVDIMM driver
| mv "${tmp_img}" "${IMAGE}" | ||
| # Set metadata header | ||
| gcc -O2 "${script_dir}/nsdax.c" -o "${script_dir}/nsdax" | ||
| "${script_dir}/nsdax" "${IMAGE}" "${IMG_HEADER_SZ_B}" "${IMG_HEADER_SZ_B}" |
There was a problem hiding this comment.
Random thought: I wonder if there would be any value in adding info to osbuilder.yaml for kata-collect-data.sh to use?
| * Copyright(c) 2013-2019 Intel Corporation. All rights reserved. | ||
| * | ||
| * This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of version 2 of the GNU General Public License as |
There was a problem hiding this comment.
Just mentioning that the license for this file (GPL-2.0) is different to the license for the containing osbuilder repo project (Apache-2.0).
/cc @grahamwhaley.
There was a problem hiding this comment.
Good pick up. IANAL, but I believe as long as you are not linking this to any of our (apache2) code (and I think you are not), then you are probably good.
This file local license will I think over-rule the top level license. I don't know if we have to say something at the top level about 'some files may be under a different license' now though.
Overall, if you can confirm you are not linking this against any apache2 code, then I'm not going to worry about it.
Some attribution somewhere about where the code came from might be good if we did not add one already..
There was a problem hiding this comment.
I confirm, I'm not linking this against any apache2 code
There was a problem hiding this comment.
It would be interesting to discuss if we wanted to switch our LICENSE files to use the Debian machine readable copyright file format since that handles this sort of scenario nicely:
d4981a3 to
1737068
Compare
|
@jodh-intel CI is not happy and the workaround is ... ? |
|
@devimc - hmm, well you've hit a new scenario - 1st file in one of our repos that originated elsewhere. Aside from introducing that machine-readable copyright file (which I'm liking more and more now ;-) I just mentioned (which would allow the CI to intelligently filter out files like this), I'm not sure. We can't add a different license but how do we retain the check for the majority of other files? For speed, we could either hack the CI script to special-case this file. But how about instead we do one of the following:
|
|
@devimc - thinking about this a bit more, how about the following:
So for your new file, we could create a wdyt @chavafg, @egernst, @grahamwhaley, @sboeuf? But for the really quick solution, I think you can use a hack: Move the file to the following location since "vendored" files are ignored! :-): |
|
In this specific case, I quite favor a one off hack or force merge. If we do get more and more files coming into the repos then I think we can discuss better workarounds. Let's not add a slew of complication to fix a problem that doesn't yet exist... |
|
@devimc - can you move the file to the |
87e4b52 to
166d3d6
Compare
|
|
@jodh-intel please take a look kata-containers/tests#1280 |
|
Our CI is waaaaay too clever! 😆 |
7ee7204 to
d840a5a
Compare
|
/test |
|
Euleros mirrors are down |
|
@devimc, @chavafg, @marcov - as we continue to have problems with EulerOS due to mirror speed / availability (#46), and as it sounds like this cannot be resolved, I wonder if we should just disable it entirely for the CI. Something like: diff --git a/tests/test_config.sh b/tests/test_config.sh
index 4e76274..7b4c8b4 100644
--- a/tests/test_config.sh
+++ b/tests/test_config.sh
@@ -6,9 +6,9 @@
# List of distros not to test, when running all tests with test_images.sh
typeset -a skipWhenTestingAll
-if [ -n "${TRAVIS:-}" ]; then
- # (travis may timeout with euleros, see:
- # https://github.com/kata-containers/osbuilder/issues/46)"
+if [ -n "${CI:-}" ]; then
+ # CI tests may timeout with euleros, see:
+ # https://github.com/kata-containers/osbuilder/issues/46"
skipWhenTestingAll+=(euleros)
fiThat way, it would still be used locally, but would not block our CI. |
|
/cc @jcvenegas. |
|
Yes, I agree with the change @jodh-intel |
jcvenegas
left a comment
There was a problem hiding this comment.
Thanks for doing this, one comment related on the process about build it.
| # copy final image | ||
| mv "${tmp_img}" "${IMAGE}" | ||
| # Set metadata header | ||
| gcc -O2 "${script_dir}/nsdax.gpl.c" -o "${script_dir}/nsdax" |
There was a problem hiding this comment.
Not necesary for this PR but I wonder if could create a separate makefile target for this, and would be really useful would be
make
make install DESDIR
then check in this scritpt if this binary exist, it does run it.
I ask because fedora is packaging osbuilder scripts today. So I dont want to compile this at post install.
|
/test |
|
CI's are failing with: |
|
/test |
|
CI is failing because the latest kernel is not installed, we need this change kata-containers/packaging#385 in this pr 😢 |
|
/test |
|
depends on #243 |
dnf and rmp data are not needed in the final rootfs, removing them we save 2MB of disk Signed-off-by: Julio Montes <julio.montes@intel.com>
guest kernel needs 64 bytes of DRAM per 4K page of emulated PMEM, hence the image size should be as small as possible to reduce the container's memory footprint. The image size is recalculated automatically if it's too small to contain the rootfs. Signed-off-by: Julio Montes <julio.montes@intel.com>
$/${} is unnecessary on arithmetic variables. [SC2004]
Signed-off-by: Julio Montes <julio.montes@intel.com>
Rootfs data must be sync'd after copying it into the image to avoid data corruption Signed-off-by: Julio Montes <julio.montes@intel.com>
gcc is required to build the binary in charge to fill out the device namespace information (matadata) into the kata containers image. Signed-off-by: Julio Montes <julio.montes@intel.com>
The new NVDIMM driver implementation (kernel >= 4.16) needs to know the device namespace information to map pages, this metadata is read from the nvdimm namespace at 4k offset. fixes kata-containers#235 Signed-off-by: Julio Montes <julio.montes@intel.com>
|
/test |
osbuilder recently added the ability to create images with a DAX/NVDIMM header [1], however this change broke the data collection script. Update that script to handle images with and without this header. The data collection script will now assume a header is present. However, if it fails to find the required partition data, it will try again, this time assuming the image does not have a DAX/NVDIMM header. Fixes kata-containers#1404. [1] - kata-containers/osbuilder#236 Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The new NVDIMM driver implementation (kernel >= 4.16) needs to know the device
namespace information to map pages, this metadata is read from the nvdimm
namespace at 4k offset.
fixes #235