<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would like to know your opinion to this proposal:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Requirement is, that it should be possible to load / unload a plugin dynamically. The ability to monitor the Network Function Virtualization Infrastructure (NFVI) where VNFs are in operation will be a key part of Service Assurance within
 an NFV environment, in order to enforce SLAs or to detect violations, faults or degradation in the performance of NFVI resources so that events and relevant metrics are reported to higher level fault management systems. A key part of this will be the ability
 to modify the configuration of the monitoring agent (in this case collectd) on the fly, as well as the configuration of the resources that are being monitored without restarting the monitoring agent (as you would lose other metrics/events during the restart
 period).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With this new functionality, it will be possible to load all plugins dynamically. But when the dynamic loading of the plugin fails, we must avoid using this plugin. We have two possibilities: shut down the collectd or keep the plugin loaded
 but skip all its callbacks. For the second option there is a possibility to load the plugin again with the new configuration, but there can be problem with memory leaks during configuration of the plugin. The decisions is up the user and the behavior can be
 handled by an upper layer application.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When the plugin needs to be unloaded dynamically, the plugin must clean the memory used by the plugin. In case that plugin does not have a proper shutdown callback, then new dynamic unload functionality cannot be used, because it could
 cause a memory leaks. Such behavior is unacceptable. This is the reason why we propose the new plugin registration function. This function will register plugin to the list of plugins, which supports dynamic unload. And only this registered plugin can use the
 new unload functionality. All those, who want to use this new unload functionality, would have to update requested plugin.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When collectd is started it loads the whole configuration. During parsing of the configuration it loads all configured plugins. When the plugin is loaded, collectd calls plugin function “module_register” and the plugin can register its
 callback to the read/write threads. If the plugin needs configuration data, the daemon sends the configuration to the plugin afterwards. Then collectd drops all configuration data, performing the initialization of all plugins and starts read/write threads.<o:p></o:p></p>
<p class="MsoNormal">As we need to load plugin dynamically, there is the problem, that the plugin can be registered to the read/write threads (or other callbacks) before it gets proper configuration information. But read/write threads are already running (and
 other callback can be called too). And the plugin callbacks can be called while the plugin is not properly configured. The solution is to skip all plugin callbacks until the plugin will be properly configured and ready to work.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">BR, Radek<o:p></o:p></p>
</div>
</body>
</html>