diff --git a/0016-fix-fifo-early-exit-problem.patch b/0016-fix-fifo-early-exit-problem.patch new file mode 100644 index 0000000000000000000000000000000000000000..9703281769672ddccb3a9b82a7a116a096395512 --- /dev/null +++ b/0016-fix-fifo-early-exit-problem.patch @@ -0,0 +1,37 @@ +From fafc4caa3fd73e1e375410e1fbd3e3078761931b Mon Sep 17 00:00:00 2001 +From: liqiang +Date: Mon, 18 Dec 2023 15:10:04 +0800 +Subject: [PATCH 3/6] fix fifo early exit problem + +Signed-off-by: liqiang +--- + qtfs/qtfs_server/server_fifo.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/qtfs/qtfs_server/server_fifo.c b/qtfs/qtfs_server/server_fifo.c +index 7e4320e..1839a88 100644 +--- a/qtfs/qtfs_server/server_fifo.c ++++ b/qtfs/qtfs_server/server_fifo.c +@@ -324,7 +324,8 @@ int fifo_proc_readable(struct fifo_event_t *evt) + log_err("read from fifo:%d failed, readlen:%d, errno:%d", evt->fd, readlen, errno); + ret = errno; + free(msg); +- error_ret = FIFO_RET_DEL_BOTH; ++ if (errno == EPIPE) ++ error_ret = FIFO_RET_DEL_BOTH; + goto err_ack; + } + rsp->err = 0; +@@ -384,7 +385,8 @@ int fifo_proc_writeable(struct fifo_event_t *evt) + log_err("write to fifo failed, ret:%d errno:%d", ret, errno); + ret = errno; + free(msg); +- error_ret = FIFO_RET_DEL_BOTH; ++ if (errno == EPIPE) ++ error_ret = FIFO_RET_DEL_BOTH; + goto err_ack; + } + rsp.err = 0; +-- +2.37.1 (Apple Git-137.1) + diff --git a/0017-update-some-problem-in-libvirt-readme.patch b/0017-update-some-problem-in-libvirt-readme.patch new file mode 100644 index 0000000000000000000000000000000000000000..4defed3261b32d7ebfaea377a9ebdd5ebce17c70 --- /dev/null +++ b/0017-update-some-problem-in-libvirt-readme.patch @@ -0,0 +1,46 @@ +From b3a943ee226470e2f7ba61b1d7ce5c86b56e001a Mon Sep 17 00:00:00 2001 +From: liqiang +Date: Mon, 18 Dec 2023 17:23:54 +0800 +Subject: [PATCH 4/6] update some problem in libvirt readme + +Signed-off-by: liqiang +--- + ...344\273\216\351\233\266\346\220\255\345\273\272v1.1.md" | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git "a/usecases/libvirtd-offload/libvirt\347\233\264\350\277\236\350\201\232\345\220\210\347\216\257\345\242\203\344\273\216\351\233\266\346\220\255\345\273\272v1.1.md" "b/usecases/libvirtd-offload/libvirt\347\233\264\350\277\236\350\201\232\345\220\210\347\216\257\345\242\203\344\273\216\351\233\266\346\220\255\345\273\272v1.1.md" +index bc47c50..07dbcb4 100644 +--- "a/usecases/libvirtd-offload/libvirt\347\233\264\350\277\236\350\201\232\345\220\210\347\216\257\345\242\203\344\273\216\351\233\266\346\220\255\345\273\272v1.1.md" ++++ "b/usecases/libvirtd-offload/libvirt\347\233\264\350\277\236\350\201\232\345\220\210\347\216\257\345\242\203\344\273\216\351\233\266\346\220\255\345\273\272v1.1.md" +@@ -99,9 +99,9 @@ make install + make role=server + make install + ``` +-配置工具将会自动安装,然后使用qtcfg命令配置白名单,假设需要增加的白名单为"/var/lib/libvirt/",输入: ++配置工具将会自动安装,然后使用qtcfg命令配置白名单,假设需要增加的白名单为"/var/lib/libvirt",输入: + ``` +-qtcfg -x /var/lib/libvirt/ ++qtcfg -w udsconnect -x /var/lib/libvirt + ``` + 查询白名单为: + ``` +@@ -133,7 +133,6 @@ rexec是一个用c语言开发的远程执行组件,分为rexec client和rexec + ``` + chmod 400 /etc/rexec/whitelist。 + ``` +-如果想仅用于测试,可以不进行白名单配置,删除此文件重启rexec_server进程后则没有白名单限制。 + + 下载dpu-utilities代码后,进入qtfs/rexec主目录下,执行:`make && make install`即可安装rexec所需全部二进制到/usr/bin目录下,包括了:`rexec、rexec_server`两个二进制可执行文件。 + +@@ -263,7 +262,7 @@ libvirtd -d + qtcfg -z + ``` + +-查看列举出来的白名单是否包含"/var/lib/libvirt/" ++查看列举出来的白名单是否包含"/var/lib/libvirt"和"/var/run/rexec"。 + + ## **3.5** 拉起虚机 + +-- +2.37.1 (Apple Git-137.1) + diff --git a/0018-fix-return-exit-status-bug-in-rexec.patch b/0018-fix-return-exit-status-bug-in-rexec.patch new file mode 100644 index 0000000000000000000000000000000000000000..078e8820be79c59943e0bddbcb92828f8493a2c2 --- /dev/null +++ b/0018-fix-return-exit-status-bug-in-rexec.patch @@ -0,0 +1,66 @@ +From a3f2eaf718eebb05d4b2d350833e1416d1c4a2f6 Mon Sep 17 00:00:00 2001 +From: liqiang +Date: Tue, 19 Dec 2023 20:06:07 +0800 +Subject: [PATCH 5/6] fix return exit status bug in rexec + +Signed-off-by: liqiang +--- + qtfs/rexec/rexec.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/qtfs/rexec/rexec.c b/qtfs/rexec/rexec.c +index f905cfa..eb8b9bd 100644 +--- a/qtfs/rexec/rexec.c ++++ b/qtfs/rexec/rexec.c +@@ -51,6 +51,7 @@ struct rexec_thread_arg { + int efd; + int connfd; + char **argv; ++ int exit_status; + }; + + struct rexec_global_var g_rexec; +@@ -311,7 +312,7 @@ static int rexec_run(int efd, int connfd, char *argv[]) + + rexec_log("Rexec process start run, as proxy of remote %s", argv[1]); + rexec_event_run(efd); +- rexec_log("Rexec process %s exit.", argv[1]); ++ rexec_log("Rexec process %s exit status:%d.", argv[1], exit_status); + + // clear pidmap file + if (pidfd > 0) { +@@ -687,9 +688,9 @@ static void *rexec_pipe_proxy_thread(void *arg) + static void *rexec_conn_thread(void *arg) + { + struct rexec_thread_arg *parg = (struct rexec_thread_arg *)arg; +- int exit_status = rexec_run(parg->efd, parg->connfd, parg->argv); ++ parg->exit_status = rexec_run(parg->efd, parg->connfd, parg->argv); + +- pthread_exit((void *)&exit_status); ++ pthread_exit((void *)NULL); + } + + static void rexec_global_var_init() +@@ -757,7 +758,6 @@ int main(int argc, char *argv[]) + pthread_t thrd_conn; + struct rexec_thread_arg targ; + struct rexec_thread_arg connarg; +- void *exit_status; + targ.efd = pipeefd; + (void)pthread_create(&thrd, NULL, rexec_pipe_proxy_thread, &targ); + +@@ -765,9 +765,9 @@ int main(int argc, char *argv[]) + connarg.connfd = connfd; + connarg.argv = argv; + (void)pthread_create(&thrd_conn, NULL, rexec_conn_thread, &connarg); +- pthread_join(thrd_conn, (void **)&exit_status); ++ pthread_join(thrd_conn, NULL); + fclose(rexec_logfile); +- exit(*(int *)exit_status); ++ exit(connarg.exit_status); + err_end: + fclose(rexec_logfile); + rexec_logfile = NULL; +-- +2.37.1 (Apple Git-137.1) + diff --git a/0019-fix-bug-in-get-link.patch b/0019-fix-bug-in-get-link.patch new file mode 100644 index 0000000000000000000000000000000000000000..f3292c717583ae4e41cdbcc710cfdf8fd91fb764 --- /dev/null +++ b/0019-fix-bug-in-get-link.patch @@ -0,0 +1,38 @@ +From 7346bdff4366b2ea41714341bb7ed0dc0d3f4426 Mon Sep 17 00:00:00 2001 +From: liqiang +Date: Wed, 20 Dec 2023 16:33:17 +0800 +Subject: [PATCH 6/6] fix bug in get link + +Signed-off-by: liqiang +--- + qtfs/qtfs/sb.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/qtfs/qtfs/sb.c b/qtfs/qtfs/sb.c +index 71aba49..77ff15b 100644 +--- a/qtfs/qtfs/sb.c ++++ b/qtfs/qtfs/sb.c +@@ -1453,10 +1453,7 @@ const char *qtfs_getlink(struct dentry *dentry, + qtfs_conn_put_param(pvar); + return ERR_PTR(-ENOENT); + } +- if (fsinfo->mnt_path) +- len = strlen(fsinfo->mnt_path) + strlen(rsp->path) + 1; +- else +- len = strlen(rsp->path) + 1; ++ len = strlen(rsp->path) + 1; + if (len > MAX_PATH_LEN || len == 0) { + qtfs_err("qtfs getlink failed. path name too long:%s - %s\n", fsinfo->mnt_path, rsp->path); + qtfs_conn_put_param(pvar); +@@ -1468,8 +1465,6 @@ const char *qtfs_getlink(struct dentry *dentry, + return ERR_PTR(-ENOMEM); + } + memset(link, 0, len); +- if (rsp->path[0] == '/' && fsinfo->mnt_path) +- strcat(link, fsinfo->mnt_path); + strcat(link, rsp->path); + qtfs_info("get link success <%s>\n", link); + +-- +2.37.1 (Apple Git-137.1) + diff --git a/dpu-utilities.spec b/dpu-utilities.spec index 5e3fc5d4b55a4c394627cbd325b2b9efd9d81262..42c9b374562d3e0f945aabc631866ed107465068 100644 --- a/dpu-utilities.spec +++ b/dpu-utilities.spec @@ -1,7 +1,7 @@ Name: dpu-utilities Summary: openEuler dpu utilities Version: 1.6 -Release: 6 +Release: 7 License: GPL-2.0 Source: https://gitee.com/openeuler/dpu-utilities/repository/archive/v%{version}.tar.gz ExclusiveOS: linux @@ -28,6 +28,10 @@ Patch12: 0012-not-updata-iattr-invalid-data-to-inode.patch Patch13: 0013-bugfix-fifo-suspend-and-fd-leak.patch Patch14: 0014-fix-event-misalignment-caused-by-multi-thread-schedu.patch Patch15: 0015-fix-read-write-fifo-failed-problem-and-update-rexec-.patch +Patch16: 0016-fix-fifo-early-exit-problem.patch +Patch17: 0017-update-some-problem-in-libvirt-readme.patch +Patch18: 0018-fix-return-exit-status-bug-in-rexec.patch +Patch19: 0019-fix-bug-in-get-link.patch %description This package contains the software utilities on dpu. @@ -155,6 +159,9 @@ sed -i '/# product cut_conf/a\dpuos kiwi/minios/cfg_dpuos yes' /opt/imageT sed -i '//a\dpuos 1 rpm-dir euler_base' /opt/imageTailor/repos/RepositoryRule.conf %changelog +* Tue Dec 26 2023 liqiang 1.6-7 +- Update recent bugfixes + * Sat Dec 16 2023 liqiang 1.6-6 - Update readme description and fix a bug