42 Commits

Author SHA1 Message Date
zhuchunyi
e38d6c8c3b update sub version for modify .spec info
Last commit modify info but ver no not changed, this commit just
change version for update.

(cherry picked from commit 56143befd3f35f1485779d5365a0307d1d12e876)
2024-02-21 17:48:46 +08:00
SuperSix173
faa99a9ec6 update open-iscsi.spec
correct the spell error.

(cherry picked from commit 57c8b69a53ec23a6905e40055a20ef657242e025)
2024-02-19 14:11:00 +08:00
louhongxiang
4105973136 iscsid: fixformatoverflowwarning.
This function can be called with NULL arguments, so check that before
passing to log_error.

(cherry picked from commit e12b72440bcd79f109f14da1ba4c1757800d897c)
2023-06-25 14:44:18 +08:00
Wenchao Hao
465bd23173 iscsid: stop connection for recovery if error is not timeout in iscsi_login_eh
When iscsid is reopening a connection, and the reopen process has succeed
to call bind_conn and comes to iscsi_session_set_params() to set
parameters. If the iscsi target trigger another error event(such as
close the socket connection between initiator and target) at this time,
kernel would perform the error handler and set connection's state to
ISCSI_CONN_FAILED, and set kernel iscsi_cls_conn->flags'
ISCSI_CLS_CONN_BIT_CLEANUP bit. Which would make iscsid's
iscsi_session_set_params() failed with ENOTCONN, so iscsi_login_eh()
would be called by iscsid to handle this error.

Now iscsid see conn->state is ISCSI_CONN_STATE_XPT_WAIT and
session->r_stage is R_STAGE_SESSION_REOPEN, so it would call
session_conn_reopen() with do_stop set to 0, which would not trigger
kernel to call iscsi_if_stop_conn() to clear kernel data struct
iscsi_cls_conn->flags' ISCSI_CLS_CONN_BIT_CLEANUP bit.

The reopen would fall into an infinite cycle which looks like
following:

iscsi_conn_connect -> bind_conn(failed with ENOTCONN)

         ^                     |
         |                     |
         |                     v

    session_conn_reopwn(with do_stop set to 0)

The phenomenon is iscsid would always report log "can't bind conn x:0
to session x, retcode -107 (115)" and the session would not recovery.

Fix this issue by checking error type in iscsi_login_eh(), if the error
type is not timeout, make sure we would call session_conn_reopen() with
do_stop set to STOP_CONN_RECOVER.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit 021ba3614f285e62d9f480b438ff374694bea11d)
2023-01-18 09:19:27 +08:00
Wenchao Hao
def312a5b7 iscsid: clear scanning thread's PR_SET_IO_FLUSHER flag
commit 72949ef (iscsid: set PR_SET_IO_FLUSHER) set the iscsid's
PR_SET_IO_FLUSHER flag to avoid deadlock. While we do not need
to set this flag when scanning host.

If this flag is set for scanning thread, we may lost devices
reported by target because of memory allocation failure.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit a9eca8e6025929e3c96199214c69447247e226d8)
2023-01-17 17:08:10 +08:00
Wenchao Hao
2ced5a5aad Backport bugfix patches from mainline
Reference:https://github.com/open-iscsi/open-iscsi/commit/fd0b3973
          https://github.com/open-iscsi/open-iscsi/commit/8c6d7bc2

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit c3202a63a18a10a33ad46049f6da0a5ee28bc9cd)
2022-12-02 16:47:58 +08:00
Wenchao Hao
e4083eca39 Substitute self-developed patch with mainline patch
Substitute self-developed patch with mainline patch to fix
nr_sessions do not work during iscsid restart.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit ab5ffaf7d01d014f35c83446c2ce263ebaa4e496)
2022-09-27 19:40:49 +08:00
Wenchao Hao
0d83847983 Remove unused fwparam_ibft.[ch] files in fwparam_ibft.
These files are apparently unused, so remove them.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit a02307caf86deba379626fba2f8cb8cc59f1a3ec)
2022-06-23 19:29:11 +08:00
Wu Bo
524d147e7c Backport bugfix patches
Following patches are added:

0017-iscsi-sysfs-check-state-before-onlining-devs.patch
0018-iscsiadm-Call-log_init-first-to-fix-a-segmentation-f.patch
0019-Fix-issues-discovered-by-gcc12.patch
0020-Fix-more-issues-discovered-by-gcc12.patch
0021-actor-enhanced-print-error-log-when-init-a-initilize.patch
0022-initiator_common-make-set-operational-parameter-log-.patch

Signed-off-by: Wu Bo <wubo40@huawei.com>
(cherry picked from commit 36cc8318bb8cb23d09d8a68795f1e97ea0268ffc)
2022-02-18 15:19:05 +08:00
Wenchao Hao
b79a9d6604 Remove useless patch
remove patch 0009-fix-iscsiadm-op-new-report-to-cannot-rename-error.patch

This patch get iscsid's pid from pidfile /var/run/iscsid.pid, and judge
if iscsid is alive according to that pid. While now iscsid.service would
not hold a pidfile, so this patch can not work as desired.

What's more, iscsiadm would try to connect to iscsid before send request
to iscsid, if iscsid is not alive, the connection would failed and
return error.

At wrost, if iscsid died after connect success, it would timeout after
1 second. And the patch
0009-fix-iscsiadm-op-new-report-to-cannot-rename-error.patch can not fix
this too.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit 03045f674c2e910ecebf4ab3695ccf35e015dc92)
2022-02-09 15:18:02 +08:00
Wenchao Hao
a24644bc8f Remove iscsi-init.service from iscsi and iscsid service file
iscsi-init.service is aimed to generate initiatorname.iscsi,
this name would be generated by spec file in openeulr, so we
excluded the iscsi-init.service.

This commit remove requires of iscsi-init in iscsi.service

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit 10f483e312fc2ff74dc92247022ede7a86dc2e3c)
2022-02-08 19:12:12 +08:00
Wenchao Hao
9bf034018d Remove unnecessary tool iscsiuio
iscsiuio is used in conjunction with specific linux driver to
improve performance, such as QLogic NetXtreme II or QLogic CNIC driver.
It is not a necessary tool of open-iscsi.

What's more, iscsiuio used a package uio which is out of maintain now,
which would introduce CVEs unhandled. So I want to remove this tool
from open-iscsi.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit 6648d72aebb373ada77784f56ae285540772dc66)
2022-02-08 18:03:26 +08:00
Wenchao Hao
e3bef46ef3 Remove password printing in session info display
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit b366eabcb30410c5f6ffad4a586ac99b7d04dbe0)
2022-01-26 10:05:36 +08:00
Wenchao Hao
8ba7c2b440 Remove iscsid.service of iscsi-init.service
iscsi-init.service is aimed to generate initiatorname.iscsi,
this name would be generated by spec file in openeulr, so we
excluded the iscsi-init.service.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit a68435f388a094288e5192314067bccf52da567c)
2021-12-06 17:04:35 +08:00
Wenchao Hao
9d711fbdf1 iscsi: Update open-iscsi version to 2.1.5-1
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit 55a4432e4907145dcb85ba3b42a45698f8141ef4)
2021-11-29 09:42:46 +08:00
Wenchao Hao
89a9fc125c Update URL
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
(cherry picked from commit f37e40e0609a63f17efed77488f5a4f588a077dd)
2021-10-21 11:25:53 +08:00
zhouwenpei
2788800e58 remove unnecessary build require. 2021-07-23 16:12:34 +08:00
Wenchao Hao
7d71425ccb Fix file residual files after open-iscsi removed
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2021-04-08 17:01:50 +08:00
Wenchao Hao
80ff3ed667 Fix iscsiadm segfault when exiting
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2021-03-01 11:20:39 +08:00
Wenchao Hao
177f8ee7e0 Fix iscsiadm op new report to can not rename error
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2021-02-22 22:43:21 +08:00
Wenchao Hao
873d6590de iscsi: Update open-iscsi version to 2.1.3-1
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2021-01-29 16:15:36 +08:00
Wenchao Hao
c30f286c34 iscsid: Change iscsid service PIDFile to /run/iscsid.ipd
The pid file has be changed from /var/run/iscsid.pid to
/run/iscsid.pid in code, here perform a sync.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2020-12-12 17:16:06 +08:00
Wenchao Hao
c9c0567638 Remove patched which should not apply
0027-use-openssl-for-random-data-generation.patch and
0028-drop-unused-get_random_bytes.patch can be considered as
feature patches which should not apply

0029-Preparing-for-version-2.1.2.patch should keepace with tar package

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2020-11-20 16:29:02 +08:00
Wenchao Hao
e04742a163 backport patches from epoch2
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2020-11-12 17:28:13 +08:00
wenchao-hao
862d109cb4 backport patches from epoch1 2020-10-31 17:29:53 +08:00
zhangyouming
81fd136d87 backport one patch for solving install problem 2020-09-01 20:14:41 +08:00
wangjun196@huawei.com
e4f6e5e502 Merge branch 'develop' of https://gitee.com/wguanghao/open-iscsi into develop
merge
2020-07-16 18:25:45 +08:00
wangjun196@huawei.com
98867d2f7f rename patches and add changelog 2020-07-15 16:05:16 +08:00
wuguanghao
cc9925b8c1 update open-iscsi version to 2.1.1-1 2020-07-10 14:51:47 +08:00
ZhiqiangLiu
028314e361 open-iscsi: remove useless readme files
open-iscsi: remove useless readme files

Signed-off-by: Zhiqiang Liu <lzhq28@mail.ustc.edu.cn>
2020-07-05 11:41:17 +08:00
si-gui
1d72dac25e Rename 0043-Fix-devel-without-node-header-files.patch to 0045 2020-06-16 09:29:23 +08:00
sigui
59e109870a Merge branch 'master' of gitee.com:src-openeuler/open-iscsi into master 2020-06-16 09:21:22 +08:00
ZhiqiangLiu
58d23e7c3d open-iscsi: backport two upstream bugfix patches 2020-06-15 21:33:35 +08:00
si-gui
b1df6246e6 modify the patch 2020-06-15 17:31:58 +08:00
si-gui
7f1e331130 fix devel without node header files 2020-06-15 15:34:50 +08:00
wubo009
dba849b90a backport bugfix for open-iscsi 2020-05-12 17:27:41 +08:00
sigui
63968a86ab Fix upgrade problem andadd gdb buildrequire. 2020-03-21 21:51:13 +08:00
eulerstorage
2094a0793a remove iscsiuio service 2020-01-21 10:11:12 +08:00
eulerstorage
b350276276 fix service error 2020-01-20 19:45:53 +08:00
eulerstorage
34729d6b18 fix install error 2020-01-17 10:46:36 +08:00
eulerstorage
f017026b1a provide iscsi-initiator-utils-devel 2020-01-11 17:00:05 +08:00
eulerstorage
08550c303d init package 2020-01-09 16:49:50 +08:00