* [PATCH v2 0/3] improved process management
@ 2016-08-31 11:54 Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 1/3] toaster: don't kill toaster on start Ed Bartosh
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Ed Bartosh @ 2016-08-31 11:54 UTC (permalink / raw)
To: toaster
Hi,
This is a set of small improvements for process management in
toaster script and a fix for bug #7973
Changes in v2: Had to remove usage of user and pid namespaces as it's not supported
in some distros.
The following changes since commit 34ccad16d40ec0685f405b8d7116250fb58e323d:
buildinfohelper: discover kernel artifacts correctly (2016-08-23 14:29:32 +0300)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/toaster/kill-toaster-7973
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/kill-toaster-7973
Ed Bartosh (3):
toaster: don't kill toaster on start
toaster: remove handling of .toasterui.pid
toaster: don't kill all runserver processes
bitbake/bin/toaster | 15 ---------------
1 file changed, 15 deletions(-)
--
Regards,
Ed
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 1/3] toaster: don't kill toaster on start
2016-08-31 11:54 [PATCH v2 0/3] improved process management Ed Bartosh
@ 2016-08-31 11:54 ` Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 2/3] toaster: remove handling of .toasterui.pid Ed Bartosh
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ed Bartosh @ 2016-08-31 11:54 UTC (permalink / raw)
To: toaster
There is no point of trying to kill django development server
when toaster starts because 'manage.py checksocket' command is already
used in the script code to check if development server port is occupied.
Even if Toaster is listening on another port, killing previous instance
looks quite implicit and doesn't solve anything as there are other
processes that might be still running.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
bitbake/bin/toaster | 8 --------
1 file changed, 8 deletions(-)
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index e35bfce..5e01101 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -249,14 +249,6 @@ case $CMD in
fi
fi
- # kill Toaster web server if it's alive
- if [ -e $BUILDDIR/.toastermain.pid ] && kill -0 `cat $BUILDDIR/.toastermain.pid`; then
- echo "Warning: bitbake appears to be dead, but the Toaster web server is running." 1>&2
- echo " Something fishy is going on." 1>&2
- echo "Cleaning up the web server to start from a clean slate."
- webserverKillAll
- fi
-
# Create configuration file
conf=${BUILDDIR}/conf/local.conf
line='INHERIT+="toaster buildhistory"'
--
2.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/3] toaster: remove handling of .toasterui.pid
2016-08-31 11:54 [PATCH v2 0/3] improved process management Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 1/3] toaster: don't kill toaster on start Ed Bartosh
@ 2016-08-31 11:54 ` Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 3/3] toaster: don't kill all runserver processes Ed Bartosh
2016-09-02 14:53 ` [PATCH v2 0/3] improved process management Barros Pena, Belen
3 siblings, 0 replies; 5+ messages in thread
From: Ed Bartosh @ 2016-08-31 11:54 UTC (permalink / raw)
To: toaster
This file is not created anywhere, but handled in toaster
script code.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
bitbake/bin/toaster | 4 ----
1 file changed, 4 deletions(-)
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 5e01101..b14749a 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -95,10 +95,6 @@ stop_system()
# prevent reentry
if [ $INSTOPSYSTEM -eq 1 ]; then return; fi
INSTOPSYSTEM=1
- if [ -f ${BUILDDIR}/.toasterui.pid ]; then
- kill `cat ${BUILDDIR}/.toasterui.pid` 2>/dev/null
- rm ${BUILDDIR}/.toasterui.pid
- fi
webserverKillAll
# unset exported variables
unset TOASTER_DIR
--
2.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 3/3] toaster: don't kill all runserver processes
2016-08-31 11:54 [PATCH v2 0/3] improved process management Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 1/3] toaster: don't kill toaster on start Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 2/3] toaster: remove handling of .toasterui.pid Ed Bartosh
@ 2016-08-31 11:54 ` Ed Bartosh
2016-09-02 14:53 ` [PATCH v2 0/3] improved process management Barros Pena, Belen
3 siblings, 0 replies; 5+ messages in thread
From: Ed Bartosh @ 2016-08-31 11:54 UTC (permalink / raw)
To: toaster
Toaster script kills runserver process 2 ways:
- sending signal to pid from .toastermain.pid.
- sending signal to pids found by grepping ps output:
ps fux | grep "python.*manage.py runserver"
Second approach is redundant and harmfull as it kills all django
development server running on the machine.
[YOCTO #7973]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
bitbake/bin/toaster | 3 ---
1 file changed, 3 deletions(-)
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index b14749a..6641dbc 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -33,9 +33,6 @@ webserverKillAll()
while kill -0 $pid 2>/dev/null; do
kill -SIGTERM -$pid 2>/dev/null
sleep 1
- # Kill processes if they are still running - may happen
- # in interactive shells
- ps fux | grep "python.*manage.py runserver" | awk '{print $2}' | xargs kill
done
rm ${pidfile}
fi
--
2.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2 0/3] improved process management
2016-08-31 11:54 [PATCH v2 0/3] improved process management Ed Bartosh
` (2 preceding siblings ...)
2016-08-31 11:54 ` [PATCH v2 3/3] toaster: don't kill all runserver processes Ed Bartosh
@ 2016-09-02 14:53 ` Barros Pena, Belen
3 siblings, 0 replies; 5+ messages in thread
From: Barros Pena, Belen @ 2016-09-02 14:53 UTC (permalink / raw)
To: Ed Bartosh, toaster@yoctoproject.org
On 31/08/2016 12:54, "toaster-bounces@yoctoproject.org on behalf of Ed
Bartosh" <toaster-bounces@yoctoproject.org on behalf of
ed.bartosh@linux.intel.com> wrote:
>Hi,
>
>This is a set of small improvements for process management in
>toaster script and a fix for bug #7973
>
>Changes in v2: Had to remove usage of user and pid namespaces as it's not
>supported
> in some distros.
>
>The following changes since commit
>34ccad16d40ec0685f405b8d7116250fb58e323d:
>
> buildinfohelper: discover kernel artifacts correctly (2016-08-23
>14:29:32 +0300)
>
>are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib ed/toaster/kill-toaster-7973
>
>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/kill-t
>oaster-7973
This seems to be working for me. With 2 toaster instances running on the
same machine, I can now stop one of them without the other being killed.
Thanks!
Belén
>
>Ed Bartosh (3):
> toaster: don't kill toaster on start
> toaster: remove handling of .toasterui.pid
> toaster: don't kill all runserver processes
>
> bitbake/bin/toaster | 15 ---------------
> 1 file changed, 15 deletions(-)
>
>--
>Regards,
>Ed
>
>--
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-02 14:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-31 11:54 [PATCH v2 0/3] improved process management Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 1/3] toaster: don't kill toaster on start Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 2/3] toaster: remove handling of .toasterui.pid Ed Bartosh
2016-08-31 11:54 ` [PATCH v2 3/3] toaster: don't kill all runserver processes Ed Bartosh
2016-09-02 14:53 ` [PATCH v2 0/3] improved process management Barros Pena, Belen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.