diff --git a/0015-fix-read-write-fifo-failed-problem-and-update-rexec-.patch b/0015-fix-read-write-fifo-failed-problem-and-update-rexec-.patch new file mode 100644 index 0000000000000000000000000000000000000000..105cd35c80f5bb2528928bf370380f0d79ee6b35 --- /dev/null +++ b/0015-fix-read-write-fifo-failed-problem-and-update-rexec-.patch @@ -0,0 +1,61 @@ +From 402c5c17885db59b15ed06c1f1bf92f2378b6f90 Mon Sep 17 00:00:00 2001 +From: liqiang +Date: Sat, 16 Dec 2023 16:26:28 +0800 +Subject: [PATCH] fix read/write fifo failed problem and update rexec whitelist + descriptor in readme + +Signed-off-by: liqiang +--- + qtfs/README.md | 8 ++++---- + qtfs/qtfs_server/server_fifo.c | 6 ++---- + 2 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/qtfs/README.md b/qtfs/README.md +index 3721f44..2ffdce6 100644 +--- a/qtfs/README.md ++++ b/qtfs/README.md +@@ -134,13 +134,13 @@ Tips:若完成测试环境的配置后,无法通过客户端访问所挂载 + + 1. rexec工具依赖上述udsproxyd服务,使用udsproxyd提供的uds协同进行通信,请确认udsproxyd正常启动。 + +-2. 配置白名单,将qtfs/config/rexec/whitelist文件拷贝至/etc/rexec/下,请手动配置需要的白名单选项,在其中增加允许执行的二进制命令。 ++2. 为rexec_server配置白名单,将qtfs/config/rexec/whitelist文件拷贝至/etc/rexec/下,请手动配置需要的白名单选项,在其中增加允许执行的二进制命令,请注意该白名单应该配置在rexec_server运行的系统上,如果双向运行,则两侧都需要配置,rexec_server服务只接受该白名单列出的二进制拉起执行,不在白名单中的请求会被rexec_server拒绝拉起。 + +-3. 在udsconnect中增加rexec通信socket所在目录白名单,增加方式有两种: ++3. 为rexec端配置uds白名单(这个白名单只在需要调用rexec二进制的系统中配置,如果是双向则都配置),在udsconnect中增加rexec通信socket所在目录白名单,增加方式有两种: + +- 1. 在/etc/qtfs/whitelist的`[udsconnect]`表项中增加`/var/run/rexec`,修改后需要重新部署qtfs使其生效。 ++ 1. 在qtfs_server端可以将/etc/qtfs/whitelist的`[udsconnect]`表项中增加`/var/run/rexec`,修改后需要重新启动engine进程使其生效。 + +- 2. 进入源码目录`qtinfo/`,执行`make`编译得到二进制。使用qtcfg进行配置:`qtcfg -w udsconnect -x /var/run/rexec`,配置完成后可通过`qtcfg -w udsconnect -z`查询是否生效 ++ 2. 使用前述的qtcfg进行配置:`qtcfg -w udsconnect -x /var/run/rexec`,配置完成后可通过`qtcfg -w udsconnect -z`查询是否生效。qtcfg可以在qtfs client或者server端动态添加白名单,qtfs server端应该在engine拉起后执行。 + + 4. 拉起rexec_server作为服务端,无需参数 + +diff --git a/qtfs/qtfs_server/server_fifo.c b/qtfs/qtfs_server/server_fifo.c +index 1839a88..7e4320e 100644 +--- a/qtfs/qtfs_server/server_fifo.c ++++ b/qtfs/qtfs_server/server_fifo.c +@@ -324,8 +324,7 @@ 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); +- if (errno == EPIPE) +- error_ret = FIFO_RET_DEL_BOTH; ++ error_ret = FIFO_RET_DEL_BOTH; + goto err_ack; + } + rsp->err = 0; +@@ -385,8 +384,7 @@ 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); +- if (errno == EPIPE) +- error_ret = FIFO_RET_DEL_BOTH; ++ error_ret = FIFO_RET_DEL_BOTH; + goto err_ack; + } + rsp.err = 0; +-- +2.37.1 (Apple Git-137.1) + diff --git a/dpu-utilities.spec b/dpu-utilities.spec index 113a969badf0802f7d2f11063de1714dab9fbc82..5e3fc5d4b55a4c394627cbd325b2b9efd9d81262 100644 --- a/dpu-utilities.spec +++ b/dpu-utilities.spec @@ -1,7 +1,7 @@ Name: dpu-utilities Summary: openEuler dpu utilities Version: 1.6 -Release: 5 +Release: 6 License: GPL-2.0 Source: https://gitee.com/openeuler/dpu-utilities/repository/archive/v%{version}.tar.gz ExclusiveOS: linux @@ -27,6 +27,7 @@ Patch11: 0011-filter-af-unix-before-whitelist-check.patch 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 %description This package contains the software utilities on dpu. @@ -154,6 +155,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 +* Sat Dec 16 2023 liqiang 1.6-6 +- Update readme description and fix a bug + * Sat Dec 16 2023 liqiang 1.6-5 - fix event misalignment problem