[Why] In 'job.yaml The 'os_version' should use quotation marks around the value, converted to a string type. Otherwise we use 'os_version: 6.10', The submit will get error.
wcl@crystal ~/my_yaml% cat iperf.yaml os: centos os_arch: aarch64 os_version: 6.10 os_mount: cifs
wcl@crystal ~/my_yaml% submit iperf.yaml submit_id=983c3605-03e2-4e8f-8ac4-c78325463fde submit iperf.yaml failed, got job id=0, error: Error resolving real path of '/srv/os/openeuler/aarch64/6.1/boot/vmlinuz': No such file or directory
Signed-off-by: Wang Chenglong 18509160991@163.com --- sbin/submit | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/sbin/submit b/sbin/submit index a6f0cd387..993e27f96 100755 --- a/sbin/submit +++ b/sbin/submit @@ -147,6 +147,10 @@ ARGV.each do |jobfile| jobs['tbox_group'] = tbox_group(jobs['testbox']) if jobs.include?('testbox') jobs['node_roles'] ||= 'server client' if jobs['cluster'] jobs['submit_id'] = submit_id + jobs['os_version'].is_a?(String) || ( + puts "Please use quotation marks around value: os_version: '#{jobs['os_version']}'" + exit + ) jobs.each_jobs do |job| raise 'Please configure SCHED_HOST' unless job['SCHED_HOST'] raise 'Please configure SCHED_PORT' unless job['SCHED_PORT']
这个不一定出错的。所以最好是在submit以字符串处理命令行 os_version=xxx 在调度器做OS存在性检察。如果OS不存在,那么给一个错误类型的提示。
On Thu, Mar 04, 2021 at 03:18:34PM +0800, Wang Chenglong wrote:
[Why] In 'job.yaml The 'os_version' should use quotation marks around the value, converted to a string type. Otherwise we use 'os_version: 6.10', The submit will get error.
wcl@crystal ~/my_yaml% cat iperf.yaml os: centos os_arch: aarch64 os_version: 6.10 os_mount: cifs
wcl@crystal ~/my_yaml% submit iperf.yaml submit_id=983c3605-03e2-4e8f-8ac4-c78325463fde submit iperf.yaml failed, got job id=0, error: Error resolving real path of '/srv/os/openeuler/aarch64/6.1/boot/vmlinuz': No such file or directory
Signed-off-by: Wang Chenglong 18509160991@163.com
sbin/submit | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/sbin/submit b/sbin/submit index a6f0cd387..993e27f96 100755 --- a/sbin/submit +++ b/sbin/submit @@ -147,6 +147,10 @@ ARGV.each do |jobfile| jobs['tbox_group'] = tbox_group(jobs['testbox']) if jobs.include?('testbox') jobs['node_roles'] ||= 'server client' if jobs['cluster'] jobs['submit_id'] = submit_id
- jobs['os_version'].is_a?(String) || (
puts "Please use quotation marks around value: os_version: \'#{jobs['os_version']}\'"
exit
jobs.each_jobs do |job| raise 'Please configure SCHED_HOST' unless job['SCHED_HOST'] raise 'Please configure SCHED_PORT' unless job['SCHED_PORT'])
-- 2.23.0