Commit Graph

8865 Commits

Author SHA1 Message Date
Girish Ramakrishnan
fc2786b07f taskworker: fix programming error 2024-11-01 16:15:32 +01:00
Girish Ramakrishnan
4a207395ca middleground in timeout
DO BLR droplets still fail with 1s timeout!
2024-10-31 10:22:55 +01:00
Girish Ramakrishnan
2df983a1cf lower timeout 2024-10-31 09:50:20 +01:00
Girish Ramakrishnan
03e17aea22 taskworker: refactor 2024-10-31 09:46:36 +01:00
Girish Ramakrishnan
aefa481c43 network: fix premature connection closures with node 20 and above
the happy eyeballs implementation in node is buggy. ipv4 and ipv6 connections
are made in parallel and whichever responds first is chosen. when there is no
ipv6 (immediately errors with ENETUNREACH/EHOSTUNREACH) and when ipv4 is > 250ms,
the code erroneously times out.

see also https://github.com/nodejs/node/issues/54359

reproduction for those servers:

const options = {
  hostname: 'www.cloudron.io', port: 80, path: '/', method: 'HEAD',
  // family: 4, // uncomment to make it work
};

const req = require('http').request(options, (res) => {
  console.log('statusCode:', res.statusCode);
  res.on('data', () => {}); // drain
});

req.on('socket', (socket) => console.log('Socket assigned to request', socket););
req.on('error', (e) => console.error(e));
req.end();
2024-10-31 09:38:40 +01:00
Girish Ramakrishnan
553c256d31 better debugs 2024-10-30 20:58:37 +01:00
Girish Ramakrishnan
0df1e3a47f appstore: networkError is an aggreate error 2024-10-30 18:30:53 +01:00
Girish Ramakrishnan
78a08c5a0b Use a real string as second argument since message can be undefined 2024-10-30 17:59:55 +01:00
Girish Ramakrishnan
55a880c9ac Fix typo
14a18a42b7
2024-10-30 17:41:57 +01:00
Girish Ramakrishnan
61341b8380 boxerror: always pass second error string 2024-10-30 17:32:12 +01:00
Girish Ramakrishnan
a32b567eb1 boxerror: remove unused override 2024-10-30 15:43:53 +01:00
Johannes Zellner
8621fbda79 Enable refresh tokens for oidc provider 2024-10-29 16:20:53 +01:00
Johannes Zellner
84de986efd Network mounts should only depend on systemd network-online.target now 2024-10-29 14:07:03 +01:00
Johannes Zellner
14a18a42b7 Avoid crash in externalldap if search result has no username 2024-10-22 14:49:14 +02:00
Johannes Zellner
2c28eddc2b Fix linter errors 2024-10-22 14:40:53 +02:00
Girish Ramakrishnan
1b22ea661c avatar: deliver .png images
this is required for mastodon atleast. if the oidc avatar url, returns
an svg, it crashes!

the profile pic png was created using inkspace:
inkscape -w 96 -h 96 avatar-default-symbolic.svg -o avatar-default-symbolic.png
2024-10-18 22:39:18 +02:00
Girish Ramakrishnan
efc3c7532e Move requires to the top 2024-10-18 21:50:38 +02:00
Girish Ramakrishnan
df5ba25010 shell: add explicit bash() function 2024-10-16 10:40:17 +02:00
Johannes Zellner
d66db8ca40 Use the correct new redis image 2024-10-15 22:28:52 +02:00
Johannes Zellner
0722d7ceb9 Update redis addon to set memory policy to noeviction 2024-10-15 22:07:17 +02:00
Girish Ramakrishnan
7fbb9f9df3 remove explicit encoding 2024-10-15 12:23:32 +02:00
Girish Ramakrishnan
6c3ca9c364 shell: rework code to use shell.spawn
spawn gives out streams and we have more control over the stdout/stderr
buffers. otherwise, we have to provide a max buffer capture size to exec
2024-10-15 12:13:46 +02:00
Girish Ramakrishnan
7b648cddfd shell: direct exports not needed anymore 2024-10-15 09:26:02 +02:00
Girish Ramakrishnan
a9e1d7641d shell: make require take a tag 2024-10-14 21:08:32 +02:00
Girish Ramakrishnan
02823c4158 test: use same dashboard dir 2024-10-14 19:03:52 +02:00
Girish Ramakrishnan
d58789cc25 test: more test fixing 2024-10-14 18:37:22 +02:00
Girish Ramakrishnan
434a0cba9f test: translation path has changed 2024-10-14 18:33:04 +02:00
Girish Ramakrishnan
ca8695a1d3 typo 2024-10-14 18:26:16 +02:00
Girish Ramakrishnan
7f141605fa log the backuptask crash reason 2024-10-14 18:26:01 +02:00
Girish Ramakrishnan
23f9b5f2fc logs: when no timestamp, use the last known 2024-10-14 16:30:30 +02:00
Girish Ramakrishnan
6361737cf4 sudo: use debug() to have provide timestamped logs
the exception is when sudo calls backupupload.js which already has timestamped
output because it uses node

an alternative idea is to maybe not use this flag at all and always parse the output.
this is a bit complicated since we have to look for a timestamp in a stream.
2024-10-14 15:38:55 +02:00
Girish Ramakrishnan
ba75c7ddaa porkbun: api endpoint has changed
https://porkbun.com/api/json/v3/documentation
2024-10-12 10:58:21 +02:00
Girish Ramakrishnan
ff5dccc2b4 remove obsolete comment 2024-10-12 10:50:58 +02:00
Girish Ramakrishnan
34969d9980 groups: bump group_concat_max_len to accomdate more users 2024-10-09 19:12:53 +02:00
Johannes Zellner
da11e90333 Static busy spinner for oidc login views 2024-10-09 13:14:43 +02:00
Johannes Zellner
282d06404e Static assets are actually on / 2024-10-09 12:56:25 +02:00
Johannes Zellner
1b3fd20755 Fixup oidc pages to match new location of dashboard assets 2024-10-09 11:31:02 +02:00
Girish Ramakrishnan
ce5a2b1f0a gandi: use PAT token instead
https://api.gandi.net/docs/authentication/
2024-10-08 17:51:01 +02:00
Johannes Zellner
9f06b91399 Merge remaining frontend into dashboard 2024-10-04 21:37:17 +02:00
Girish Ramakrishnan
ea2479beda system: also get rota information 2024-09-30 14:09:15 +02:00
Girish Ramakrishnan
0504e0423a backups: add hetzner object storage 2024-09-25 12:21:42 +02:00
Girish Ramakrishnan
c1c16ab54e test: add simple gitlab-ci file 2024-09-20 18:48:55 +02:00
Girish Ramakrishnan
76dc856dbf test: fix system test 2024-09-20 15:37:34 +02:00
Vladimir D
227fdf10dd OIDC: id_token added to client response types 2024-09-20 14:16:40 +02:00
Girish Ramakrishnan
19c744b17d unbound-anchor is now part of ExecStartPre
it seems unbound-anchor is not a dep of unbound in ubuntu 24. some
installations are thus missing this package.

in any case, ignore unbound-anchor exit status
2024-09-20 10:00:01 +02:00
Vladimir D
3ce74d04d0 OIDC: groups claim added to make groups provisioned 2024-09-19 13:08:20 +02:00
Girish Ramakrishnan
1148724613 boxerror: handle AggregateError 2024-09-19 11:44:47 +02:00
Girish Ramakrishnan
f526695aae cloudron-support: enable-ssh has an alias enable-remote-support 2024-09-19 08:38:59 +02:00
Girish Ramakrishnan
777834d790 dig: set tries parameter 2024-09-18 15:25:48 +02:00
Girish Ramakrishnan
dca9246450 Fix AdGuard resolving dashboard to docker bridge IP
Issue 1: DO droplet when given the name my.blah.com , will put an entry
in /etc/hosts with `127.0.1.1 my.blah.com` . When app containers use
system DNS, they get this IP address which does not work inside a container.

An idea is to remove this entry when running cloudron-setup, but maybe this
causes trouble later.

Issue 2: Some networks seem to lack loopback networking. With OIDC changes,
we want the apps to access my.blah.com even if hairpin nat is not working.

Solution: make my.blah.com to resolve to the docker bridge IP (172.18.0.1)
where nginx also listens to. This means that such requests never go outside the server

Caveats:
* This breaks AdGuard which now starts resolving it to 172.18.0.1 for
the entire network! So, we skip ExtraHosts configuration for adguard

* Maybe ExtraHosts should be scoped to OIDC apps only. But the thought here is
that it will help apps like say n8n which are querying dasahboard.
2024-09-18 14:42:11 +02:00