[Devel] [PATCH 3/6] proc connector: proc listeners helpers added

Andrey Ryabinin aryabinin at virtuozzo.com
Tue Aug 15 17:40:14 MSK 2017


On 08/15/2017 05:20 PM, Stanislav Kinsburskiy wrote:

>>>
>>
>> E.g. we have listener on host, i.e. with all init namespaces. And we also have listener in some container.
>> Let's say we have task "A" in the container which have global pid 10 and pid 3 in container.
>> So if "A" forks, the host listener must receive message that task 10 forked, and the containers listener must receive message that task 3 forked.
>>
> 
> Hmm. This also makes sense. But painful.
> Sending one message for both ve#0 and CT initial pid namespaces should be enough, what do you think?
> 

Well I'd prefer to make this right instead. Also it seems doable without ve craft.

I think we need to keep some list of listeners. In proc_fork_connector() iterate through this list
and call  task_pid_nr_ns(task, listener->pid_ns); for every listener. If it returned nothing than we should
skip that listener, and if task_pid_nr_ns() returned something craft and send the message to the listener->net_ns.

Obviously, something similar has to be for other connectors.


More information about the Devel mailing list