[Lxc-users] Is lxc-start threadsave?
Jäkel, Guido
G.Jaekel at dnb.de
Tue Jul 5 15:05:17 UTC 2011
>> is lxc-start threadsave, i.e. may a start up different containers in
>> parallel? Have I to apply a individual value for 'lxc.rootfs.mount',
>> e.g. by use of the process id or 'mktemp'. Or something else, more?
>
>Ah, you're mixing apples and oranges here. Starting up two containers
>in parallel means you are running lxc-start twice and that's two full
>heavy-weight processes, no threads required and nothing to do with
>requiring threat-safe.
Your'e completely right, that 'thread-save' wasn't the right term. And of corse, booting a bunch of containers by sequential calls of lxc-start will take not significant more time than doing it in parallel -- because most of the lauch time is spend by the Linux bootstrapping.
But I want to know it for another reason: If I going to write automated scripts to lauch some containers, they might be called "at the same time" (in terms of the lauch time of lxc before forking the init). And therefore I ask if I have to avoid a possible race condition by any kind of semaphore or is it safe to lauch it more than one time.
Guido
More information about the lxc-users
mailing list