Closed
[Requirement|需求建议]: 新增环境变量支持配置plog日志落盘的文件权限 #1112
GuoWenboAdd on Oct 14Closed at 11 days ago
Oct 14 Added label: bug-report
Oct 14 changed custom category from 任务 to 需求
Oct 15 Associated pull request
GuoWenbo
Oct 15 Comments:
Oct 15 Comments:
自验证执行./run_test.sh,有用例报错
----- 用例 two-user (User1 主组=61000 附加组=61001, ASCEND_LOG_GID=61001, User2 主组=61001) -----
[ENV] ASCEND_LOG_GID=61001
[CASE] two-user-u1: expect gid=61001, logpath=/tmp/algid_twouser.eH6gwu
Failed to obtain the console log level. The possible causes are as follows:
1. Different containers share the same device;
2. Failed to open the character device when interacting with the OS kernel;
3. Failed to obtain the number of devices.
[FAIL] 在 /tmp/algid_twouser.eH6gwu/debug/plog 下未找到 plog-391506_*.log(等待 10 秒)
[RESULT] two-user-u1: FAIL (日志未落盘, 请确认 CANN 日志库可正常工作)
[RESULT] two-user: FAIL
===== 汇总: 7/8 用例通过, 1 失败, 强正向用例: 有 =====


Oct 23 Added label: wait-feedback
Oct 23 Removed label: wait-feedback
Oct 28 Added label: feature; Removed label: bug-report
26 days ago Added label: wait-feedback
25 days ago Removed label: wait-feedback
23 days ago Change title to "[Requirement|需求建议]: 新增环境变量支持配置plog日志落盘的文件权限", originally titled "[Bug-Report|缺陷反馈]: 新增环境变量支持配置plog日志落盘的文件权限".
23 days ago Change title to "[Requirement|需求建议]: 新增环境变量支持配置plog日志落盘的文件权限", originally titled "[Bug-Report|缺陷反馈]: 新增环境变量支持配置plog日志落盘的文件权限".
11 days ago changed custom state from 待办的 to 已解决
11 days ago Close issue
11 days ago Associated pull request
11 days ago Associated pull request
10 days ago Added label: resolved
8 days ago Associated pull request
5 days ago Associated pull request
Describe the current behavior / 问题描述 (Mandatory / 必填)
当前plog创建落盘路径和文件的权限是:
日志目录:User1:group1 750
日志文件:User1:group1 640
会根据当前进程修改目录和文件的属组,对应的代码如下
当前有一种使用场景,User1的主组是group1,User2的主组是group2,User1和User2的公共组是group2;
希望User1用户拉起的进程落盘的日志,User2用户也能读取,那就需要将文件和目录权限改为
日志目录:User1:group2 750
日志文件:User1:group2 640
通过环境变量ASCEND_LOG_GID来设置对应的group2的gid
Environment / 环境信息 (Mandatory / 必填)
all
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
NA
Describe the expected behavior / 预期结果 (Mandatory / 必填)
希望User1用户拉起的进程落盘的日志,User2用户最终也能读取到
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
NA
Special notes for this issue/备注 (Optional / 选填)