Commit fbcdf57
committed
node-proxy: address
ce360a4 introduced a regression.
`ceph orch hardware status` fails when no hostname is passed (global
cluster hw status report).
Typical failure:
```
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1928, in _handle_command
return self.handle_command(inbuf, cmd)
File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 186, in handle_command
return dispatch[cmd['prefix']].call(self, cmd, inbuf)
File "/usr/share/ceph/mgr/mgr_module.py", line 527, in call
return self.func(mgr, **kwargs)
File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 122, in <lambda>
wrapper_copy = lambda *l_args, **l_kwargs: wrapper(*l_args, **l_kwargs) # noqa: E731
File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 111, in wrapper
return func(*args, **kwargs)
File "/usr/share/ceph/mgr/orchestrator/module.py", line 553, in _hardware_status
row = [k, v['sn']]
KeyError: 'sn'
```
Only the last node in the list has the `sn`, `host` and `firmwares`
information because of the wrong identation.
Fixes: https://tracker.ceph.com/issues/71472
Signed-off-by: Guillaume Abrioux <[email protected]>ceph orch hardware status cmd1 parent 40cdb8c commit fbcdf57
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1709 | 1709 | | |
1710 | 1710 | | |
1711 | 1711 | | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
1715 | 1715 | | |
1716 | 1716 | | |
1717 | 1717 | | |
| |||
0 commit comments