Fixes: #10519
Signed-off-by: Kiseleva Alyona <akiselyova@mirantis.com>
<< "\t" << st.last_change
<< "\t" << st.version
<< "\t" << st.reported_epoch << ":" << st.reported_seq
- << "\t" << st.up
+ << "\t" << pg_vector_string(st.up)
<< "\t" << st.up_primary
- << "\t" << st.acting
+ << "\t" << pg_vector_string(st.acting)
<< "\t" << st.acting_primary
<< "\t" << st.last_scrub << "\t" << st.last_scrub_stamp
<< "\t" << st.last_deep_scrub << "\t" << st.last_deep_scrub_stamp
// ---
+std::string pg_vector_string(const vector<int32_t> &a)
+{
+ ostringstream oss;
+ oss << "[";
+ for (vector<int32_t>::const_iterator i = a.begin(); i != a.end(); ++i) {
+ if (i != a.begin())
+ oss << ",";
+ if (*i != CRUSH_ITEM_NONE)
+ oss << *i;
+ else
+ oss << "NONE";
+ }
+ oss << "]";
+ return oss.str();
+}
+
std::string pg_state_string(int state)
{
ostringstream oss;
#define PG_STATE_ACTIVATING (1<<24) // pg is peered but not yet active
std::string pg_state_string(int state);
-
+std::string pg_vector_string(const vector<int32_t> &a);
/*
* pool_snap_info_t