Commit Graph

9240 Commits

Author SHA1 Message Date
Girish Ramakrishnan
4f608bdc5f Fix tasks test 2025-07-18 20:55:54 +02:00
Girish Ramakrishnan
48559d3358 tasks: distinguish runtime crash vs task error in worker 2025-07-18 20:02:06 +02:00
Girish Ramakrishnan
5d8871a044 boxerror: remove usage of Object.assign 2025-07-18 19:33:34 +02:00
Girish Ramakrishnan
a684fadf43 metrics: fix crash 2025-07-18 19:32:04 +02:00
Girish Ramakrishnan
7e0803c4b4 clean up task locks 2025-07-18 18:12:07 +02:00
Girish Ramakrishnan
cb52dfdd0f backups.backupApp was used by the app update logic 2025-07-18 17:44:22 +02:00
Girish Ramakrishnan
c10593e4ac tasks: remove the prefix for invokation lookup 2025-07-18 14:33:26 +02:00
Girish Ramakrishnan
0fa281083e apps: backup is not a state anymore
this is launched as a separate task
2025-07-18 14:14:54 +02:00
Girish Ramakrishnan
0aca6c2588 locks: rename lock types to make it clearer 2025-07-18 13:40:15 +02:00
Johannes Zellner
e181abe797 Polish disk usage 2025-07-18 13:36:48 +02:00
Girish Ramakrishnan
7818219763 system: query docker size lazily 2025-07-18 13:05:33 +02:00
Girish Ramakrishnan
25d20266b8 diskusage: emit other entry 2025-07-18 13:02:53 +02:00
Girish Ramakrishnan
17ce6f7291 apptaskmanager: release lock and clear active task on task failure 2025-07-17 14:54:47 +02:00
Girish Ramakrishnan
7047ee9391 shell: add timeout logic and rework error handling
what's important:

* if task code ran, it exits with 0. this code is regardless of (error, result)
  * when it exited cleanly, we will get the values from the database

* if task timed out, the box code kills it and it has a flag tracking timedOut. we can
  ignore exit code in this case.

* if task code was stopped, box code will send SIGTERM which ideally it will handle and end with 70.

* if task code crashed and it caught the exception, it will return 50

* if task code crashed and node nuked us, it will exit with 1

* if task code was killed with some unhandleabe signal, taskworker.sh will return the signal (9=SIGKILL)
2025-07-17 12:44:24 +02:00
Girish Ramakrishnan
5e1c32b606 shell: rename signal to abortSignal
this prevents accidental typos with child_process signal handling
2025-07-17 09:50:43 +02:00
Girish Ramakrishnan
38032f0b77 remove the ignored debug 2025-07-17 09:47:26 +02:00
Girish Ramakrishnan
6364ea8e57 grammar 2025-07-17 08:30:51 +02:00
Girish Ramakrishnan
c796e724aa shell/task: better logs 2025-07-17 02:04:50 +02:00
Girish Ramakrishnan
63053f46a8 shell: remove sudoCallback 2025-07-17 01:54:39 +02:00
Girish Ramakrishnan
8bf8c278f0 system: add tests for fs usage route 2025-07-17 01:42:28 +02:00
Girish Ramakrishnan
aa0c186c8c logStream is not used anymore 2025-07-17 00:37:29 +02:00
Girish Ramakrishnan
5539f74bea system: add disk usage task 2025-07-17 00:09:50 +02:00
Johannes Zellner
ce63dbde1b Check current subscription status once a day 2025-07-16 22:11:11 +02:00
Girish Ramakrishnan
989d843fcb shell: make shell.sudo promise based and waitable 2025-07-16 22:04:24 +02:00
Girish Ramakrishnan
32d07e7959 add spurious log 2025-07-16 21:37:30 +02:00
Girish Ramakrishnan
50b585c1dd shell: merge some options 2025-07-16 21:32:27 +02:00
Girish Ramakrishnan
e03beba9bc sudo: add kill-child.sh
ultimately, a non-previlieged child cannot kill previlieged parent.
all the notes and research in shell.js are not useful.
2025-07-16 21:26:57 +02:00
Girish Ramakrishnan
e4ceedcac6 logs: use child_process.spawn directly for sudo
shell.sudo will move to a promise based API shortly
2025-07-16 20:23:57 +02:00
Johannes Zellner
ed288317c4 Use the same app label in login and app grid 2025-07-16 18:21:34 +02:00
Johannes Zellner
3754021ae8 Make the proxyauth login visually distinctive from oidc login 2025-07-16 18:20:43 +02:00
Girish Ramakrishnan
7214ce2ede support: remove ssh manipulation routes
this is now moved entirely to cloudron-support --enable-remote-access.

this emphasizes more that users have to get ssh access to the server before
we can do anything about it. it's far too simple for people to click this
button.

we have now also added clear terms to understand what remote access entails.
(what happens if support personnel makes a mistake. who is liable? etc)
2025-07-16 17:53:19 +02:00
Johannes Zellner
d1dcbd97b7 Build proxyauth entrypoint as a single inlined html file 2025-07-16 17:45:33 +02:00
Johannes Zellner
30c0690e90 Bring back proxyauth proceed-to-login view 2025-07-16 17:45:33 +02:00
Girish Ramakrishnan
4b79881472 system: route to get filesystem 2025-07-16 17:20:28 +02:00
Girish Ramakrishnan
b42be9899e tasks: add completed flag
in some cases, the tasks are setting percent to 100 and crashing later
2025-07-16 15:40:46 +02:00
Girish Ramakrishnan
5548ed1b57 s3: fix malformed endpoint URL from older versions
this is specifically for linode, but may apply for other storages too
2025-07-16 09:12:57 +02:00
Johannes Zellner
4eed77e123 Do not crash in gcs if remote path has zero objects 2025-07-15 20:39:38 +02:00
Girish Ramakrishnan
56e4af58d3 fix comment 2025-07-15 11:20:05 +02:00
Girish Ramakrishnan
622aecfd6d users: add unset route for avatar
also add missing tests for avatar and profile locking
2025-07-15 10:06:26 +02:00
Girish Ramakrishnan
be9adb64bb fix tests 2025-07-15 09:07:23 +02:00
Girish Ramakrishnan
bb257f2bf2 s3: make delete objects work again again 2025-07-15 01:11:23 +02:00
Girish Ramakrishnan
76f365f7e8 s3: make delete objects work again 2025-07-15 00:13:40 +02:00
Girish Ramakrishnan
499336e752 s3: fix debug 2025-07-14 22:24:23 +02:00
Girish Ramakrishnan
e53ec3e43c s3: add debugging code 2025-07-14 21:59:56 +02:00
Girish Ramakrishnan
8b5fe714e1 rsync: throw on del error 2025-07-14 21:59:56 +02:00
Girish Ramakrishnan
11e9f0eaf2 progress-stream: handle destroy 2025-07-14 16:29:18 +02:00
Girish Ramakrishnan
6f653a603b rsync: first try with one file. if that works, go faster
this works better if encryption fails. intead of downloading many files
and erroring non-stop
2025-07-14 16:29:18 +02:00
Johannes Zellner
a7bba61b6a Better error message if hostPath is already used in a volume 2025-07-14 16:15:01 +02:00
Girish Ramakrishnan
15ac81c1cd s3: format errors with .Code 2025-07-14 15:54:31 +02:00
Girish Ramakrishnan
26637c0f1c backuptask: improve the debugs 2025-07-14 15:16:28 +02:00