Girish Ramakrishnan
f3910f03ca
Enable logStream test
...
fixes apptask logs in test mode and the id of stream logs
2019-04-24 16:27:00 -07:00
Girish Ramakrishnan
d752c68790
re-factor all the audit source objects
2019-03-25 15:15:39 -07:00
Girish Ramakrishnan
46f46483f8
Mark as internal functions
2019-03-08 19:09:34 -08:00
Girish Ramakrishnan
0c350dcf6e
add a note
2019-03-06 16:05:50 -08:00
Girish Ramakrishnan
70e5daf8c6
Fix usage of audit source
2019-02-11 14:41:12 -08:00
Johannes Zellner
ed7a7bc879
Use eventlog directly for apptask crashes
2019-01-19 13:23:18 +01:00
Johannes Zellner
d3ebb99131
Fix apptask concurrency
...
This broke due to async behavior introduced with 1dc649b7a2
2018-11-13 12:54:40 +01:00
Johannes Zellner
f4f6f4e7e0
Use business logic for getting all apps in taskmanager
2018-06-29 23:14:06 +02:00
Johannes Zellner
8fa99fae1a
Put all apptask logs of an app in the same log file
2018-06-06 14:09:50 +02:00
Johannes Zellner
e9400e5dce
support test usecase to not put logs in /var/log
2018-06-06 14:09:50 +02:00
Johannes Zellner
1dc649b7a2
Put apptask logs alongside the app logs
2018-06-06 14:09:50 +02:00
Johannes Zellner
b6384d5025
Remove intrinsicFqdn
2018-02-08 15:07:49 +01:00
Johannes Zellner
fa65576688
Remove unused require
2018-02-08 15:04:13 +01:00
Girish Ramakrishnan
efc0a3b68d
Remove usage of config.appFqdn()
2018-01-10 13:58:05 -08:00
Johannes Zellner
e43e904622
Refactor all app.location usages to config.appFqdn(app)
2017-11-20 20:01:50 +01:00
Girish Ramakrishnan
53d56ef3a0
console.error -> debug
2017-02-07 10:48:51 -08:00
Girish Ramakrishnan
35cf9c454a
taskmanager: track paused state
2017-01-09 12:26:18 -08:00
Girish Ramakrishnan
21c66915a6
Refactor taskmanager resume flow
2017-01-09 10:49:34 -08:00
Girish Ramakrishnan
270a1f4b95
Merge gIsConfigured into config state
2017-01-06 10:23:10 +01:00
Girish Ramakrishnan
5dda872917
Add note about the log message
2016-12-14 19:21:43 -08:00
Girish Ramakrishnan
1e6b09c0da
reduce task concurrency
...
trying to restore many apps in low memory, just crashes everything
2016-10-09 13:27:46 -07:00
Girish Ramakrishnan
eb93903bb8
platform might already by ready
2016-06-22 12:03:08 -05:00
Girish Ramakrishnan
2a761a52d3
more debugs
2016-06-22 11:48:53 -05:00
Girish Ramakrishnan
87584be484
restartAppTask when resuming tasks
...
We end up with duplicate tasks because the auto installer might
have queued up some pending_install tasks on start up.
2016-06-21 10:56:25 -05:00
Girish Ramakrishnan
5a61c5ba51
platform: ready event
2016-06-21 10:46:02 -05:00
Girish Ramakrishnan
fbf7e6804f
add note for resuming tasks
2016-06-21 10:33:38 -05:00
Girish Ramakrishnan
1e54581c40
clear timer
2016-06-20 22:39:11 -05:00
Girish Ramakrishnan
6bc14ea7e4
resumeTasks only when configured and platform ready
2016-06-20 14:46:52 -05:00
Girish Ramakrishnan
26f318477b
Do not send crash logs for apptask cancellations
2016-06-14 14:13:47 -07:00
Girish Ramakrishnan
5e9ea98b66
ignore apps in errored state
2016-04-20 19:05:49 -07:00
Girish Ramakrishnan
eadff099eb
send logs when apptask fails
2016-04-19 18:40:46 -07:00
Girish Ramakrishnan
15653cb3f8
rename to logcollector
2016-04-19 18:13:05 -07:00
Girish Ramakrishnan
dad1585704
send crash notification on apptask crash
2016-04-19 16:43:58 -07:00
Girish Ramakrishnan
5fa974ffe6
wait for 30 seconds in taskmanager instead
...
problem: because the apps are not inserted into appdb, the cloudron starts out
with an empty view. apps appear suddenly after 30 seconds.
besides, it makes more sense because 30 secs is not really tied to first run
2016-04-19 13:56:41 -07:00
girish@cloudron.io
1fb26bc441
make startAppTask take a callback
2016-02-09 12:14:04 -08:00
girish@cloudron.io
e6d23a9701
stop previous task explicitly
...
there is a race:
1. task is running
2. new task is created overwriting the installationState
3. new task kills the old task of step 1. this results in installationState getting overwritten by 'error' because of the sigkill
4. new task that is launched loses the installationState that was step in 2.
2016-02-09 12:09:20 -08:00
girish@cloudron.io
0785266741
kill immediately. by default, it sends SIGTERM
2016-02-09 12:03:21 -08:00
Johannes Zellner
05245f5fc7
Add a way to wait and stop pending tasks
2016-01-29 16:25:31 +01:00
girish@cloudron.io
bcb0e61bfc
Kill child processes
...
On Unix, child processes are not killed when parent dies.
Each process is part of a process group (pgid). When pgid == pid,
it is the process group leader.
node creates child processes with the parent as the group leader
(detached = false).
You can send a signal to entire group using kill(-pgid), as in,
negative value in argument. Systemd can be made to do this by
setting the KillMode=control-group.
Unrelated: Process groups reside inside session groups. Each session
group has a controlling terminal. Only one process in the session
group has access to the terminal. Process group is basically like
a bash pipeline. A session group is the entire login session with only
one process having terminal access at a time.
Fixes #543
2016-01-21 17:44:17 -08:00
Girish Ramakrishnan
8ead0e662a
detect apptask crashes
2015-12-14 19:11:26 -08:00
Girish Ramakrishnan
9c549ed4d8
wait for old apptask to finish before starting new one
...
kill() is async and takes no callback :/
2015-11-09 22:10:10 -08:00
Girish Ramakrishnan
61fc8b7968
better taskmanager debugs
2015-11-09 21:58:34 -08:00
Girish Ramakrishnan
b1dbb3570b
Add configured event
...
Cloudron code paths like cron/mailer/taskmanager now wait for configuration
to be complete before doing anything.
This is useful when a cloudron is moved from a non-custom domain to a custom domain.
In that case, we require route53 configs.
2015-11-03 16:06:38 -08:00
Girish Ramakrishnan
612ceba98a
unsubscribe from events
2015-11-03 15:19:06 -08:00
Girish Ramakrishnan
7d5e0040bc
debug only if error
2015-11-03 15:15:37 -08:00
Girish Ramakrishnan
d6e19d2000
resume tasks only if cloudron is activated
2015-11-03 15:14:59 -08:00
Girish Ramakrishnan
a01d5db2a0
minor refactor
2015-11-02 17:45:38 -08:00
Girish Ramakrishnan
0877cec2e6
Fix EE leak warning
2015-09-29 14:40:23 -07:00
Girish Ramakrishnan
e97b9fcc60
Do not start apptask for apps that are installed and running
2015-09-08 10:24:39 -07:00
Girish Ramakrishnan
71fe643099
Check if we have reached concurrency limit before locking
2015-09-08 10:20:34 -07:00