The versions of modules and headers should be same with vmlinuz, so give kernel_version a default value and delete soft link modules.cgz and headers.cgz in $nfsroot/boot, they are redundant.
Signed-off-by: Xu Xijian hdxuxijian@163.com --- src/lib/job.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 4bef329..fc27c5c 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -46,6 +46,7 @@ class Job os_version: "20.03", lkp_initrd_user: "latest", docker_image: "centos:7", + kernel_version: "4.19.90-2003" }
def initialize(job_content : JSON::Any, id) @@ -312,7 +313,7 @@ class Job
private def set_kernel_version boot_dir = "#{SRV_OS}/#{os_dir}/boot" - suffix = "-#{kernel_version}" if self["kernel_version"]? + suffix = "-#{kernel_version}" self["linux_vmlinuz_path"] = File.real_path("#{boot_dir}/vmlinuz#{suffix}") if "#{os_mount}" == "initramfs" self["linux_modules_initrd"] = File.real_path("#{boot_dir}/modules#{suffix}.cgz")
On Thu, Nov 19, 2020 at 04:22:23PM +0800, Xu Xijian wrote:
The versions of modules and headers should be same with vmlinuz, so give kernel_version a default value and delete soft link modules.cgz and headers.cgz in $nfsroot/boot, they are redundant.
Signed-off-by: Xu Xijian hdxuxijian@163.com
src/lib/job.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 4bef329..fc27c5c 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -46,6 +46,7 @@ class Job os_version: "20.03", lkp_initrd_user: "latest", docker_image: "centos:7",
- kernel_version: "4.19.90-2003"
Better leave "kernel_version" empty and check fs symlink for the default. Otherwise we'll end up writing a lot of default kernel_version numbers in scheduler code, which is obviously inflexible (hard coding config with code).
May also need take care of this situation: end user only specified "os" and does not specify "os_version". We should have different defaults for different OS.
Thanks, Fengguang
On Thu, Nov 19, 2020 at 04:56:15PM +0800, Wu Fengguang wrote:
On Thu, Nov 19, 2020 at 04:22:23PM +0800, Xu Xijian wrote:
The versions of modules and headers should be same with vmlinuz, so give kernel_version a default value and delete soft link modules.cgz and headers.cgz in $nfsroot/boot, they are redundant.
Signed-off-by: Xu Xijian hdxuxijian@163.com
src/lib/job.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 4bef329..fc27c5c 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -46,6 +46,7 @@ class Job os_version: "20.03", lkp_initrd_user: "latest", docker_image: "centos:7",
- kernel_version: "4.19.90-2003"
Better leave "kernel_version" empty and check fs symlink for the default. Otherwise we'll end up writing a lot of default kernel_version numbers in scheduler code, which is obviously inflexible (hard coding config with code).
May also need take care of this situation: end user only specified "os" and does not specify "os_version". We should have different defaults for different OS.
Thanks, Fengguang
Oh yes, I ignored it before.
Thanks, Xijian