Commit Graph

6330 Commits

Author SHA1 Message Date
Johannes Zellner 710cdc7bb8 Bring storage interface up to date 2017-04-21 10:01:58 +02:00
Johannes Zellner 0471a14894 We always encrypt even with empty key so make that clear with the file extension 2017-04-21 09:59:27 +02:00
Girish Ramakrishnan e4b1b73408 Add more 0.120.0 changes 2017-04-20 20:16:12 -07:00
Girish Ramakrishnan a6c2c608e4 storage/caas: bring it upto speed for new backup design 2017-04-20 20:12:45 -07:00
Girish Ramakrishnan 1cd36319ff s3: support setting the signatureVersion 2017-04-20 19:56:06 -07:00
Girish Ramakrishnan a65611a37b Fix error handling in s3 backend 2017-04-20 19:27:12 -07:00
Girish Ramakrishnan 4769d14414 Mark all fs failures as external errors
This gets the right error message on failures:

$ cloudron machine backup create
Waiting for backup to finish...backup failed: ENOENT: no such file or directory, open '/var/backups/2017-04-21-013900-584/app_7549c6a1-682e-4150-8b40-2c31a3fa92f7_2017-04-21-013900-591_v0.7.1.tar.gz'
2017-04-20 19:01:12 -07:00
Girish Ramakrishnan 64c2f3d8c3 copyBackup() already returns a BackupError 2017-04-20 18:56:34 -07:00
Girish Ramakrishnan 2083efdef8 Fix PERM issue when restoring an app with redis
This is the root cause of 926224bd5d.

0488aada9f caused a regression where
we setup addons in the restore code path. This meant that redis was
instantiated and running, changing the perms of the dir. Then when
the backup extract happens it fails as it has wrong permissions.
2017-04-20 18:12:29 -07:00
Girish Ramakrishnan a5efdb067d Revert "Add apprestoretask.js"
This reverts commit 926224bd5d.

This shouldn't be required. We already fix the perms

See 7035b3c18a
2017-04-20 18:12:29 -07:00
Girish Ramakrishnan 0584ace954 Remove StorageError from backends 2017-04-20 18:12:29 -07:00
Girish Ramakrishnan 77d23d6c15 return BackupsError on error 2017-04-20 18:12:29 -07:00
Girish Ramakrishnan a0c3a531b3 Remove unused file 2017-04-20 18:12:29 -07:00
Girish Ramakrishnan 31ea1e677c Simply change ownership instead instead of umask fiddling 2017-04-20 18:12:25 -07:00
Girish Ramakrishnan 2479af23ab app backups must have app version (and not box version) 2017-04-20 17:29:21 -07:00
Girish Ramakrishnan 83f36981f7 Make box backups work again 2017-04-20 16:26:42 -07:00
Ian Fijolek 851e70be6e Bump version to force creation of new containers 2017-04-20 21:34:31 +00:00
Ian Fijolek f0ba126156 Move dns-search from daemon to client as well
Verified no regression of #130
2017-04-20 21:33:16 +00:00
Ian Fijolek 9dd51575ab Set DNS per container rather than the daemon
All Cloudron containers need to have the nameserver 172.18.0.1. This was
being done at the daemon level, however since there are also iptables
rules restricting access to the nameserver from containers that aren't
on the Cloudron Docker network, this broke DNS for non-Cloudron
containers.

Since the DNS is only required for Cloudron containers in the first
place, this patch specifies 172.18.0.1 as the nameserver when Cloudron
creates a container and reverts the change at the daemon level
2017-04-20 19:02:10 +00:00
Girish Ramakrishnan cf701b8eb0 Use apt install instead so that deps are installed 2017-04-20 10:37:46 -07:00
Girish Ramakrishnan 9b4e81b476 Fix curl usage 2017-04-20 10:19:00 -07:00
Johannes Zellner 788873e858 Add error callbacks for backup in filesystem and s3 2017-04-20 16:18:27 +02:00
Johannes Zellner 926224bd5d Add apprestoretask.js 2017-04-20 16:10:13 +02:00
Johannes Zellner d9a0bf457d Don't make backup files executable 2017-04-20 16:02:13 +02:00
Johannes Zellner 6a5b0c194f No more restore mapping 2017-04-20 15:37:49 +02:00
Johannes Zellner 9f117fcfdc Also simplify the s3 backend 2017-04-20 15:35:52 +02:00
Johannes Zellner fe01d1bf28 Keep storage api as simple as possible
Do not support the directory mapping, which is only used for box backups
This greatly simplifies things, but needs a special fix for the box.
2017-04-20 15:20:11 +02:00
Johannes Zellner a94d44da75 Add generic node.sh to run node apps as root and with memory limitations 2017-04-20 15:20:11 +02:00
Girish Ramakrishnan 8ded006dea Fix apps.getLogs usage 2017-04-19 21:43:29 -07:00
Girish Ramakrishnan 5424a658f3 Do not read PTR records from /etc/hosts
Fixes #306
2017-04-19 19:34:22 -07:00
Girish Ramakrishnan b268a18695 Just destroy the client socket 2017-04-19 09:14:00 -07:00
Johannes Zellner 06f1b9dd1b Ensure we only call callback once for port 25 check
On a caas cloudron we saw timeout and end events raised, causing the box
to crash as async throws on double callbacks
2017-04-19 14:35:22 +02:00
Johannes Zellner e82bdfc996 Use a specific tag of our patched node-archiver 2017-04-19 13:38:46 +02:00
Johannes Zellner 40f5d0412b Bring the caas storage backend up to speed
This is mostly the same as the s3 backend at the moment
2017-04-19 13:30:05 +02:00
Johannes Zellner 65af062c33 Cleanup linter issues 2017-04-19 13:20:24 +02:00
Girish Ramakrishnan 68a1efe3d3 Download short format logs from web ui
Fixes #304
2017-04-18 21:04:45 -07:00
Girish Ramakrishnan 3cb4d4b1ab Add UI to download logs
Part of #304
2017-04-18 18:43:09 -07:00
Girish Ramakrishnan 0c706cffc0 Add API to get cloudron logs
part of #304
2017-04-18 15:19:26 -07:00
Girish Ramakrishnan 5f888341ea move eventlog api into /api/v1/cloudron 2017-04-18 15:18:00 -07:00
Girish Ramakrishnan cf69a8c4ce move feedback route into /api/v1/feedback 2017-04-18 14:49:28 -07:00
Girish Ramakrishnan a3ece64273 getDnsConfig only if admin 2017-04-18 14:41:02 -07:00
Girish Ramakrishnan 4bda11edcf Require admin for reboot, disk, graphs api 2017-04-18 14:31:55 -07:00
Girish Ramakrishnan 3913a8367b doc: provider is varied 2017-04-18 12:22:49 -07:00
Girish Ramakrishnan bac0ea17c2 update packages
this also updates dockerode
2017-04-18 12:22:49 -07:00
Girish Ramakrishnan d7f77de6c6 Add 0.120.0 changes 2017-04-18 12:22:49 -07:00
Girish Ramakrishnan d2d2818b0b wrap curl command with retry and timeouts 2017-04-18 12:22:49 -07:00
Girish Ramakrishnan b58fe9edd6 Update docker to CE 17.03
https://docs.docker.com/engine/installation/linux/ubuntu/#install-from-a-package
has helpful instructions.

This should also help use userns at some point (https://github.com/moby/moby/pull/25540)

Fixes #303
2017-04-18 12:22:32 -07:00
Girish Ramakrishnan dee8bec2dc doc: add note about what we collect 2017-04-18 10:20:29 -07:00
Johannes Zellner d5db9657ca Add s3 mock for the s3 storage tests 2017-04-18 19:15:56 +02:00
Johannes Zellner 9378b949fb Add s3 storage tests
Those are not mocked yet and require real aws things.
Change will follow for mocking. We should probably keep them optionally
working agains AWS directly to ensure things really work
2017-04-18 17:34:45 +02:00