问题描述
运行glusterfind create test_session
时报错如下:
Traceback (most recent call last):
File "./glusterfind", line 18, in <module>
main()
File "/app/glusterfs/libexec/glusterfs/glusterfind/main.py", line 865, in main
globals()["mode_" + args.mode](session_dir, args)
File "/app/glusterfs/libexec/glusterfs/glusterfind/main.py", line 533, in mode_create
logger=logger)
File "/app/glusterfs/libexec/glusterfs/glusterfind/utils.py", line 170, in execute
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
File "/usr/local/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
解决
上面报错的原因是因为找不到gluster这个命令。所以我们可以将gluster命令加到/usr/sbin下就可以(链接的方式或者拷贝的方式)。