Files
geedge-jira/md/OMPUB-1231.md
2025-09-14 21:52:36 +00:00

87 lines
3.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 【WMS-UTR】MAAT跨版本加载配置存在加载到重复ID的情况导致firewall大量输出FATAL日志
| ID | Creation Date | Assignee | Status |
|----|----------------|----------|--------|
| OMPUB-1231 | 2024-04-18T09:33:14.000+0800 | 刘畅 | 完成 |
---
MAAT在跨版本的配置扫描中同一个条配置只能获取两个MAAT_UPDATE_STATUS记录(实际跨版本的范围内同一条ID有多次MAAT_UPDATE_STATUS的更新)
    这种情况下MAAT会抛出FATAL级别的异常日志过多的FATAL日志导致firewall磁盘告警。
    BUG详细情况参见https://jira.geedge.net/projects/OMPUB/issues/OMPUB-1221?filter=allissues**duandongmei** commented on *2024-04-19T16:44:54.182+0800*:
2024-04-19 讨论更新MAAT规范考虑MAAT_UPDATE_STATUS格式变更为ADD,TableName,ID,Unique ID此变更可以解决Redis ZSET 成员覆盖导致MAAT配置扫描丢失配置版本变更问题。
---
**yangwei** commented on *2024-04-22T14:17:19.561+0800*:
问题原因
* MAAT_UPDATE_STATUS为ZSET使用格式为“ADD/DEL,TableName,ID”的字符串作为memberscore为版本号
* 在一个时间段T内对同一个Table中的相同ID多次操作时仅member的score变化
* 在T+1时刻查询MAAT_UPDATE_STATUS仅保留最后操作member的score触发maat检查报错的流程如下
** T0时刻 生效版本 100 ID=400有效
** T1-T2时刻多次操作ID=400操作序列
*** 101 DEL ID=400
*** 102 ADD ID=400
*** 103 DEL ID=400
*** 104 ADD ID=400
*** 105 DEL ID=400
** T3时刻maat查询MAAT_UPDATE_STATUS结果
*** 104 ADD ID=400
*** 105 DEL ID=400
** 处理“104 ADD ID=400”这行时会认为{*}该ID与当前已生效的ID=400重复记录fatal日志{*}
** 处理“105 DEL ID=400”时能够正确删除ID=400最终结果无误。
---
**zhengchao** commented on *2024-04-22T17:17:43.760+0800*:
Maat现在的设计不影响配置的最终一致性无需修改业务逻辑。
---
**duandongmei** commented on *2024-04-22T18:18:02.731+0800*:
根据上述评论回滚已更改的业务逻辑
---
**liuchang** commented on *2024-04-23T18:17:53.990+0800*:
讨论maat修改方案为针对添加的key已存在的情况不算失败不打印失败日志。并增加打印一条debug级别日志输出添加重复key的情况
---
**gitlab** commented on *2024-04-26T14:40:29.515+0800*:
[刘畅|https://git.mesalab.cn/liuchang] mentioned this issue in [a merge request|https://git.mesalab.cn/tango/maat/-/merge_requests/289] of [TSG Appliance / Maat|https://git.mesalab.cn/tango/maat] on branch [add_dup_key_dont_output_fatal_log|https://git.mesalab.cn/tango/maat/-/tree/add_dup_key_dont_output_fatal_log]:{quote}OMPUB-1231add dup key don't output fatal log{quote}
---
**gitlab** commented on *2024-04-28T18:01:28.320+0800*:
[刘畅|https://git.mesalab.cn/liuchang] mentioned this issue in [a merge request|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/merge_requests/2445] of [TSG / tsg-os-buildimage|https://git.mesalab.cn/tsg/tsg-os-buildimage] on branch [update-maat_4_1_36|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/tree/update-maat_4_1_36]:{quote}update maat to 4.1.36, fix 3 bugs{quote}
---
## Attachments