From 5dd9b75dc37b61f12fb3966a7150a1eec9354f44 Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Fri, 17 Dec 2021 15:01:22 +0800 Subject: [PATCH] Upgrade LAT to latest version Integrate 2 important fixes: a) genimage: process SIGTERM signal gracefully (f215b627e3a5) It introduces a new variable "debootstrap-mirror" to set the source of debootstrap instead of picking a source from package_feeds randomly. b) genimage: add yaml params debootstrap-mirror for external debian (ec3758936b3f) It fixes a bug of build-image after terminating previous build-image, and change to handle the signal.SIGTERM. The error message is: ==================== build-image - DEBUG: Update /localdisk/deploy/lat.yaml to add packages latc - INFO: build request handled by server rm: cannot remove './rootfs/proc/523189/gid_map': Operation not permitted rm: cannot remove './rootfs/proc/523189/projid_map': Operation not permitted rm: cannot remove './rootfs/proc/523189/setgroups': Operation not permitted rm: cannot remove './rootfs/proc/523189/timers': Operation not permitted rm: cannot remove './rootfs/proc/523189/timerslack_ns': Operation not permitted rm: cannot remove './rootfs/proc/523189/patch_state': Operation not permitted rm: cannot remove './rootfs/proc/523189/arch_status': Operation not permitted appsdk - ERROR: Generate sub initramfs failed ==================== Test Plan: a) Testcase 1 Pass: successfully build-image, and the debootstrap is fed by the "debootstrap-mirror". Pass: successfully install test Pass: successfully boot test b) Testcase 2 Pass: sucessfully build-image after terminating previous build-image. $build-image $ctrl+c $latc stop $build-image Story: 2008846 Task: 44194 Signed-off-by: Chen Qi Signed-off-by: Yue Tao Change-Id: I7f1b9a743d6fc0018d2e7347fbd38eddc5913b12 --- debian-mirror-tools/config/debian/common/base-bullseye.yaml | 1 + .../config/debian/common/base-initramfs-bullseye.yaml | 1 + stx/dockerfiles/stx-lat-tool.Dockerfile | 2 +- stx/toCOPY/lat-tool/lat/latd | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian-mirror-tools/config/debian/common/base-bullseye.yaml b/debian-mirror-tools/config/debian/common/base-bullseye.yaml index bb9e040d5..88046b29e 100644 --- a/debian-mirror-tools/config/debian/common/base-bullseye.yaml +++ b/debian-mirror-tools/config/debian/common/base-bullseye.yaml @@ -5,6 +5,7 @@ image_type: - iso - ostree-repo - ustart +debootstrap-mirror: http://ftp.cn.debian.org/debian package_feeds: [] package_type: external-debian wic: diff --git a/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml index 9b6b0504d..8c3ec66df 100644 --- a/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml +++ b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml @@ -3,6 +3,7 @@ name: debian-initramfs-ostree-image machine: intel-x86-64 image_type: - initramfs +debootstrap-mirror: http://ftp.cn.debian.org/debian package_feeds: - deb http://ftp.cn.debian.org/debian bullseye main contrib package_type: external-debian diff --git a/stx/dockerfiles/stx-lat-tool.Dockerfile b/stx/dockerfiles/stx-lat-tool.Dockerfile index b2ab7ff44..709a75d2e 100644 --- a/stx/dockerfiles/stx-lat-tool.Dockerfile +++ b/stx/dockerfiles/stx-lat-tool.Dockerfile @@ -16,7 +16,7 @@ FROM debian:bullseye MAINTAINER Chen Qi -ARG LAT_BINARY_RESOURCE_PATH=http://mirror.starlingx.cengn.ca/mirror/lat-sdk/lat-sdk-20211013 +ARG LAT_BINARY_RESOURCE_PATH=http://mirror.starlingx.cengn.ca/mirror/lat-sdk/lat-sdk-20211216 # Install necessary packages RUN apt-get -y update && apt-get --no-install-recommends -y install \ diff --git a/stx/toCOPY/lat-tool/lat/latd b/stx/toCOPY/lat-tool/lat/latd index 5114c3bcb..e70daa4a0 100755 --- a/stx/toCOPY/lat-tool/lat/latd +++ b/stx/toCOPY/lat-tool/lat/latd @@ -147,7 +147,7 @@ class LATD(object): channel.mark_client_message_valid(True) # stop action should always succeed if self.child_pid > 0: - os.kill(self.child_pid, signal.SIGKILL) + os.kill(self.child_pid, signal.SIGTERM) self.child_pid = 0 self.latest_build_status = "fail" msg_latd = {}