From a2c9717ff09431f44a9c1d8db1edd68dae81b350 Mon Sep 17 00:00:00 2001 From: Petr Fedchenkov Date: Fri, 24 Jun 2022 10:53:30 +0300 Subject: [PATCH 1/3] Add test patches target to make test We have problems with patches for our images and it would be nice to have an information about problems before hitting them. So I add target test-images-patches and call it in test target. Signed-off-by: Petr Fedchenkov (cherry picked from commit b6f9eafe2bc3366c9c02899ac540eaab40c0e942) --- Makefile | 5 ++++- tools/compose-image-yml.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e243d9d6e4..9b4b6a6ae3 100644 --- a/Makefile +++ b/Makefile @@ -298,7 +298,7 @@ currentversion: .PHONY: currentversion linuxkit -test: $(GOBUILDER) | $(DIST) +test: $(LINUXKIT) test-images-patches | $(DIST) @echo Running tests on $(GOMODULE) $(QUIET)$(DOCKER_GO) "gotestsum --jsonfile $(DOCKER_DIST)/results.json --junitfile $(DOCKER_DIST)/results.xml" $(GOTREE) $(GOMODULE) $(QUIET): $@: Succeeded @@ -675,6 +675,9 @@ eve-%: pkg/%/Dockerfile build-tools $(RESCAN_DEPS) images/rootfs-%.yml.in: images/rootfs.yml.in FORCE $(QUITE)tools/compose-image-yml.sh $< $@ "$(ROOTFS_VERSION)-$*-$(ZARCH)" +images-patches := $(wildcard images/*.patch) +test-images-patches: $(images-patches:%.patch=%) + $(ROOTFS_FULL_NAME)-adam-kvm-$(ZARCH).$(ROOTFS_FORMAT): $(ROOTFS_FULL_NAME)-kvm-adam-$(ZARCH).$(ROOTFS_FORMAT) $(ROOTFS_FULL_NAME)-kvm-adam-$(ZARCH).$(ROOTFS_FORMAT): fullname-rootfs $(SSH_KEY) fullname-rootfs: $(ROOTFS_FULL_NAME)-$(HV)-$(ZARCH).$(ROOTFS_FORMAT) current diff --git a/tools/compose-image-yml.sh b/tools/compose-image-yml.sh index f53269ab86..cfd455b3fb 100755 --- a/tools/compose-image-yml.sh +++ b/tools/compose-image-yml.sh @@ -32,7 +32,7 @@ main() { local eve_version="$3" if [ -e "${out_templ_path}".patch ]; then - patch -p0 -o "${out_templ_path}".sed < "${out_templ_path}".patch + patch -p0 -o "${out_templ_path}".sed < "${out_templ_path}".patch || exit 1 else cp "${base_templ_path}" "${out_templ_path}".sed fi From e6842efe5cf144755a8fec96a7c5135e2e7303d4 Mon Sep 17 00:00:00 2001 From: Petr Fedchenkov Date: Fri, 24 Jun 2022 08:49:33 +0300 Subject: [PATCH 2/3] Fix images templates to be patchable Ensure that all templates can be applied to rootfs Signed-off-by: Petr Fedchenkov (cherry picked from commit 191c435b0d927b27379cda7cc586ebb138c13d16) --- images/rootfs-acrn.yml.in.patch | 12 ++++++------ images/rootfs-adam-kvm.yml.in.patch | 6 +++--- images/rootfs-edgeview-kvm.yml.in.patch | 13 ------------- images/rootfs-mini.yml.in.patch | 10 +++++++--- 4 files changed, 16 insertions(+), 25 deletions(-) delete mode 100644 images/rootfs-edgeview-kvm.yml.in.patch diff --git a/images/rootfs-acrn.yml.in.patch b/images/rootfs-acrn.yml.in.patch index c7264300ce..b791da143b 100644 --- a/images/rootfs-acrn.yml.in.patch +++ b/images/rootfs-acrn.yml.in.patch @@ -1,18 +1,18 @@ ---- images/rootfs.yml.in 2020-04-08 18:14:23.000000000 -0700 -+++ images/rootfs-acrn.yml.in 2020-04-08 18:22:10.000000000 -0700 +--- images/rootfs.yml.in 2022-06-24 10:36:01.021218466 +0300 ++++ images/rootfs-acrn.yml.in 2022-06-24 10:50:32.399494792 +0300 @@ -1,5 +1,5 @@ kernel: - image: KERNEL_TAG + image: ACRN_KERNEL_TAG cmdline: "rootdelay=3" init: - - linuxkit/init:v0.5 -@@ -9,7 +9,7 @@ - - linuxkit/memlogd:v0.5 + - linuxkit/init:a68f9fa0c1d9dbfc9c23663749a0b7ac510cbe1c +@@ -10,7 +10,7 @@ + - DOM0ZTOOLS_TAG - GRUB_TAG - FW_TAG - - XEN_TAG + - ACRN_TAG - GPTTOOLS_TAG - - DOM0ZTOOLS_TAG onboot: + - name: rngd diff --git a/images/rootfs-adam-kvm.yml.in.patch b/images/rootfs-adam-kvm.yml.in.patch index 721b750d73..308ebf441e 100644 --- a/images/rootfs-adam-kvm.yml.in.patch +++ b/images/rootfs-adam-kvm.yml.in.patch @@ -10,6 +10,6 @@ + - /var/persist:/persist + - /var/config:/config + command: ["/bin/eve-embedded.sh"] - - name: debug - image: DEBUG_TAG - cgroupsPath: /eve/services/debug + - name: edgeview + image: EDGEVIEW_TAG + cgroupsPath: /eve/services/eve-edgeview diff --git a/images/rootfs-edgeview-kvm.yml.in.patch b/images/rootfs-edgeview-kvm.yml.in.patch deleted file mode 100644 index 4279736bc4..0000000000 --- a/images/rootfs-edgeview-kvm.yml.in.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- images/rootfs.yml.in -+++ images/rootfs-edgeview-kvm.yml.in -@@ -30,6 +30,10 @@ services: - image: NEWLOGD_TAG - cgroupsPath: /eve/services/eve-newlog - oomScoreAdj: -999 -+ - name: edgeview -+ image: EDGEVIEW_TAG -+ cgroupsPath: /eve/services/edgeview -+ oomScoreAdj: -800 - - name: debug - image: DEBUG_TAG - cgroupsPath: /eve/services/debug diff --git a/images/rootfs-mini.yml.in.patch b/images/rootfs-mini.yml.in.patch index 156223b44b..cfbb630cab 100644 --- a/images/rootfs-mini.yml.in.patch +++ b/images/rootfs-mini.yml.in.patch @@ -1,6 +1,6 @@ ---- images/rootfs.yml.in 2021-05-13 16:54:55.000000000 -0700 -+++ images/rootfs.yml.in 2021-05-20 16:06:39.000000000 -0700 -@@ -1,67 +1,18 @@ +--- images/rootfs.yml.in 2022-06-24 08:41:44.000000000 +0300 ++++ images/rootfs-mini.yml.in 2022-06-24 08:45:15.000000000 +0300 +@@ -1,71 +1,18 @@ kernel: - image: KERNEL_TAG + image: NEW_KERNEL_TAG @@ -34,6 +34,10 @@ - image: NEWLOGD_TAG - cgroupsPath: /eve/services/newlogd - oomScoreAdj: -999 +- - name: edgeview +- image: EDGEVIEW_TAG +- cgroupsPath: /eve/services/eve-edgeview +- oomScoreAdj: -800 - name: debug image: DEBUG_TAG cgroupsPath: /eve/services/debug From b144f5059bc5eacaf0df1c9d818c6cd9c6b393fc Mon Sep 17 00:00:00 2001 From: Petr Fedchenkov Date: Tue, 28 Jun 2022 20:13:28 +0300 Subject: [PATCH 3/3] Remove separate job with report from publish We did not define matrix for report job and failing now. In general, separate jobs runs on separate runners, so it looks useless to measure options of another runner. Let remove separate report job and add another report step running always (regardless of previous errors). Signed-off-by: Petr Fedchenkov (cherry picked from commit 46887d3f63a6e7baecf7383d7ce75e7eb3d8caeb) --- .github/workflows/publish.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 97cf3c0efe..2c1671cf4c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,18 +9,6 @@ on: - "[0-9]+.[0-9]+.[0-9]+" jobs: - report: - name: Report - runs-on: ${{ matrix.os }} - steps: - - name: ref - run: echo ${{ github.ref }} - - name: event_name - run: echo ${{ github.event_name }} - - name: disk usage - run: df -h - - name: memory - run: free -m build: if: github.event.repository.full_name == 'lf-edge/eve' runs-on: ${{ matrix.os }} @@ -138,6 +126,15 @@ jobs: run: | rm -rf dist dist.xen make -e V=1 HV=mini LINUXKIT_PKG_TARGET=push eve + - name: Pre clean report + if: ${{ always() }} + run: | + echo Disk usage + df -h + echo Memory + free -m + docker system df + docker system df -v - name: Clean if: ${{ always() }} run: |