8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0349-glusterfind-python3-compatibility.patch 2.13 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:09 . update to glusterfs-6.0-49.1.el8.src.rpm
From 1354a492cbc758f9801568153380ca896fab7765 Mon Sep 17 00:00:00 2001
From: Sunny Kumar <[email protected]>
Date: Fri, 10 Jan 2020 14:28:35 +0000
Subject: [PATCH 349/349] glusterfind: python3 compatibility
Problem:
While we delete gluster volume the hook script 'S57glusterfind-delete-post.py'
is failed to execute and error message can be observed in glusterd log.
Traceback:
File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 69, in <module>
main()
File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 39, in main
glusterfind_dir = os.path.join(get_glusterd_workdir(), "glusterfind")
File "/usr/lib64/python3.7/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib64/python3.7/genericpath.py", line 155, in _check_arg_types
raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components
Solution:
Added the 'universal_newlines' flag to Popen to support backward compatibility.
Backport of:
> Patch: https://review.gluster.org/23994
> Change-Id: Ie5655b11b55535c5ad2338108d0448e6fdaacf4f
> Fixes: bz#1789478
> Signed-off-by: Sunny Kumar <[email protected]>
Change-Id: Ie5655b11b55535c5ad2338108d0448e6fdaacf4f
BUG: 1789447
Signed-off-by: Sunny Kumar <[email protected]>
Signed-off-by: Kotresh HR <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/189216
Tested-by: RHGS Build Bot <[email protected]>
---
tools/glusterfind/S57glusterfind-delete-post.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/glusterfind/S57glusterfind-delete-post.py b/tools/glusterfind/S57glusterfind-delete-post.py
index 5b5142d..5beece2 100755
--- a/tools/glusterfind/S57glusterfind-delete-post.py
+++ b/tools/glusterfind/S57glusterfind-delete-post.py
@@ -18,7 +18,7 @@ def handle_rm_error(func, path, exc_info):
def get_glusterd_workdir():
p = Popen(["gluster", "system::", "getwd"],
- stdout=PIPE, stderr=PIPE)
+ stdout=PIPE, stderr=PIPE, universal_newlines=True)
out, _ = p.communicate()
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助