ceph / ceph/python-crush

KeyError: 'pgmap'

未关闭
#4 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
22
派生
8
PR 合并指标
30 天内没有已合并 PR

描述

Running Ceph 12.2.5, crush 1.0.35 (current PyPI version).

Following documentation at https://crush.readthedocs.io/en/latest/ceph/optimize.html#how-to-rebalance-a-pool-step-by-step

```
$ ceph report > report.json
report 273333295
$ crush optimize \
--step 1 \
--crushmap report.json --out-path optimized.crush \
--pool 3
Traceback (most recent call last):
File "/usr/local/bin/crush", line 25, in
sys.exit(Ceph().main(sys.argv[1:]))
File "/usr/local/lib/python2.7/dist-packages/crush/main.py", line 136, in main
return self.constructor(argv).run()
File "/usr/local/lib/python2.7/dist-packages/crush/optimize.py", line 378, in run
crushmap = self.main.convert_to_crushmap(self.args.crushmap)
File "/usr/local/lib/python2.7/dist-packages/crush/ceph/__init__.py", line 776, in convert_to_crushmap
c.parse(crushmap)
File "/usr/local/lib/python2.7/dist-packages/crush/__init__.py", line 138, in parse
return self.parse_crushmap(self._convert_to_crushmap(something))
File "/usr/local/lib/python2.7/dist-packages/crush/ceph/__init__.py", line 447, in _convert_to_crushmap
crushmap = CephReport().parse_report(something)
File "/usr/local/lib/python2.7/dist-packages/crush/ceph/__init__.py", line 73, in parse_report
for pg_stat in report['pgmap']['pg_stats']:
KeyError: 'pgmap'
```

Other subcommands like "analyze" fails too.

贡献指南

这个仓库没有索引到贡献指南

调研方向

使用提供的 Ceph 报告重现文档中的 `crush optimize` 命令,然后检查 `crush/ceph/__init__.py` 中 `CephReport.parse_report` 附近的代码以及入口点 `crush/optimize.py`。将报告结构与 `parse_report` 所期望的字段进行比较,并检查 `analyze` 子命令是否遵循相同的路径。对于文档中的输入,这些命令不再因 `KeyError: 'pgmap'` 失败即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。