Merged
【d903cc816ec41065afabadec82079c3f】feat: 支持storage组件管理功能灵活裁剪(北向接口) #1729
byosoft_yanbinyaoAdd on 5 days ago
【d903cc816ec41065afabadec82079c3f】feat: 支持storage组件管理功能灵活裁剪(北向接口) #1729
Merged
byosoft_yanbinyaoAdd on 5 days ago
byosoft_yanbinyao
byosoft_yanbinyaoCollaborators
5 days ago

当前PR是否有AI参与:

[x] 否

[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

PR功能描述 / 为什么需要这个合入:

配合 storage 组件存储管理功能灵活裁剪(feature_basic=true),补齐北向接口(Redfish/Web/SNMP/CLI)的映射条目裁剪。裁剪构建下删除存储管理写/管理动作的北向接口映射(逻辑盘/阵列创建删除初始化、RAID卡设置、硬盘设置、加密擦除、日志收集、分区使用率阈值设置等),保留查询/只读接口,满足 issue #674「裁剪后写/管理动作不支持、只读正常、不报错」的要求,支撑极简 BMC 能力、降低内存占用。定位灯/故障灯设置属基础运维能力,保留不裁剪。

修改方案:

在 rackmount 仓 4 个 trim_associations.json 的 feature_basic 段声明裁剪条目(由 bingo FeatureConfigPatch 读取 manifest 顶层 default_options.feature_basic=true 后删除):
image.png

验证方案:

默认构建(全量,北向接口不变)+ feature_basic=true 裁剪构建双路验证。裁剪包中北向表现分三类,均不报内部错误:

对象保留的写动作(RPC 方法 + Redfish OEM action)→ ActionNotSupported(Base.1.0.ActionNotSupported);
对象整体裁剪(诊断日志收集、固件升级等)→ 404/空。保留的查询/只读接口(逻辑盘/阵列/硬盘/BBU/分区信息、定位灯/故障灯设置)正常返回

测试建议:

部署裁剪包逐通道验证:① RPC 写方法(DeleteVolume、RAID卡设置、硬盘设置)Redfish Storage/Storages Actions 的 POST→ ActionNotSupported;②诊断/固件升级 → 404/空;定位灯设置正常、只读查询正常;SNMP/CLI 写命令不注册。

自验证报告:

见 存储管理功能灵活裁剪验证报告 https://gitcode.com/openUBMC/storage/issues/674?ref=&did=992793130f5984615955806a09e049c4605bea33#tid-201336865

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #https://gitcode.com/openUBMC/storage/issues/674

希望检视人员了解:

likedislike
Pull Request has been successfully merged by openUBMC-robot.
(Thank you for byosoft_yanbinyao's contribution.)
byosoft_yanbinyaobyosoft_yanbinyaoCollaborators
5 days ago Created pull request, commit 3373beab
byosoft_yanbinyaobyosoft_yanbinyaoCollaborators
5 days ago Associated issue: [需求]: 支持Chassis下新增Assembly资源,[需求]: 支持storage组件管理功能灵活裁剪
byosoft_yanbinyaobyosoft_yanbinyaoCollaborators
5 days ago Modify description of pull request
byosoft_yanbinyaobyosoft_yanbinyaoCollaborators
5 days ago Modify description of pull request
huangminghao
huangminghaoCollaborators5 days agoStart code review2
interface_config/redfish/trim_associations.json
@@ -512,2 +512,4 @@
512512 "Uri.Actions": {
513513 "Remove": [
514+ {
515+ "Target": "mapping_config/Systems/Storage/Volumes/Volumes.json",
huangminghao
huangminghao5 days agoComments:

🔵 [低] 裁剪条目核对通过;两项前置项

核对结果(本次已逐条比对 rackmount 映射配置,均命中):

  • redfish Uri.Actions.Remove 的 Uri/Method 与 mapping_config 实际一致:Systems/Storage/Volumes/Volumes.json(集合 POST、成员 PATCH/DELETE、Volume.Initialize、InitializeActionInfo)、Systems/Storages/Volumes/*、Chassis/Drives/Actions.json(Drive.Reset)、Chassis/Drives/Drives.json(Drive.CryptoErase)、Chassis/Drives/Drives.json 成员 PATCH;Method/Method[] 用法与既有条目一致(Uri.Actions 用数组、Property.Actions 用字符串)。
  • web_backend 10 个 Uri 全部存在(含 :storageid/Volumes、:controllerid/*、:id、Settings、Drives/:id/PhysicalDrivesCryptoErase、Drives/:id/DumpLog、:raidcontrollerid/DumpControllerLog);System/Performance.json:/UI/Rest/System/DiskUsage 存在。
  • snmp 两条、cli ipmcset/storage.json + 6 个 echoes/ipmcset/storage_* 文件均存在。

两项前置项:

  1. mergeable=False(与 main 存在冲突),合入前需 rebase;
  2. PR 描述关联 issue 写为 fixes #https://gitcode.com/openUBMC/storage/issues/674,格式非法(# 后应为纯序号),建议改为 fixes #674。
likedislike
byosoft_yanbinyao
byosoft_yanbinyaoCollaborators
4 days ago Comments:

已合入最新main代码,pr描述无需改动

likedislike
54 messages are collapsed here。 See more
openUBMC-robotopenUBMC-robotCollaborators
4 days ago Removed label: unresolved-reviews
huangminghao
huangminghaoCollaborators
4 days ago Comments:

/check-pr

likedislike
openUBMC-robotopenUBMC-robotCollaborators
4 days ago Merged pull request, merge node SHA: 92926ea456c6af808ee5f027b927061b63cf632d
openUBMC-robotopenUBMC-robotCollaborators
4 days ago Change title to "【d903cc816ec41065afabadec82079c3f】feat: 支持storage组件管理功能灵活裁剪(北向接口)", originally titled "feat: 支持storage组件管理功能灵活裁剪(北向接口)".
openubmc-ci-bot
openubmc-ci-botCollaborators
4 days ago Comments:

This component has been successfully published.

likedislike