Closed TaylorTrz closed 1 year ago
Hmm, interesting, it looks like the kernel returns -2 when trying to write to the file and this would a bug in the driver. Can you post here the output of "uname -a" ?
It's user-backed storage, so tcmu-runner may be involved, can you tell me the version of the tcmu-runner package?
Let me check...
# uname -a
Linux xxx 5.10.83 #3 SMP Fri Dec 3 11:13:00 CST 2021 x86_64 x86_64 x86_64 GNU/Linux
# tcmu-runner -V
tcmu-runner 1.5.4
By the way, this demo was build on a privileged docker container, like this:
docker run -d -t \
--network host \
--volume=/root/tao:/root/tao \
--volume=/lib/modules:/lib/modules \
--env="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
--privileged=true \
--restart=always \
--name=iscsi-gateway \
iscsi-gateway:0.5 /sbin/init
Could this error message involved with container?
Could this error message involved with container?
I will contact the tcmu-runner devs and I will update
Could this error message involved with container?
I will contact the tcmu-runner devs and I will update
It does not fail in tcmu-runner
, it fails in ceph-iscsi
when calling the rstlib's UserBackedStorageObject
in Line 945:
932 try:
933 # config string = rbd identifier / config_key (pool/image) /
934 # optional osd timeout
935 cfgstring = "rbd/{}/{};osd_op_timeout={}".format(self.pool,
936 self.image,
937 self.osd_op_timeout)
938 if (settings.config.cephconf != '/etc/ceph/ceph.conf'):
939 cfgstring += ";conf={}".format(settings.config.cephconf)
940
941 if (settings.config.cluster_client_name != 'client.admin'):
942 client_id = settings.config.cluster_client_name.split('.', 1)[1]
943 cfgstring += ";id={}".format(client_id)
944
945 new_lun = UserBackedStorageObject(name=self.backstore_object_name,
946 config=cfgstring,
947 size=self.size_bytes,
948 wwn=in_wwn, control=control_string)
949 except (RTSLibError, IOError) as err:
950 self.error = True
951 self.error_msg = ("failed to add {} to LIO - "
952 "error({})".format(self.config_key,
953 str(err)))
954 self.logger.error(self.error_msg)
955 return None
Could this error message involved with container?
I will contact the tcmu-runner devs and I will update
It does not fail in
tcmu-runner
, it fails inceph-iscsi
when calling the rstlib'sUserBackedStorageObject
in Line 945:932 try: 933 # config string = rbd identifier / config_key (pool/image) / 934 # optional osd timeout 935 cfgstring = "rbd/{}/{};osd_op_timeout={}".format(self.pool, 936 self.image, 937 self.osd_op_timeout) 938 if (settings.config.cephconf != '/etc/ceph/ceph.conf'): 939 cfgstring += ";conf={}".format(settings.config.cephconf) 940 941 if (settings.config.cluster_client_name != 'client.admin'): 942 client_id = settings.config.cluster_client_name.split('.', 1)[1] 943 cfgstring += ";id={}".format(client_id) 944 945 new_lun = UserBackedStorageObject(name=self.backstore_object_name, 946 config=cfgstring, 947 size=self.size_bytes, 948 wwn=in_wwn, control=control_string) 949 except (RTSLibError, IOError) as err: 950 self.error = True 951 self.error_msg = ("failed to add {} to LIO - " 952 "error({})".format(self.config_key, 953 str(err))) 954 self.logger.error(self.error_msg) 955 return None
Exactly! This error was derived from this. And there is some updates... I tried to build ceph-iscsi demo environment on Centos 7.4, and the result is a success.
Problem solved
Description
Hello, this error prompt happens when i create an rbd image for iscsi gateway.
To further investigate this error, i check the log and tried to debug rtslib-fb...
debug message
It seems like to write "1\n" to configfs device '/sys/kernel/config/target/core/user_0/rbd.disk_2/enable', and failed with [Errno 2]... So I also check this file's info (rw), and tried with python or shell:
So this confused me... Please let me know if you have some idea about this, thanks...
Logs & Configs
vim /var/log/rbd-target-api/rbd-target-api.log
Environment
os-release