1) The entry point for the container logger module is here: https://github.com/apache/mesos/blob/1.3.x/src/slave/container_logger.cpp#L42-L52
All modules have a "create" method which attempts to load the dynamic library containing the module. The --modules flag you specify at agent/master startup time tells the agent/master where to find the library and what the symbol name to load is. For other invocations of the module(s), you'll need to look for places in the code where the module interface is called. The precise module class obviously won't be referenced directly within the codebase (because they're loaded at runtime, rather than at compile time). 2) Modules are loaded precisely so that they have an influence (otherwise, why load a module at all?). If you don't like the side effects of a module, your choices are to either disable the module, or to tweak the module yourself and reload it. On Tue, May 30, 2017 at 8:38 PM, liang tang <liangtang20080...@gmail.com> wrote: > 1. Cannot find mesos module entry where module will start to run? didn't > find in slave/main.cc or module/mananger.cc > > 2. Why process in mesos module exits, service cannot be run in Marathon? > In my option, module shouldn't have an influence on service running. > > Which code will invoke code about container logger module in > https://github.com/apache/mesos/blob/master/src/slave/ > container_loggers/lib_logrotate.cpp#L309-L339 > > > > mesos::modules::Module<ContainerLogger> > org_apache_mesos_LogrotateContainerLogger( > MESOS_MODULE_API_VERSION, > MESOS_VERSION, > "Apache Mesos", > "modules@mesos.apache.org", > "Logrotate Container Logger module.", > nullptr, > [](const Parameters& parameters) -> ContainerLogger* { > // Convert `parameters` into a map. > std::map<std::string, std::string> values; > foreach (const Parameter& parameter, parameters.parameter()) { > values[parameter.key()] = parameter.value(); > } > > // Load and validate flags from the map. > mesos::internal::logger::Flags flags; > Try<flags::Warnings> load = flags.load(values); > > if (load.isError()) { > LOG(ERROR) << "Failed to parse parameters: " << load.error(); > return nullptr; > } > > // Log any flag warnings. > foreach (const flags::Warning& warning, load->warnings) { > LOG(WARNING) << warning.message; > } > > return new mesos::internal::logger::LogrotateContainerLogger(flags); > }); >