73 Star 336 Fork 169

GVPopenEuler / iSulad

 / 详情

crictl runp pod-config.json失败

Done
Task
Opened this issue  
2021-10-12 21:36

以之前的issue:通过CNI和CRI接口让iSulad的实例可以访问外网 为基础进行尝试,解决了该issue中的pause镜像拉取问题,但出现了新的错误,显示cni缺少version信息,错误信息如下:

[root@openeuler CRI]# crictl runp pod-config.json
DEBU[0000] get runtime connection                       
DEBU[0000] connect using endpoint 'unix:///var/run/isulad.sock' with '10s' timeout 
DEBU[0000] connected successfully using endpoint: unix:///var/run/isulad.sock 
DEBU[0000] RunPodSandboxRequest: &RunPodSandboxRequest{Config:&PodSandboxConfig{Metadata:&PodSandboxMetadata{Name:test,Uid:hdishd83djaidwnduwk28bcsb,Namespace:default,Attempt:1,},Hostname:,LogDirectory:/tmp,DnsConfig:nil,PortMappings:[]*PortMapping{},Labels:map[string]string{},Annotations:map[string]string{},Linux:&LinuxPodSandboxConfig{CgroupParent:,SecurityContext:nil,Sysctls:map[string]string{},},Windows:nil,},RuntimeHandler:,} 
DEBU[0000] RunPodSandboxResponse: nil                   
FATA[0000] run pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod test_default network: parse json failed: Required field 'version' not present 

请问该version信息需要在哪个json文件中补全?或者是否是由于其它配置问题引起?尝试了一段时间未能解决,诚心求教,谢谢。

===============================配置文件附录=======================================

  1. /etc/isulad/daemon.json
{
    "group": "isulad",
    "default-runtime": "lcr",
    "graph": "/var/lib/isulad",
    "state": "/var/run/isulad",
    "engine": "lcr",
    "log-level": "ERROR",
    "pidfile": "/var/run/isulad.pid",
    "log-opts": {
        "log-file-mode": "0600",
        "log-path": "/var/lib/isulad",
        "max-file": "1",
        "max-size": "30KB"
    },
    "log-driver": "stdout",
    "hook-spec": "/etc/default/isulad/hooks/default.json",
    "start-timeout": "2m",
    "storage-driver": "overlay2",
    "storage-opts": [
        "overlay2.override_kernel_check=true"
    ],
    "registry-mirrors": ["docker.io"
    ],
    "insecure-registries": ["rnd-dockerhub.huawei.com"
    ],
    "pod-sandbox-image": "kubesphere/pause:3.5",
    "image-opt-timeout": "5m",
    "image-server-sock-addr": "unix:///var/run/isulad/isula_image.sock",
    "native.umask": "secure",
    "network-plugin": "cni",
    "cni-bin-dir": "/opt/cni/bin",
    "cni-conf-dir": "/etc/cni/net.d",
    "image-layer-check": false,
    "use-decrypted-key": true,
    "insecure-skip-verify-enforce": false
}
  1. /etc/cni/net.d/10-mynet.conf
{
	"cniVersion": "0.3.0",
	"name": "mynet",
	"type": "bridge",
	"bridge": "cni0",
	"isGateway": true,
	"ipMasq": true,
	"ipam": {
		"type": "host-local",
		"subnet": "10.22.0.0/16",
		"routes": [
			{ "dst": "0.0.0.0/0" }
		]
	}
}

  1. CRI/pod-config.json
{
      "metadata": {
          "name": "test",
          "namespace": "default",
          "attempt": 1,
          "uid": "hdishd83djaidwnduwk28bcsb"
      },
      "log_directory": "/tmp",
      "linux": {
      }
  }
  1. /etc/crictl.yaml
runtime-endpoint: unix:///var/run/isulad.sock
image-endpoint: unix:///var/run/isulad.sock
timeout: 10
debug: true

Comments (9)

Hertz_L created任务
Hertz_L set related repository to openEuler/iSulad
openeuler-ci-bot added
 
sig/iSulad
label
Expand operation logs

Hi huangzhilu, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at
https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md.
If you have any questions, please contact the SIG: iSulad, and any of the maintainers: @haomintsai , @lifeng_isula , @haozi007 , @jingxiaolu .

Hertz_L changed description
Hertz_L changed description
Hertz_L changed description
Hertz_L changed description
Hertz_L changed description

你用的isulad是那个版本?
看到还有:"image-server-sock-addr": "unix:///var/run/isulad/isula_image.sock",
建议使用最新的版本

cni配置解析错误,可能是isulad和clibcni的版本没对齐导致

您好,感谢回复!查了一下之前的isulad版本为2.0.0,因此我准备依照Build iSulad from source重新从源码安装最新的isulad及相关依赖项,但在安装lcr时遇到了如下问题

[root@openeuler build]# sudo -E make -j
[  1%] Building C object src/CMakeFiles/isula_libutils.dir/utils.c.o
[  1%] Building C object src/CMakeFiles/isula_libutils.dir/__/third_party/go_crc64.c.o
[  1%] Building C object src/CMakeFiles/isula_libutils.dir/__/third_party/log.c.o
cc1: fatal error: CMakeFiles/isula_libutils.dir/utils.c.d: No such file or directory
compilation terminated.
cc1: fatal error: CMakeFiles/isula_libutils.dir/__/third_party/go_crc64.c.d: No such file or directory
compilation terminated.
make[2]: *** [src/CMakeFiles/isula_libutils.dir/build.make:76: src/CMakeFiles/isula_libutils.dir/utils.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/CMakeFiles/isula_libutils.dir/build.make:90: src/CMakeFiles/isula_libutils.dir/__/third_party/go_crc64.c.o] Error 1
cc1: fatal error: CMakeFiles/isula_libutils.dir/__/third_party/log.c.d: No such file or directory
compilation terminated.
make[2]: *** [src/CMakeFiles/isula_libutils.dir/build.make:104: src/CMakeFiles/isula_libutils.dir/__/third_party/log.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:176: src/CMakeFiles/isula_libutils.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

请问如何解决文件缺失的问题?谢谢!
我的cmake版本为3.21.3(yail2.1.1及openssl均已安装) gcc版本为7.3.0

$ git clone https://gitee.com/openeuler/lcr.git
$ cd lcr
$ mkdir build
$ cd build
$ sudo -E cmake ..
$ sudo -E make -j
$ sudo -E make install

这个方式吗?

cmake的时候有报错吗?

还有linux是什么发行版本?

Cmake没有报错,输出如下,且linux版本为openEuler 20.03 64bit with ARM

[root@openeuler build]# sudo -E cmake ..
CMake Deprecation Warning at CMakeLists.txt:23 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


--  found lxc/lxccontainer.h --- works
--  found liblxc.so --- works
--  found zlib.h --- works
--  found libz.so --- works
--  found python3 --- works
--  found yajl/yajl_tree.h --- works
--  found libyajl.so --- works
--  commit id: 8ba6eb123e27fdd4eb1b42177ac0701eeec72c24
--  Build shared library
--  Generate .c and .h file into: /root/lcr/build/json
Reflection:	mount_spec.json                                              Success
Reflection:	bind-options.json                                            Success
Reflection:	tmpfs-options.json                                           Success
Reflection:	host-config.json                                             Success
Reflection:	isulad-daemon-constants.json                                 Success
Reflection:	timestamp.json                                               Success
Reflection:	defs.json                                                    Success
Reflection:	isulad-daemon-configs.json                                   Success
Reflection:	web-signature.json                                           Success
Reflection:	image.json                                                   Success
Reflection:	fs-info.json                                                 Success
Reflection:	images-list.json                                             Success
Reflection:	image-status.json                                            Success
Reflection:	image_summary.json                                           Success
Reflection:	prepare-response.json                                        Success
Reflection:	auth_input.json                                              Success
Reflection:	auths.json                                                   Success
Reflection:	token.json                                                   Success
Reflection:	manifest_schema1.json                                        Success
Reflection:	manifest_schema2.json                                        Success
Reflection:	manifest_list.json                                           Success
Reflection:	options.json                                                 Success
Reflection:	volume.json                                                  Success
Reflection:	list-volume-response.json                                    Success
Reflection:	prune-volume-request.json                                    Success
Reflection:	remove-volume-response.json                                  Success
Reflection:	prune-volume-response.json                                   Success
Reflection:	list-volume-request.json                                     Success
Reflection:	remove-volume-request.json                                   Success
Reflection:	runtime-stats.json                                           Success
Reflection:	process-state.json                                           Success
Reflection:	layers.json                                                  Success
Reflection:	manifest.json                                                Success
Reflection:	config.json                                                  Success
Reflection:	checkpoint_data.json                                         Success
Reflection:	pod_network.json                                             Success
Reflection:	terminal_size.json                                           Success
Reflection:	checkpoint.json                                              Success
Reflection:	port_mapping.json                                            Success
Reflection:	inspect.json                                                 Success
Reflection:	logs-response.json                                           Success
Reflection:	stop-response.json                                           Success
Reflection:	resume-response.json                                         Success
Reflection:	top-response.json                                            Success
Reflection:	stop-request.json                                            Success
Reflection:	copy-to-request.json                                         Success
Reflection:	wait-response.json                                           Success
Reflection:	create-request.json                                          Success
Reflection:	pause-request.json                                           Success
Reflection:	pause-response.json                                          Success
Reflection:	create-response.json                                         Success
Reflection:	update-response.json                                         Success
Reflection:	stats-request.json                                           Success
Reflection:	inspect-request.json                                         Success
Reflection:	garbage-config.json                                          Success
Reflection:	update-request.json                                          Success
Reflection:	exec-request.json                                            Success
Reflection:	path-stat.json                                               Success
Reflection:	get-runtime-response.json                                    Success
Reflection:	resume-request.json                                          Success
Reflection:	restart-request.json                                         Success
Reflection:	inspect-response.json                                        Success
Reflection:	start-generate-config.json                                   Success
Reflection:	list-response.json                                           Success
Reflection:	exec-response.json                                           Success
Reflection:	start-request.json                                           Success
Reflection:	attach-response.json                                         Success
Reflection:	logs-request.json                                            Success
Reflection:	container.json                                               Success
Reflection:	restart-response.json                                        Success
Reflection:	list-request.json                                            Success
Reflection:	wait-request.json                                            Success
Reflection:	delete-response.json                                         Success
Reflection:	info.json                                                    Success
Reflection:	attach-request.json                                          Success
Reflection:	config.json                                                  Success
Reflection:	state.json                                                   Success
Reflection:	top-request.json                                             Success
Reflection:	delete-request.json                                          Success
Reflection:	export-response.json                                         Success
Reflection:	start-response.json                                          Success
Reflection:	kill-request.json                                            Success
Reflection:	stats-response.json                                          Success
Reflection:	version-request.json                                         Success
Reflection:	get-id-request.json                                          Success
Reflection:	get-id-response.json                                         Success
Reflection:	config-v2.json                                               Success
Reflection:	version-response.json                                        Success
Reflection:	kill-response.json                                           Success
Reflection:	export-request.json                                          Success
Reflection:	activate-plugin-response.json                                Success
Reflection:	activate-plugin-request.json                                 Success
Reflection:	init-plugin-response.json                                    Success
Reflection:	event-pre-start-request.json                                 Success
Reflection:	init-plugin-request.json                                     Success
Reflection:	event-pre-start-response.json                                Success
Reflection:	event-post-remove-request.json                               Success
Reflection:	event-pre-create-response.json                               Success
Reflection:	event-post-stop-response.json                                Success
Reflection:	event-pre-create-request.json                                Success
Reflection:	event-post-stop-request.json                                 Success
Reflection:	event-post-remove-response.json                              Success
Reflection:	seccomp.json                                                 Success
Reflection:	mount-point.json                                             Success
Reflection:	history.json                                                 Success
Reflection:	rootfs.json                                                  Success
Reflection:	config-v2.json                                               Success
Reflection:	pspec.json                                                   Success
Reflection:	spec.json                                                    Success
Reflection:	config-linux.json                                            Success
Reflection:	state.json                                                   Success
Reflection:	content-descriptor.json                                      Success
Reflection:	spec.json                                                    Success
Reflection:	manifest.json                                                Success
Reflection:	defs-descriptor.json                                         Success
Reflection:	index.json                                                   Success
Reflection:	layout.json                                                  Success
Reflection:	layer.json                                                   Success
Reflection:	image.json                                                   Success
Reflection:	rootfs.json                                                  Success
Reflection:	mount-point.json                                             Success
Reflection:	entry.json                                                   Success
Reflection:	info-request.json                                            Success
Reflection:	info-response.json                                           Success
Reflection:	json-file.json                                               Success
Reflection:	net_conf_list.json                                           Success
Reflection:	net_args.json                                                Success
Reflection:	bandwidth_entry.json                                         Success
Reflection:	inner_plugin_info.json                                       Success
Reflection:	version.json                                                 Success
Reflection:	inner_port_mapping.json                                      Success
Reflection:	net_conf.json                                                Success
Reflection:	result_curr.json                                             Success
Reflection:	exec_error.json                                              Success
Reflection:	ipconfig.json                                                Success
Reflection:	ipconfig_020.json                                            Success
Reflection:	route.json                                                   Success
Reflection:	interface.json                                               Success
Reflection:	dns.json                                                     Success
Reflection:	devmapper-direct-lvm-config.json                             Success
Reflection:	devmapper-deviceset-metadata.json                            Success
Reflection:	manifest-v1.json                                             Success
Reflection:	load-image-response.json                                     Success
Reflection:	manifest-v1-compatibility.json                               Success
Reflection:	inspect-request.json                                         Success
Reflection:	logout-response.json                                         Success
Reflection:	manifest-items.json                                          Success
Reflection:	import-request.json                                          Success
Reflection:	image.json                                                   Success
Reflection:	import-response.json                                         Success
Reflection:	inspect-response.json                                        Success
Reflection:	descriptor.json                                              Success
Reflection:	delete-image-request.json                                    Success
Reflection:	login-response.json                                          Success
Reflection:	devmapper-device-info.json                                   Success
Reflection:	delete-image-response.json                                   Success
Reflection:	login-request.json                                           Success
Reflection:	logout-request.json                                          Success
Reflection:	tag-image-response.json                                      Success
Reflection:	list-images-request.json                                     Success
Reflection:	devmapper-transaction.json                                   Success
Reflection:	load-image-request.json                                      Success
Reflection:	list-images-response.json                                    Success
Reflection:	tag-image-request.json                                       Success
--  Get top srcs: /root/lcr/src/buffer.c/root/lcr/src/conf.c/root/lcr/src/error.c/root/lcr/src/lcrcontainer.c/root/lcr/src/lcrcontainer_execute.c/root/lcr/src/lcrcontainer_extend.c
-- Configuring done
-- Generating done
-- Build files have been written to: /root/lcr/build

lcr是最新的版本吗?你这个不是依赖项有问题,build目录删除一下?是不是有残留

haozi007 changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
Confirm
参与者(3)
5329419 openeuler ci bot 1632792936 5595769 duguhaotian 1605235330
C
1
https://git.oschina.net/openeuler/iSulad.git
git@git.oschina.net:openeuler/iSulad.git
openeuler
iSulad
iSulad

Search