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

nemu: build nemu for CI#522

Merged
chavafg merged 1 commit intokata-containers:masterfrom
ganeshmaharaj:nemu-ci
May 24, 2019
Merged

nemu: build nemu for CI#522
chavafg merged 1 commit intokata-containers:masterfrom
ganeshmaharaj:nemu-ci

Conversation

@ganeshmaharaj
Copy link
Copy Markdown
Contributor

NEMU needs to be built statically as the current default release will
not work for all distros. Given we are doing that, it would be nice to
test it in our CI also the same way. This change is to aid with that.

Fixes: #521
Signed-off-by: Ganesh Maharaj Mahalingam ganesh.mahalingam@intel.com

ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request May 18, 2019
virtio-fs is now available in 1.7 release and needs hugepages enabled.
NEMU's machine_type `virt` has issues getting network access when
hugepages is enabled. Temporarily changing type to `pc` to fix this
issue. Accompanying changes to runtime and tests are underway.

Fixes: kata-containers#1709
Depends-on: kata-containers/tests#1595
Depends-on: kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request May 18, 2019
virtio-fs is now available in 1.7 release and needs hugepages enabled.
NEMU's machine_type `virt` has issues getting network access when
hugepages is enabled. Temporarily changing type to `pc` to fix this
issue. Accompanying changes to runtime and tests are underway.

Fixes: kata-containers#1709
Depends-on: github.com/kata-containers/tests#1595
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Copy link
Copy Markdown

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Hi @ganeshmaharaj - thanks for raising.

NEMU needs to be built statically as the current default release will
not work for all distros
.

Please can you explain in the commit why this is?

RUN mv /tmp/nemu-static/opt/kata/bin/qemu-system-x86_64 /tmp/nemu-static/opt/kata/bin/nemu-system-x86_64
RUN wget "${VIRTIOFSD_RELEASE}/${VIRTIOFSD}" && chmod +x ${VIRTIOFSD} && mv ${VIRTIOFSD} /tmp/nemu-static/opt/kata/bin/
RUN wget "${NEMU_OVMF}" && mv OVMF.fd /tmp/nemu-static/"${PREFIX}"/share/kata-nemu/
RUN mv /tmp/nemu-static/"${PREFIX}"/bin/qemu-system-x86_64 /tmp/nemu-static/"${PREFIX}"/bin/nemu-system-x86_64
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I appreciate you're changing what was already there, but this is a bug: NEMU is supported on arm64 too:

Any chance you could add a commit before this one to set the architecture here from a variable defined at the top?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Currently building static packages of arm64 is not working on my tests. That is definitely in the to-do list of things as a follow on just to unblock this build and make sure we test nemu + virtiofs the same way we ship. I will have a bug opened for it and work on that right after this.

@grahamwhaley
Copy link
Copy Markdown
Contributor

Quick answer to why won't a dynamically linked nemu work on all distros is, like most other dynamically linked executables (and I know you know already, but for completeness and posterity...), it is pretty much bound to the version and names of the dynamic libraries of the machine/distro it was built with - whereas the static build will carry all its requirements with it.
In the specific current case, the nemu binaries were being built on an Ubuntu machine, and I failed to get them to work on my Fedora install due to clashes of library name/versions.

@jodh-intel
Copy link
Copy Markdown

Sure. What I meant was, I think we need to explain why we cannot build it dynamically for each distro, as we do for qemu-lite, qemu-vanilla, ...

ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request May 20, 2019
virtio-fs is now available in 1.7 release and needs hugepages enabled.
NEMU's machine_type `virt` has issues getting network access when
hugepages is enabled. Temporarily changing type to `pc` to fix this
issue. Accompanying changes to runtime and tests are underway.

Fixes: kata-containers#1709
Depends-on: github.com/kata-containers/tests#1595
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
@amshinde
Copy link
Copy Markdown
Member

@ganeshmaharaj Can you address @jodh-intel's comment?
Other than that , lgtm

@ganeshmaharaj
Copy link
Copy Markdown
Contributor Author

@amshinde @jodh-intel think i got the comments addressed.

Copy link
Copy Markdown

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Based on the assumption that the architecture-specifics are removed by #524...

lgtm

@amshinde
Copy link
Copy Markdown
Member

/test

ganeshmaharaj pushed a commit to ganeshmaharaj/kata-tests that referenced this pull request May 22, 2019
Build NEMU statically for every CI run to make sure we test a setup
similar to the one we are shipping with Kata.

Fixes: kata-containers#1536
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request May 22, 2019
virtio-fs is now available in 1.7 release and needs hugepages enabled.
Updating version of NEMU that ships with kata by default which contains
the fixes for hugepages, machine_type=virt and network access.

Fixes: kata-containers#1709
Depends-on: github.com/kata-containers/tests#1595
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
NEMU releases are build dynamically on a xenial platform and there
aren't any plans on providing packaging for various versions and distros
today. NEMU needs to be built statically as the current default release
to be consumable by Kata.  Given we are doing that, it would be nice to
test it in our CI also the same way. This change is to aid with that.

Fixes: kata-containers#521
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request May 23, 2019
virtio-fs is now available in 1.7 release and needs hugepages enabled.
Updating version of NEMU that ships with kata by default which contains
the fixes for hugepages, machine_type=virt and network access.

Fixes: kata-containers#1709
Depends-on: github.com/kata-containers/tests#1595
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
@devimc
Copy link
Copy Markdown

devimc commented May 23, 2019

/test

ganeshmaharaj pushed a commit to ganeshmaharaj/kata-tests that referenced this pull request May 23, 2019
Build NEMU statically for every CI run to make sure we test a setup
similar to the one we are shipping with Kata.

Fixes: kata-containers#1536
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
@chavafg chavafg merged commit cb202e1 into kata-containers:master May 24, 2019
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request Jun 3, 2019
virtio-fs is now available in 1.7 release and needs hugepages enabled.
Updating version of NEMU that ships with kata by default which contains
the fixes for hugepages, machine_type=virt and network access.

Fixes: kata-containers#1709
Depends-on: github.com/kata-containers/tests#1595
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
(cherry picked from commit 722ac5a)
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request Jun 3, 2019
virtio-fs is now available in 1.7 release and needs hugepages enabled.
Updating version of NEMU that ships with kata by default which contains
the fixes for hugepages, machine_type=virt and network access.

Fixes: kata-containers#1709
Depends-on: github.com/kata-containers/tests#1595
Depends-on: github.com/kata-containers/packaging#522
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
(cherry picked from commit 722ac5a)
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nemu static builds to support CI

6 participants