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

Update collect script for dax nvdimm images #1405

Conversation

jodh-intel
Copy link
Contributor

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 #1404.

[1] - kata-containers/osbuilder#236

Signed-off-by: James O. D. Hunt [email protected]

Add an extra check in the data collection script to ensure partitions
are found in the image.

Signed-off-by: James O. D. Hunt <[email protected]>
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 <[email protected]>
@jodh-intel
Copy link
Contributor Author

Sample output of the changed collect script section (note the last line):

Image details

---
osbuilder:
  url: "https://github.com/kata-containers/osbuilder"
  version: "unknown"
rootfs-creation-time: "2019-03-20T17:20:21.431783008+0000Z"
description: "osbuilder rootfs"
file-format-version: "0.0.2"
architecture: "x86_64"
base-distro:
  name: "Clear"
  version: "28400"
  packages:
    default:
      - "iptables-bin"
      - "libudev0-shim"
      - "systemd"
    extra:

agent:
  url: "https://github.com/kata-containers/agent"
  name: "kata-agent"
  version: "1.6.0-rc2-a41f322af869fddbed252f51dbcde04076594db5"
  agent-is-init-daemon: "no"
dax-nvdimm-header: "true"

@jodh-intel
Copy link
Contributor Author

/cc @devimc.

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

@grahamwhaley
Copy link
Contributor

Not sure if it is worth running the CI on this..

@devimc
Copy link

devimc commented Mar 21, 2019

/test

@devimc
Copy link

devimc commented Mar 21, 2019

thanks @jodh-intel

@jodh-intel jodh-intel merged commit 0d14673 into kata-containers:master Mar 22, 2019
devimc pushed a commit to devimc/kata-runtime that referenced this pull request Mar 28, 2019
The rootfs image was fixed, now the DAX metadata and 2 MBRs headers are part
of the same image. Mounting the rootfs partiton with an offset of 2M is no
more needed, since the first MBR is read by `partx` or `losetup` by default.

fixes kata-containers#1443

Signed-off-by: Julio Montes <[email protected]>
devimc pushed a commit to devimc/kata-runtime that referenced this pull request May 22, 2019
The rootfs image was fixed, now the DAX metadata and 2 MBRs headers are part
of the same image. Mounting the rootfs partiton with an offset of 2M is no
more needed, since the first MBR is read by partx or losetup by default.

fixes kata-containers#1443

Signed-off-by: Julio Montes [email protected]
GabyCT added a commit that referenced this pull request May 23, 2019
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request Jun 3, 2019
The rootfs image was fixed, now the DAX metadata and 2 MBRs headers are part
of the same image. Mounting the rootfs partiton with an offset of 2M is no
more needed, since the first MBR is read by partx or losetup by default.

fixes kata-containers#1443

Signed-off-by: Julio Montes [email protected]
(cherry picked from commit 82e51d4)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request Jun 4, 2019
The rootfs image was fixed, now the DAX metadata and 2 MBRs headers are part
of the same image. Mounting the rootfs partiton with an offset of 2M is no
more needed, since the first MBR is read by partx or losetup by default.

fixes kata-containers#1443

Signed-off-by: Julio Montes [email protected]
(cherry picked from commit 82e51d4)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
ganeshmaharaj pushed a commit to ganeshmaharaj/kata-runtime that referenced this pull request Jun 4, 2019
The rootfs image was fixed, now the DAX metadata and 2 MBRs headers are part
of the same image. Mounting the rootfs partiton with an offset of 2M is no
more needed, since the first MBR is read by partx or losetup by default.

fixes kata-containers#1443

Signed-off-by: Julio Montes [email protected]
(cherry picked from commit 82e51d4)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
katabuilder pushed a commit to katabuilder/runtime that referenced this pull request Jun 5, 2019
- Backports for 1.7.1

a480f27 fc-toml: remove proxy section in config
b798c28 shimv2: Close vhostfd after vm get vhostfd
8c199e2 network: delete IP addrs on bridge model to prevent ARP conflict
7c7da54 kata_proxy: Open a special goroutine do cmd.Wait
fb2a995 qemu: stop qemu process when virtiofsd quits
52f0193 qemu: print virtiofsd logs when debug is on
0199d89 versions: Update golang to 1.11.10
58f7eea versions: Update CRI-O version to 1.14.1
feddee0 virtcontainers: Set correct Shmsize for ppc64le
a268c66 nemu-config: Add machine_type to config file
97cf3c9 nemu-config: fix nemu for ci
2c444f3 data/kata-collect-data: support kata containers snap
a0c413a shimv2: remove use containerd ns as netns
9661586 shimv2: shutdown the sandbox when sandbox container exited
eb75d0c shimv2: kill a container return directly once the container termianted
a98871e shimv2: fix the issue of passing the wrong container id
ad4b07d data: Revert pull request kata-containers#1405
5eecdae cache: Call vm.Disconnect() when close vm
6434414 kata_proxy: Set Setsid to true when exec kata-proxy
3cb6316 runtime : delete redundant code in CreateContainer
0a46998 ci: Build kata-runtime before running static checks

Signed-off-by: katacontainersbot <[email protected]>
katabuilder pushed a commit to katabuilder/runtime that referenced this pull request Jun 5, 2019
- fc-toml: remove proxy section in config
- virtcontainers: support vm factory in QEMU 4
- docs: Fix spelling and formatting
- runtime: Enable file based backend
- runtime : delete redundant code in CreateContainer
- data/kata-collect-data: support kata containers snap
- shimv2: Improve shim shutdown logic
- Fix the issue that ctrl-c stop vmcache server will stop all     containers that its VM is created by it
- virtcontainers: kill hypervisor if startSandbox fails
- data: Revert pull request kata-containers#1405
- nemu: update nemu version
- versions: Update cri-containerd  yaml
- shimv2: remove use containerd ns as netns
- fix the issue of hypervisor process is killed by kubelet
- ci: Build kata-runtime before running static checks
- virtcontainers: Set test qemu version for unit test
- shim v2: Close vhostfd after vm get vhostfd
- Add missing docs
- agent: fix agent debug console
- virtcontainers: Set correct Shmsize for ppc64le
- nemu-config: Add machine_type to config file
- katautils: don't mask systemd units
- Add virtiofsd log and fix qemu hang due to virtiofsd vq setup failure
- versions: Update golang to 1.11.10
- kata_proxy: Open a special goroutine do cmd.Wait
- versions: Update CRI-O version to 1.14.1
- network: delete IP addrs on bridge model to prevent ARP conflict

bbe5584 fc-toml: remove proxy section in config
b780c16 virtcontainers: support vm factory in QEMU 4
bdae295 runtime : delete redundant code in CreateContainer
1af68aa docs: Fix spelling and formatting
eabfd99 shimv2: Improve shim shutdown logic
a41894d runtime: Enable file based backend
722ac5a nemu-config: fix nemu for ci
590ed09 vendor: update gogo/protobuf, containerd and agent vendors
7bf6c67 cache: Call vm.Disconnect() when close vm
19115ef kata_proxy: Set Setsid to true when exec kata-proxy
82e51d4 data: Revert pull request kata-containers#1405
f301c95 shimv2: shutdown the sandbox when sandbox container exited
d6b3bff shimv2: remove use containerd ns as netns
0d535f5 shimv2: kill a container return directly once the container termianted
19288aa data/kata-collect-data: support kata containers snap
0d98e24 ci: Build kata-runtime before running static checks
5e1f5ca shimv2: fix the issue of passing the wrong container id
f7cc028 vc:Execute TestQemuPPC64leMemoryTopology depending on qemu version
7381cd5 agent: fix agent debug console
b203fdb versions: Update cri-containerd  yaml
6be5e5f nemu-config: Add machine_type to config file
1789b65 virtcontainers: Set correct Shmsize for ppc64le
d66d855 katautils: don't mask systemd units
89e0dfa qemu: stop qemu process when virtiofsd quits
d0aae80 qemu: print virtiofsd logs when debug is on
c22b15d versions: Update golang to 1.11.10
f89834a virtcontainers: avoid unnecessary error checking in startVM
a27a3e7 virtcontainers: kill hypervisor if startSandbox fails
5d527d7 versions: Update CRI-O version to 1.14.1
071030b shimv2: Close vhostfd after vm get vhostfd
da2749c docs: Add missing docs
1563263 docs: Simplify link
bdb1047 network: delete IP addrs on bridge model to prevent ARP conflict
00d03c1 kata_proxy: Open a special goroutine do cmd.Wait

Signed-off-by: katacontainersbot <[email protected]>
katabuilder pushed a commit to katabuilder/runtime that referenced this pull request Jun 5, 2019
- fc-toml: remove proxy section in config
- virtcontainers: support vm factory in QEMU 4
- docs: Fix spelling and formatting
- runtime: Enable file based backend
- runtime : delete redundant code in CreateContainer
- data/kata-collect-data: support kata containers snap
- shimv2: Improve shim shutdown logic
- Fix the issue that ctrl-c stop vmcache server will stop all     containers that its VM is created by it
- virtcontainers: kill hypervisor if startSandbox fails
- data: Revert pull request kata-containers#1405
- nemu: update nemu version
- versions: Update cri-containerd  yaml
- shimv2: remove use containerd ns as netns
- fix the issue of hypervisor process is killed by kubelet
- ci: Build kata-runtime before running static checks
- virtcontainers: Set test qemu version for unit test
- shim v2: Close vhostfd after vm get vhostfd
- Add missing docs
- agent: fix agent debug console
- virtcontainers: Set correct Shmsize for ppc64le
- nemu-config: Add machine_type to config file
- katautils: don't mask systemd units
- Add virtiofsd log and fix qemu hang due to virtiofsd vq setup failure
- versions: Update golang to 1.11.10
- kata_proxy: Open a special goroutine do cmd.Wait
- versions: Update CRI-O version to 1.14.1
- network: delete IP addrs on bridge model to prevent ARP conflict

bbe5584 fc-toml: remove proxy section in config
b780c16 virtcontainers: support vm factory in QEMU 4
bdae295 runtime : delete redundant code in CreateContainer
1af68aa docs: Fix spelling and formatting
eabfd99 shimv2: Improve shim shutdown logic
a41894d runtime: Enable file based backend
722ac5a nemu-config: fix nemu for ci
590ed09 vendor: update gogo/protobuf, containerd and agent vendors
7bf6c67 cache: Call vm.Disconnect() when close vm
19115ef kata_proxy: Set Setsid to true when exec kata-proxy
82e51d4 data: Revert pull request kata-containers#1405
f301c95 shimv2: shutdown the sandbox when sandbox container exited
d6b3bff shimv2: remove use containerd ns as netns
0d535f5 shimv2: kill a container return directly once the container termianted
19288aa data/kata-collect-data: support kata containers snap
0d98e24 ci: Build kata-runtime before running static checks
5e1f5ca shimv2: fix the issue of passing the wrong container id
f7cc028 vc:Execute TestQemuPPC64leMemoryTopology depending on qemu version
7381cd5 agent: fix agent debug console
b203fdb versions: Update cri-containerd  yaml
6be5e5f nemu-config: Add machine_type to config file
1789b65 virtcontainers: Set correct Shmsize for ppc64le
d66d855 katautils: don't mask systemd units
89e0dfa qemu: stop qemu process when virtiofsd quits
d0aae80 qemu: print virtiofsd logs when debug is on
c22b15d versions: Update golang to 1.11.10
f89834a virtcontainers: avoid unnecessary error checking in startVM
a27a3e7 virtcontainers: kill hypervisor if startSandbox fails
5d527d7 versions: Update CRI-O version to 1.14.1
071030b shimv2: Close vhostfd after vm get vhostfd
da2749c docs: Add missing docs
1563263 docs: Simplify link
bdb1047 network: delete IP addrs on bridge model to prevent ARP conflict
00d03c1 kata_proxy: Open a special goroutine do cmd.Wait

Signed-off-by: katacontainersbot <[email protected]>
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.

3 participants