Remove warnings about there not being an application enabled produced by ceph for pools that are created by ceph_test_rados_io_sequence by setting an application after creation of pools make by the test tool.
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
void InjectECClearParityRead::decode_json(JSONObj* obj) {
JSONDecoder::decode_json("pool", pool, obj);
JSONDecoder::decode_json("objname", objname, obj);
+}
+
+void OSDEnableApplicationRequest::dump(Formatter* f) const {
+ encode_json("prefix", "osd pool application enable", f);
+ encode_json("pool", pool, f);
+ encode_json("app", app, f);
+ encode_json("yes_i_really_mean_it", yes_i_really_mean_it, f);
+ encode_json("key", key, f);
+ encode_json("value", value, f);
+}
+
+void OSDEnableApplicationRequest::decode_json(JSONObj* obj) {
+ JSONDecoder::decode_json("pool", pool, obj);
+ JSONDecoder::decode_json("app", app, obj);
+ JSONDecoder::decode_json("yes_i_really_mean_it", yes_i_really_mean_it, obj);
+ JSONDecoder::decode_json("key", key, obj);
+ JSONDecoder::decode_json("value", value, obj);
}
\ No newline at end of file
void decode_json(JSONObj* obj);
};
+ struct OSDEnableApplicationRequest {
+ std::string pool;
+ std::string app;
+ std::optional<bool> yes_i_really_mean_it;
+ std::optional<std::string> key;
+ std::optional<std::string> value;
+
+ void dump(Formatter* f) const;
+ void decode_json(JSONObj* obj);
+ };
+
// These structures are sent directly to the relevant OSD
// rather than the monitor
template <io_exerciser::InjectOpType op_type>
configureServices(allow_pool_autoscaling, allow_pool_balancer,
allow_pool_deep_scrubbing, allow_pool_scrubbing,
test_recovery);
+
+ setApplication(created_pool_name);
}
}
return pool_name;
}
+void ceph::io_sequence::tester::SelectErasurePool::setApplication(
+ const std::string& pool_name) {
+ bufferlist inbl, outbl;
+ auto formatter = std::make_shared<JSONFormatter>(false);
+
+ ceph::messaging::osd::OSDEnableApplicationRequest
+ enableApplicationRequest{pool_name, "rados"};
+
+ int rc = send_mon_command(enableApplicationRequest, rados,
+ "OSDEnableApplicationRequest", inbl, &outbl,
+ formatter.get());
+
+ ceph_assert(rc == 0);
+}
+
void ceph::io_sequence::tester::SelectErasurePool::configureServices(
bool allow_pool_autoscaling,
bool allow_pool_balancer,
bool disable_pool_ec_optimizations);
const std::string select() override;
std::string create();
- void configureServices(bool allow_pool_autoscaling,
- bool allow_pool_balancer,
- bool allow_pool_deep_scrubbing,
- bool allow_pool_scrubbing,
- bool test_recovery);
inline bool get_allow_pool_autoscaling() { return allow_pool_autoscaling; }
inline bool get_allow_pool_balancer() { return allow_pool_balancer; }
SelectErasureProfile sep;
std::optional<Profile> profile;
+
+ void configureServices(bool allow_pool_autoscaling,
+ bool allow_pool_balancer,
+ bool allow_pool_deep_scrubbing,
+ bool allow_pool_scrubbing,
+ bool test_recovery);
+
+ void setApplication(const std::string& pool_name);
};
class TestObject {