fix: improve gfxmode signal file creation safety#1178
Conversation
|
Hi @52cyb. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb, fly602 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1. Move gfxmode signal file from /tmp to /run (tmpfs, wiped each boot) to fix stale-file issue that could prevent detection completion 2. Introduce CreateGfxmodeDetectReady function to centralize mkdir + write logic with consistent error wrapping 3. Remove direct os.WriteFile calls in favor of the new function 4. Update systemd service with RuntimeDirectory to manage /run/deepin-gfxmode-detect and preserve across restarts Log: Relocate gfxmode detection signal file to /run and unify creation entry for better lifecycle management PMS: BUG-367565 Influence: 1. Test gfxmode detection process with normal device conditions 2. Verify signal file creation in /run directory after detection 3. Verify signal file preservation across service restart 4. Verify postinst grub2 -prepare-gfxmode-detect creates signal file without systemd RuntimeDirectory refactor: 提升 gfxmode 信号文件创建安全性 1. 将 gfxmode 信号文件从 /tmp 迁移至 /run(tmpfs,每次开机清空), 修正残留旧文件导致探测完成判断失效的问题 2. 引入 CreateGfxmodeDetectReady 函数,统一 mkdir + 写文件逻辑并 规范错误包装 3. 移除直接的 os.WriteFile 调用,统一使用新函数 4. 更新 systemd 服务,通过 RuntimeDirectory 托管 /run/deepin-gfxmode-detect 父目录并跨重启保留 Log: 将 gfxmode 探测完成信号文件迁移至 /run 并统一创建入口,改善生命周期管理 PMS: BUG-367565 Influence: 1. 测试正常设备条件下的 gfxmode 检测流程 2. 验证检测完成后 /run 目录中信号文件的创建与生命周期 3. 验证服务重启后信号文件按 RuntimeDirectoryPreserve 行为保留 4. 验证 postinst 的 grub2 -prepare-gfxmode-detect 在无 systemd 托管时能正常创建信号文件 (cherry picked from commit a50e3aa)
|
/forcemerge |
|
This pr force merged! (status: unstable) |
be59e2c
into
linuxdeepin:release/2500
Log: Relocate gfxmode detection signal file to /run and unify creation entry for better lifecycle management
PMS: BUG-367565
Influence:
refactor: 提升 gfxmode 信号文件创建安全性
Log: 将 gfxmode 探测完成信号文件迁移至 /run 并统一创建入口,改善生命周期管理
PMS: BUG-367565
Influence:
(cherry picked from commit a50e3aa)