Commit Graph

793 Commits

Author SHA1 Message Date
Girish Ramakrishnan
9399040cd3 Fix log recursion
shell.sudo logs output to stdout/stderr intentionally. It is not meant
for scripts that generate much output (basically scripts/* files).

core of the issue is that none of the log commands require to use sudo.
they can just use normal tail. only app logs requires sudo because of the
logPaths directive in the manifest.
2024-07-25 17:48:58 +02:00
Girish Ramakrishnan
7ebf5ca16a Bring back upload route to keep e2e happy
let's maybe remove it in next release
2024-07-23 08:28:44 +02:00
Johannes Zellner
185c16c3e2 remove apps upload api in favor of sftp container api 2024-07-22 16:20:15 +02:00
Girish Ramakrishnan
01deb4d285 update: updateConfig can be missing values, selectively update db 2024-07-17 08:58:43 +02:00
Girish Ramakrishnan
aeddaa4566 apps: rework portBindings
ports is REST API input . Map of env var to the host port
portBinding is the database structure. Map of env var to host port, count, type etc

also, rename portCount -> count in various places to keep things consistent
2024-07-17 00:25:47 +02:00
Girish Ramakrishnan
620c49cf76 Fix signature of checkForPortBindingsConflict 2024-07-16 19:31:54 +02:00
Girish Ramakrishnan
6d73dfdb40 parse port count as integer 2024-07-16 19:28:22 +02:00
Girish Ramakrishnan
9bf240d83b update: handle change in secondary domains and multiDomain flag 2024-07-16 10:32:31 +02:00
Girish Ramakrishnan
07396c9824 Revert "support: add route to repair apps"
This reverts commit 0bab0ed748.

It's better to somehow integrate this into the dashboard ...
2024-07-12 14:22:47 +02:00
Girish Ramakrishnan
0bab0ed748 support: add route to repair apps 2024-07-11 18:30:29 +02:00
Girish Ramakrishnan
d9b478cf1f rename setupStorage to setupManagedStorage 2024-06-25 13:06:40 +02:00
Johannes Zellner
20396a8c7d Adjust checklist item api to support audits trail 2024-06-24 19:09:03 +02:00
Girish Ramakrishnan
d0df897f93 typo 2024-06-11 14:01:13 +02:00
Girish Ramakrishnan
692be297b3 app proxy: protect code accessing containerId 2024-06-10 11:23:29 +02:00
Girish Ramakrishnan
f386c326e2 apptask: only move app uses localstorage addon 2024-06-06 16:26:02 +02:00
Girish Ramakrishnan
4229e9921c blacklisted -> blocked 2024-05-23 09:53:47 +02:00
Johannes Zellner
0c80b7af1d dashboard: show checklist items in postinstall dialog 2024-05-20 18:13:17 +02:00
Girish Ramakrishnan
4a5022d14d lint: const fixes 2024-05-13 08:43:33 +02:00
Girish Ramakrishnan
d137cdf881 update cron module
CronJob -> CronJob.from
CronJob(time) -> CronTime
2024-04-19 18:31:47 +02:00
Johannes Zellner
49243822af dashboard: show app checklist 2024-04-19 14:17:54 +02:00
Johannes Zellner
7d6636bb54 Only add checklist items if they apply due to sso state 2024-04-18 16:05:38 +02:00
Johannes Zellner
3c7e6b59f0 Add initial support for apps.checklist 2024-04-17 16:54:54 +02:00
Johannes Zellner
87ae95aa4f Add per-app notes feature 2024-04-10 18:34:58 +02:00
Girish Ramakrishnan
b4e4f26361 Rework cpuShares into cpuQuota
cpuShares is the relative weight wrt other apps. This is used when
there is contention for CPU. If we want this, maybe we implement
a UI where we show all the apps and let the user re-order them.
As it stands, it is confusing.

cpuQuota is a more straightforward "hard limit" of the CPU% that you
want the app to consume.

Can be tested with : stress -c 8 -t 20s
2024-04-10 18:25:14 +02:00
Girish Ramakrishnan
8b7dca00af app memory: make slider go till RAM
anything above RAM is useless
2024-04-10 12:12:49 +02:00
Girish Ramakrishnan
be2775e12e memoryLimit: redefine to not include swap
Currently, we allocate 50% as RAM and 50% as swap. The manifest is
usually quite conservative on memory values. This means that we set
up a system where the app is applying memory pressure almost immediately.
This then swaps things randomly and increases cpu usage (kswapd shows
up in the profile).

To rethink the whole situation: we should not cap apps with a swap limit at all.
The memory hard limit is what is important. By redefining memoryLimit , we are
doubling every container's memory and it's good that we over allocate this.
2024-04-09 18:59:40 +02:00
Girish Ramakrishnan
2b1b304c6e backup/import/restore: fix crash with root path calcuation
rootPath was calculated before the arguments were validated
2024-04-09 13:53:48 +02:00
Girish Ramakrishnan
62faf616c5 import: acceptSelfSignedCerts is validated at provider 2024-04-09 13:24:33 +02:00
Girish Ramakrishnan
774f14327c addons: optional start mongodb based on AVX 2024-03-30 19:20:24 +01:00
Girish Ramakrishnan
a82fb0c2cb typo from 110e68331 2024-03-30 19:17:28 +01:00
Girish Ramakrishnan
110e683318 rename checkManifestConstraints function 2024-03-30 18:25:37 +01:00
Girish Ramakrishnan
104997d77c syslog: change it to unix domain socket
docker is using a extra udp port for every container. when there is
a lot of containers, a lot of random udp ports get used up. this causes
problems when installing apps that require contiguous port ranges
2024-03-21 18:59:08 +01:00
Girish Ramakrishnan
0fea30969f Remove bad assert 2024-03-01 14:52:54 +01:00
Johannes Zellner
dec7bc3ca3 Check for portBindings with range outside the db constraint for now 2024-02-29 15:20:17 +01:00
Girish Ramakrishnan
aecc16af5d add inboxDomain fk constraint 2024-02-27 13:45:08 +01:00
Girish Ramakrishnan
5927f397a3 translate port bindings after validation 2024-02-27 13:19:19 +01:00
Girish Ramakrishnan
1e85c86e74 clone: also clone crontab, enableTurn, enableRedis etc 2024-02-27 11:49:12 +01:00
Girish Ramakrishnan
6640929b01 remove unnecessary variable 2024-02-27 11:44:42 +01:00
Girish Ramakrishnan
7a333ace11 minor variable rename 2024-02-27 11:35:14 +01:00
Johannes Zellner
d98b09f802 Forward portCount during the portBinding translation 2024-02-25 16:52:10 +01:00
Johannes Zellner
97c012b3df Use full portBindings object internally also for validation 2024-02-25 16:28:57 +01:00
Johannes Zellner
867b8e0253 Also adjust portbindings env variable name check according to the manifest uppercase fix 2024-02-25 16:18:02 +01:00
Johannes Zellner
80400db92a Handle portCount in translatePortBindings 2024-02-25 14:33:57 +01:00
Girish Ramakrishnan
13e62bc738 logs: use stream.destroy() instead of custom hooks 2024-02-24 17:35:37 +01:00
Girish Ramakrishnan
0e83658aa3 make sudo commands terminate properly
sudo forks and execs the program. sudo also hangs around as the parent of the program waiting on the program and also forwarding signals.
sudo does not forward signals when the originator comes from the same process group. recently, there has been a change where it will
forward signals as long as sudo or the command is not the group leader (https://www.sudo.ws/repos/sudo/rev/d1bf60eac57f)
for us, this means that calling kill from this node process doesn't work since it's in the same group (and ubuntu 22 doesn't have the above fix).
the workaround is to invoke a kill from a different process group and this is done by starting detached
another idea is: use "ps --pid cp.pid -o pid=" to get the pid of the command and then send it signal directly

see also: https://dxuuu.xyz/sudo.html
2024-02-24 16:19:07 +01:00
Johannes Zellner
909fe5dc15 Add appPortBindings port count column 2024-02-23 17:57:24 +01:00
Girish Ramakrishnan
d0dc104ede logs: make logPaths work
we have to tail via sudo script

Fixes #811
2024-02-23 17:46:22 +01:00
Girish Ramakrishnan
a6f078330f shell: no need to promise scoping 2024-02-21 19:40:27 +01:00
Girish Ramakrishnan
14c9260ab0 shell: exec encoding is utf8 by default and no shell
explicitly mark calls that require the shell
2024-02-21 17:47:25 +01:00
Girish Ramakrishnan
c1bb4de6a3 reverseproxy: use async exec 2024-02-21 12:33:04 +01:00