Commit Graph

3005 Commits

Author SHA1 Message Date
Johannes Zellner f3fec9a33c Handle 402 response on app installation 2017-06-19 12:17:55 +02:00
Girish Ramakrishnan 40aaffe365 tests: Fix usage of settings.setDnsConfig 2017-06-15 20:05:35 -07:00
Girish Ramakrishnan 3745e96a6f domain -> fqdn 2017-06-15 19:56:04 -07:00
Girish Ramakrishnan 9ead482dc6 Make verifyDnsConfig take zone name
part of #110
2017-06-15 19:55:24 -07:00
Girish Ramakrishnan 865c0a7aa7 Pass other level domains to dns API backends
part of #110
2017-06-15 19:55:01 -07:00
Girish Ramakrishnan c760c42f92 make waitForDns take zone name argument
part of #110
2017-06-15 19:54:08 -07:00
Girish Ramakrishnan ded31b977e Add config.setFqdn and config.setZoneName
Part of #110
2017-06-15 19:53:20 -07:00
Johannes Zellner 4781c4e364 Deliver empty JSON object on success
This ensures the client does not throw a parsing exception
2017-06-15 07:49:19 -07:00
Girish Ramakrishnan 658cbcdab9 bump mail container version (catchall support)
part of #33
2017-06-15 07:48:57 -07:00
Girish Ramakrishnan 0cc980f539 Add setting for catch all address
Note that this is not a flag on the mailboxes because we might theoretically
support forwarding to some other external domain in the future.

Part of #33
2017-06-15 07:48:46 -07:00
Johannes Zellner 87ca05281d Revert "Always check for updates prior to performing an update"
Lets keep the rest apis more single purpose and offload this case to the
client

This reverts commit 0bddd5a2c6.
2017-06-13 22:58:07 +02:00
Johannes Zellner 0bddd5a2c6 Always check for updates prior to performing an update
This covers the case where the box has not yet received a tarballUrl but
the user already setup a subscription.
2017-06-13 21:42:32 +02:00
Johannes Zellner 20f2a6e4c6 Block updates if sourceTarballUrl is missing 2017-06-13 21:33:03 +02:00
Johannes Zellner 6d47737de7 Remove unused require 2017-06-13 21:14:27 +02:00
Girish Ramakrishnan 23532eafea Fix path to version 2017-06-07 20:31:18 -07:00
Girish Ramakrishnan c0c07c2839 ensure .ssh dir exists
Fixes #349
2017-06-07 09:50:31 -07:00
Johannes Zellner daa4c66e7f Do not perform automatic updates for major platform version 2017-06-05 18:06:00 +02:00
Girish Ramakrishnan 414e9bdf05 Do not use lastBackupId in cleanup logic
lastBackupId is only used as a "message" passing field for apptask restore.

Theoretically, this code somehow protects a race between the cleanup logic
and the restore apptask. this is unlikely to happen and adds unnecessary
complexity.
2017-06-01 14:47:57 -07:00
Girish Ramakrishnan c342e52e7d Record copyLastBackup in the backupdb 2017-06-01 14:08:55 -07:00
Girish Ramakrishnan 78aa9c66f7 Add a note why we do not cleanup more aggressively yet 2017-06-01 10:33:49 -07:00
Girish Ramakrishnan 986ec02ac6 Add debug on what backup is preserved 2017-06-01 09:38:39 -07:00
Girish Ramakrishnan 4e0bb9187a lower case domain in migrate code path 2017-06-01 09:26:03 -07:00
Johannes Zellner 9c8a8571b4 Ensure we lowercase the domain name before consuming it in dns setup
Finally fixes #335
2017-06-01 17:29:46 +02:00
Girish Ramakrishnan 0c9dce0c9f redis: set memoryLimit to 600 because only half is RAM 2017-05-31 23:09:47 -07:00
Girish Ramakrishnan 471539d64b CNAME output from dig has trailing dot 2017-05-30 21:14:28 -07:00
Girish Ramakrishnan f34d429052 kill the backup process if it runs for too long 2017-05-30 16:11:12 -07:00
Girish Ramakrishnan 82e53bce36 ensure backups and clean them every 6 hours
also, make sure they don't run at the same time.
2017-05-30 16:04:32 -07:00
Girish Ramakrishnan b04a417cfc Cleanup errored and creating backups
Fixes #330
2017-05-30 15:16:08 -07:00
Girish Ramakrishnan 77641f4b51 Add backupdb.getByState and backupdb.getByTypeAndState
part of #330
2017-05-30 14:30:06 -07:00
Girish Ramakrishnan 765d20c8be Add backup states to track unfinished backups
part of #330
2017-05-30 13:43:30 -07:00
Girish Ramakrishnan d2420de594 refactor backup cleanup logic 2017-05-30 13:43:30 -07:00
Girish Ramakrishnan ddb69eb25c remove native-dns and use dig directly
native-dns module is unmaintained and we keep getting sporadic
errors from that module

Fixes #220
2017-05-26 16:51:05 -07:00
Girish Ramakrishnan 11697f11cf use constants for admin location 2017-05-24 15:41:37 -07:00
Girish Ramakrishnan 6fc69c05ca Add noop storage backend
This is sometimes useful when an update gets stuck because of some
bug in backup logic.

Note that you cannot restore from this backend because nothing is
saved.
2017-05-22 10:45:01 -07:00
Girish Ramakrishnan 65cff35be6 Do not dump certs in the log files 2017-05-19 14:39:08 -07:00
Girish Ramakrishnan 7467907c09 Do not dump data in update script since it might have the cert 2017-05-19 14:34:20 -07:00
Girish Ramakrishnan d6c32a2632 tweak redis memory limit based on app's memory 2017-05-18 15:39:38 -07:00
Johannes Zellner 7dc277a80c Give the backup task more memory 150 is often too close to the limit 2017-05-17 14:17:54 +02:00
Girish Ramakrishnan 88e844b545 Bump infra version to reconfigure apps for http2 support 2017-05-12 16:25:14 -07:00
Johannes Zellner d164f881ca Bring back code for alt domain match
There are no actual tests for this yet. Should be added.
2017-05-11 21:55:29 +02:00
Johannes Zellner 4994a5da49 Use -checkhost openssl subcommand 2017-05-11 21:31:01 +02:00
Johannes Zellner 374130d12a Only set local dns server if run on a cloudron 2017-05-11 15:37:44 +02:00
Johannes Zellner 05fcdb0a67 Extract CN from cert with JS
unlike the sed script, this does not rely on the order openssl reports the subject entities
2017-05-11 15:19:02 +02:00
Johannes Zellner 23827974d8 Fix certificate validation to work with new openssl version as well 2017-05-11 14:58:29 +02:00
Girish Ramakrishnan ae2c0f3503 Use new mail container (fix for exec) 2017-05-10 21:58:39 -07:00
Girish Ramakrishnan cbb93ef7ad For low end cloudrons, give a delay between addon starts
Starting them all at once, sometimes hogs cpu/memory too much
and makes the startup scripts of the addons error.

The new addons setup a .setup file to confirm initialization.
In a future commit, we can use those .setup files to check if
the addon has started up instead of a timeout
2017-05-10 15:43:02 -07:00
Girish Ramakrishnan 4d3c6f7caa better error message 2017-05-09 11:24:47 -07:00
Girish Ramakrishnan 6ef2f974ae fs: Use key to determine backup extension 2017-05-08 16:03:29 -07:00
Johannes Zellner ffc0a75545 user.get() returns UserErrors 2017-05-08 13:51:19 +02:00
Girish Ramakrishnan 8ae65661dd redact the password so it is never displayed in logs 2017-05-05 15:36:47 -07:00