Bug 7973 - stopping toaster kills ALL django apps running on the machine.
Summary: stopping toaster kills ALL django apps running on the machine.
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2
Assignee: Ed Bartosh
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 7972
  Show dependency tree
 
Reported: 2015-07-08 21:10 UTC by brian avery
Modified: 2016-09-09 06:42 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brian avery 2015-07-08 21:10:11 UTC
because we run 
ps fux | grep "python.*manage.py runserver" | awk '{print $2}' | xargs kill

my analysis instantiation of toaster on :8000 was killed when I stopped my build version on :8001.  My Django tutorial running on port 8003 was also killed.
Comment 1 Belen Barros Pena 2016-04-25 14:35:31 UTC
I am not sure if Brian Avery will be available to do much Toaster work, so setting this one to the default assignee for the moment. Brian: feel free to take it back if you really want it!
Comment 2 Ed Bartosh 2016-07-05 14:33:26 UTC
I've found possible easy way to fix this bug while I was working on documentation for production setup. If we run toaster in the screen session then 'screen -S<session> -X quit' will kill only processes started in the session. It does it very reliably. I never noticed any processes left if I quite screen session.

Does it make sense to use this approach from your point of view?
Comment 3 brian avery 2016-07-06 17:59:20 UTC
Sadly, no.  I'm addicted to screen. Unfortunately, a large number of users seem to find it very confusing and adding an additional level of complexity (learning screen commands, in this case) runs counter to the goal of toaster being easier to use than bitbake cli.
Comment 4 Ed Bartosh 2016-07-07 08:33:35 UTC
Ok then, I'll go with setting a pid namespace [1] to main toaster script. It's proven way to reliably kill all the children of main process. This would require a bit more work though.

1. http://man7.org/linux/man-pages/man7/pid_namespaces.7.html
Comment 5 Ed Bartosh 2016-08-31 11:17:38 UTC
patchset has been sent for review: http://lists.openembedded.org/pipermail/openembedded-core/2016-August/126002.html
Comment 6 Ed Bartosh 2016-09-09 06:42:20 UTC
Patchset has been merged to master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b22a505414db060b5df0ce3d6c84c5dffd38463e