mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
Merge pull request #40964 from tchaikov/wip-disable-rook-mgr-module
vstart.sh: disable "rook" mgr module by default Reviewed-by: Josh Durgin <jdurgin@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
This commit is contained in:
commit
97f34ec0d9
@ -75,7 +75,7 @@ void PyModuleRegistry::init()
|
||||
std::list<std::string> failed_modules;
|
||||
|
||||
const std::string module_path = g_conf().get_val<std::string>("mgr_module_path");
|
||||
std::set<std::string> module_names = probe_modules(module_path);
|
||||
auto module_names = probe_modules(module_path);
|
||||
// Load python code
|
||||
for (const auto& module_name : module_names) {
|
||||
dout(1) << "Loading python module '" << module_name << "'" << dendl;
|
||||
@ -270,12 +270,12 @@ void PyModuleRegistry::shutdown()
|
||||
Py_Finalize();
|
||||
}
|
||||
|
||||
std::set<std::string> PyModuleRegistry::probe_modules(const std::string &path) const
|
||||
std::vector<std::string> PyModuleRegistry::probe_modules(const std::string &path) const
|
||||
{
|
||||
const auto opt = g_conf().get_val<std::string>("mgr_disabled_modules");
|
||||
const auto disabled_modules = ceph::split(opt);
|
||||
|
||||
std::set<std::string> modules;
|
||||
std::vector<std::string> modules;
|
||||
for (const auto& entry: fs::directory_iterator(path)) {
|
||||
if (!fs::is_directory(entry)) {
|
||||
continue;
|
||||
@ -287,7 +287,7 @@ std::set<std::string> PyModuleRegistry::probe_modules(const std::string &path) c
|
||||
}
|
||||
auto module_path = entry.path() / "module.py";
|
||||
if (fs::exists(module_path)) {
|
||||
modules.emplace(name);
|
||||
modules.push_back(name);
|
||||
}
|
||||
}
|
||||
return modules;
|
||||
|
@ -58,7 +58,7 @@ private:
|
||||
/**
|
||||
* Discover python modules from local disk
|
||||
*/
|
||||
std::set<std::string> probe_modules(const std::string &path) const;
|
||||
std::vector<std::string> probe_modules(const std::string &path) const;
|
||||
|
||||
PyModuleConfig module_config;
|
||||
|
||||
|
@ -736,6 +736,7 @@ $COSDSHORT
|
||||
$(format_conf "${extra_conf}")
|
||||
[mon]
|
||||
mgr initial modules = $mgr_modules
|
||||
mgr disabled modules = rook
|
||||
$DAEMONOPTS
|
||||
$CMONDEBUG
|
||||
$(format_conf "${extra_conf}")
|
||||
|
Loading…
Reference in New Issue
Block a user