Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

ci: add specfic image-type for aarch64#462

Merged
sboeuf merged 1 commit intokata-containers:masterfrom
Pennyzct:versions
Jul 9, 2018
Merged

ci: add specfic image-type for aarch64#462
sboeuf merged 1 commit intokata-containers:masterfrom
Pennyzct:versions

Conversation

@Pennyzct
Copy link
Contributor

@Pennyzct Pennyzct commented Jul 4, 2018

default image-type(aka clearlinux) couldn't work in aarch64, so we add specifc image-type to avoid jenkins set-up failure.

Fixes: #461

Signed-off-by: Penny Zheng [email protected]
Signed-off-by: Jianyong Wu [email protected]

@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 162287 KB
Proxy: 4574 KB
Shim: 8800 KB

Memory inside container:
Total Memory: 2045968 KB
Free Memory: 2007228 KB

@codecov
Copy link

codecov bot commented Jul 4, 2018

Codecov Report

Merging #462 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #462   +/-   ##
======================================
  Coverage    64.1%   64.1%           
======================================
  Files          87      87           
  Lines        8885    8885           
======================================
  Hits         5696    5696           
  Misses       2577    2577           
  Partials      612     612

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2bec33...67de5d4. Read the comment docs.

@jcvenegas
Copy link
Member

lgtm, I think would be nice to follow image-type-x86_64 to follow the same conversion. But that can be done in a follow up PR because will need to modify CI scripts as well.

versions.yaml Outdated
release: "20640"
meta:
image-type: "clearlinux"
image-type-aarch64: "fedora"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Pennyzct - thanks for raising this. I think you've hit on a limitation of the current structure of this file. As such, I think we could expand it to something like the following:

diff --git a/versions.yaml b/versions.yaml
index d616dc0..4d88730 100644
--- a/versions.yaml
+++ b/versions.yaml
@@ -76,18 +76,34 @@ assets:
       Root filesystem disk image used to boot the guest virtual
       machine.
     url: "https://github.com/kata-containers/osbuilder"
-    release: "20640"
+    architecture:
+      arm64:
+        name: "fedora"
+        version: "latest"
+      ppc64le:
+        name: "centos"
+        version: "latest"
+      x86_64:
+        name: &default-image-name "clearlinux"
+        version: "20640"
     meta:
-      image-type: "clearlinux"
+      image-type: *default-image-name
 
   initrd:
     description: |
       Root filesystem initrd used to boot the guest virtual
       machine.
     url: "https://github.com/kata-containers/osbuilder"
-    meta:
-      base-os: "alpine"
-      os-version: "3.7"
+    architecture:
+      arm64:
+        name: &default-initrd-name "alpine"
+        version: &default-initrd-version "3.7"
+      ppc64le:
+        name: *default-initrd-name
+        version: *default-initrd-version
+      x86_64:
+        name: *default-initrd-name
+        version: *default-initrd-version
 
   kernel:
     description: "Linux kernel optimised for virtual machines"

Note the "references" or anchors in the above so that we can still use the query below:

$ yq read versions.yaml assets.image.meta.image-type
clearlinux

That will ensure we don't break https://github.com/kata-containers/tests/blob/master/.ci/install_kata_image.sh#L98.

Note that in the diff above I've deleted assets.image.release as that doesn't appear to be used - could you confirm @jcvenegas, @chavafg? That value does "reappear" as assets.image.architecture.x86_64.version but since https://github.com/kata-containers/osbuilder/blob/master/rootfs-builder/clearlinux/config.sh#L9 specifies a default of "default", I wonder if we can change it here too? wdyt @jcvenegas, @chavafg?

Finally, note that I've applied the same structure change to the initrd section. @jcvenegas - can you confirm that the two elements I deleted and replaced with a new structure (assets.initrd.meta.base-os and assets.initrd.meta.os-name) are not used?

/cc @nitkon, @grahamwhaley.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a template for all involved arch😊.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jodh-intel Clear Linux is a distro changes a lot every day. We probably will hit some issues if we follow their latest release all the time. I'd prefer we dont follow latest automatically.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point - let's stick with a specific version for Clear Linux then.

as default image-type and initrd weren't for non-x86_64 arch,
reconstructuring them to be architecture-specific.

Fixes: kata-containers#461

Signed-off-by: Penny Zheng <[email protected]>
Signed-off-by: Jianyong Wu <[email protected]>
Signed-off-by: James O. D. Hunt <[email protected]>
@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 163043 KB
Proxy: 4589 KB
Shim: 9143 KB

Memory inside container:
Total Memory: 2045968 KB
Free Memory: 2007212 KB

@Pennyzct
Copy link
Contributor Author

Pennyzct commented Jul 9, 2018

ptal 😊@jodh-intel @jcvenegas

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Adding multiple Signed-off-by is always a little strange, and I suspect you may have added @jodh-intel SoB yourself, which unless he added one before, you should probably not do...
but, I don't think is really an issue here... so we can still merge.

@devimc
Copy link

devimc commented Jul 9, 2018

lgtm

Approved with PullApprove

@sboeuf
Copy link

sboeuf commented Jul 9, 2018

@jodh-intel will be off for 2 weeks, let's merge this without waiting for his feedback here.

@sboeuf sboeuf merged commit f084384 into kata-containers:master Jul 9, 2018
Pennyzct added a commit to Pennyzct/tests that referenced this pull request Jul 11, 2018
patch kata-containers#462(kata-containers/runtime#462)
has been restructured under upstream review, so refining image-type
to follow change.

Fixes: kata-containers#472

Signed-off-by: Penny Zheng <[email protected]>
@jodh-intel
Copy link

\o/ - nice! ;)

@sboeuf sboeuf added the enhancement Improvement to an existing feature label Sep 12, 2018
@sboeuf
Copy link

sboeuf commented Sep 12, 2018

@egernst clearly not a breaking change, but not a bug fix either. Should we backport it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants