Return a histogram of pg state values
(self)
| 2546 | return pgids |
| 2547 | |
| 2548 | def compile_pg_status(self): |
| 2549 | """ |
| 2550 | Return a histogram of pg state values |
| 2551 | """ |
| 2552 | ret = {} |
| 2553 | j = self.get_pg_stats() |
| 2554 | for pg in j: |
| 2555 | for status in pg['state'].split('+'): |
| 2556 | if status not in ret: |
| 2557 | ret[status] = 0 |
| 2558 | ret[status] += 1 |
| 2559 | return ret |
| 2560 | |
| 2561 | @wait_for_pg_stats # type: ignore |
| 2562 | def with_pg_state(self, pool, pgnum, check): |