Commit 4940596
committed
cephadm: still set keep_container_info key in CoreStatusUpdater when cinfo is None
When testing an unrelated thing with rm-cluster cleaning up
OSD devices, I was hitting
```
Traceback (most recent call last):
File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/sbin/cephadm/__main__.py", line 5400, in <module>
File "/usr/sbin/cephadm/__main__.py", line 5388, in main
File "/usr/sbin/cephadm/__main__.py", line 3996, in command_rm_cluster
File "/usr/sbin/cephadm/__main__.py", line 4034, in _rm_cluster
File "/usr/sbin/cephadm/__main__.py", line 428, in _infer_image
File "/usr/sbin/cephadm/cephadmlib/container_lookup.py", line 127, in infer_local_ceph_image
File "/usr/sbin/cephadm/cephadmlib/container_lookup.py", line 128, in <listcomp>
KeyError: '_container_info'
```
which appears to have been caused by the CoreStatusUpdater only
setting the "keep_container_info" key entry when the container
info it gets back from get_container_stats is not None. This
patch has it set that key entry even when the container info
is None, and updates infer_local_ceph_image to be able to
handle the container info at that entry being None as well.
Signed-off-by: Adam King <[email protected]>1 parent 5549c10 commit 4940596
File tree
4 files changed
+51
-3
lines changed- src/cephadm
- cephadmlib
- tests
4 files changed
+51
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | | - | |
64 | | - | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
807 | 831 | | |
808 | 832 | | |
809 | 833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
232 | 254 | | |
233 | 255 | | |
234 | 256 | | |
| |||
0 commit comments