build: check golang version meets min req.#806
build: check golang version meets min req.#806WeiZhang555 merged 3 commits intokata-containers:masterfrom
Conversation
|
Replaces #762 |
|
Oh, this has hit the same struct align issue as #744 @jodh-intel - did we have a plan? |
|
Hi @grahamwhaley - you can steal my fix from #744 for the lint issues but the reason my PR is failing seems to be because cri-containerd's tests don't yet work with the new version of golang :( We could help them fix, but it isn't high up my priority list I'm afraid. |
|
@jodh-intel thanks for the info. Hmm, I suspect both our PRs are going to sit for a short while then until we/somebody can fix up the cri-containerd tests :-( but, at least we found that before merging! |
|
Thanks @grahamwhaley and @jodh-intel for the picking up! This looks good to me, except that CI doesn't agree with me 😃 |
|
Adding dnm till cri tests are fixed. |
|
@grahamwhaley I submitted a fix to cri-containerd that has been merged in master: containerd/cri#941 I am not sure which version of cri we are using, we can consider applying that patch till it becomes part of a release. |
|
The cri-containerd version information is in |
|
OK, let me see if I can bump that version. But, the patch from @amshinde (btw, thank you! ;-) ) is not in a release yet, and I suspect may not be for some time (hard to tell) - so, I'll have to see if our yaml maybe supports pinning to a commit version. |
|
It should do, yes. |
|
/test |
|
Looks like we need to add What's the recommended way there @jodh-intel @chavafg - do I try to add it into the .travis.yml or somehow tie it into |
|
Hmm, and strange osbuilder fail on 16.04initrd: and seems to have hit the no-nesting issue on 16.04 image. |
|
and.... seems I blew the line length check for the meta description in the versions.yaml. spinning again... |
91b98f3 to
44fd7e5
Compare
|
/test |
|
I had a look at the Travis item. They show using apt in the before_script:
-sudo add-apt-repository ppa:rmescandon/yq
-sudo apt update
-sudo apt install yq -y
...Thoughts @jodh-intel @chavafg ? I'm ready to add that patch to this PR and spin it... |
fwiw there's a |
Codecov Report
@@ Coverage Diff @@
## master #806 +/- ##
=========================================
Coverage ? 65.66%
=========================================
Files ? 87
Lines ? 10798
Branches ? 0
=========================================
Hits ? 7090
Misses ? 3002
Partials ? 706 |
44fd7e5 to
ed694f8
Compare
|
/test |
|
@grahamwhaley, about the travis failure, it's failing because |
|
@grahamwhaley ping :) |
ed694f8 to
b318759
Compare
|
Updated. rebased to pick up the relevant golang version.yaml changes. Bumped the known max version from 1.11 to 1.11.1. Moved the travis apt |
|
@grahamwhaley Travis still failing, you need to add the |
b318759 to
48b8f50
Compare
|
Thanks @marcov . A quick surf says that |
|
Well, I guess that didn't fly - try again... |
48b8f50 to
6ef5b21
Compare
|
/me starts to wave arms..... |
|
@grahamwhaley hehe trusty is quite old (2014), could we bump the travis config to xenial or bionic (they are both LTS)? |
|
Yep, I vote we try to bump Travis, presuming a newer version is available. This feels like a new PR to me which I'm happy to try as a pre-cursor to getting this PR landed on day. |
|
Unluckily we are still stuck in 2014: travis-ci/travis-ci#9460 |
|
Wow, ouch. mumble 😿 Well, much though I'd like to say we will move off of Travis, I don't think that is happening right now (but, I think that was just another nail in the coffin ⚰️ |
|
@grahamwhaley, I'd suggest adding a |
We need to have `yq` installed before we can 'make', as we now use it for a version check in the build. But, we may not have golang installed. Add a script that installs `yq` via curl'ing from the github releases. This was cloned from the function in the tests repo .ci scripts that perform the same action. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
Install `yq` before running the tests. The Makefile now uses `yq` to check the golang version against the versions file. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
Check that the system golang version is new enough to build with according to the data from the `versions.yaml` file. Update the verions in the versions.yaml accordingly, and add a note describing what the 'newest-version' item represents. Note, we only do a minimum requirement check, and are not checking against the 'newest-version' info from the yaml. Fixes: kata-containers#148 Inspired-by: Wei Zhang <zhangwei555@huawei.com> Idea-by: James O. D. Hunt <james.o.hunt@intel.com> Signed-off-by: Graham Whaley <graham.whaley@intel.com>
6ef5b21 to
95f4fdb
Compare
|
/me hacks up a script, and fires off travis again - I will not be surprised if this gives me something that still needs to be fixed up. |
|
Golly, travis seems to have passed! |
|
Centos 7.4 CI failed in a strange manner - I'll nudge a rebuild.... |
|
@jodh-intel @WeiZhang555 PTAL and merge if you're fine with this :) |
|
Since it was probably copied from #762, note that the issue number in the commit is incorrect. Anyone know what it should be? |
For docker in docker scenario, the nested container created
has entry "b *:* m" in the list of devices it is allowed to access
under /sys/fs/cgroup/devices/docker/{ctrid}/devices.list.
This entry was causing issues while starting a nested container
as we were denying "m" access to the rootfs block devices.
With this change we add back "m" access, the container would be
allowed to create a device node for the rootfs device but will
not have read-write access to the created device node.
This fixes the docker in docker use case while still making sure
the container is not allowed read/write access to the rootfs.
Note, this could also be fixed by simply skipping {"Type : "b"}
while creating the device cgroup with libcontainer.
But this seems to be undocumented behaviour at this point,
hence refrained from taking this approach.
Fixes kata-containers#806
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Check that the system golang version is new enough to build with
according to the data from the
versions.yamlfile.Update the verions in the versions.yaml accordingly, and add a note
describing what the 'newest-version' item represents.
Note, we only do a minimum requirement check, and are not checking
against the 'newest-version' info from the yaml.
Fixes: #148
Inspired-by: Wei Zhang zhangwei555@huawei.com
Idea-by: James O. D. Hunt james.o.hunt@intel.com
Signed-off-by: Graham Whaley graham.whaley@intel.com