Commit Graph

8931 Commits

Author SHA1 Message Date
Girish Ramakrishnan 8f8d099faf Add to changes 2019-12-06 12:23:49 -08:00
Girish Ramakrishnan 16660e083f Also set overwriteDns when manifest is not provided 2019-12-06 12:21:28 -08:00
Girish Ramakrishnan 4e35020a1c Set overwriteDns for install task 2019-12-06 12:11:34 -08:00
Girish Ramakrishnan 111e0bcb5f Fix repair route path 2019-12-06 11:44:41 -08:00
Girish Ramakrishnan d7f9a547fc Disable requiredState check for now
there is a race but this is mitigated by the checkAppState non-db logic
for now
2019-12-06 11:29:35 -08:00
Girish Ramakrishnan 6a64f24e98 Fix repair
If a task fails, we can either:
* allow other task ops to be called - we cannot do this because the ops are fine-grained. for example,
  a restore failure removes many things and calling set-memory or set-location in that state won't
  make sense.

* provide a generic repair route - this allows one to override args and call the failed task
  again. this is what we have now but has the issue that this repair function has to know about all
  the other op functions. for example, for argument validation. we can do some complicated refactoring
  to make it work if we want.

* just a generic total re-configure - this does not work because clone/restore/backup/datadir/uninstall/update
  failure leaves the app in a state which re-configure cannot do anything about.

* allow the failed op to be called again - this seems the easiest. we just allow the route to be called again
  in the error state.

* if we hit a state where even providing extra args, cannot get you out of this "error" state, we have to provide
  some repair route. for example, maybe the container disappeared by some docke error. user clicks 'repair' to
  recreate the container. this route does not have to take any args.

The final solution is:
* a failed task can be called again via the route. so we can resubmit any args and we get validation
* repair route just re-configures and can be called in any state to just rebuild container. re-configure is also
  doing only local changes (docker, nginx)
* install/clone failures are fixed using repair route. updated manifest can be passed in.
* UI shows backup selector for restore failures
* UI shows domain selector for change location failulre
2019-12-06 09:56:09 -08:00
Girish Ramakrishnan 37d7be93b5 Move oldManifest out of restoreConfig 2019-12-06 09:56:03 -08:00
Girish Ramakrishnan 9c809aa6e1 remove dead comment 2019-12-06 09:35:08 -08:00
Girish Ramakrishnan 7ab9f3fa2f re-configure does not require oldConfig
this is only needed when changing location now. the configure()
is now entirely local i.e rebuild local container and the reverse
proxy config
2019-12-06 09:23:58 -08:00
Girish Ramakrishnan ffeb484a10 No need to return args as part of task.get
This reverts commit 831e22b4ff.
This reverts commit 6774514bd2.
2019-12-06 08:42:49 -08:00
Girish Ramakrishnan 2ffb32ae60 Skip moving data if source and target are same 2019-12-06 08:09:43 -08:00
Girish Ramakrishnan 905bb92bad s3: ensure BoxError return 2019-12-05 21:50:44 -08:00
Girish Ramakrishnan 3926efd153 restore: only take non-empty backupId 2019-12-05 21:16:35 -08:00
Girish Ramakrishnan c5e5bb90e3 better error message 2019-12-05 21:16:35 -08:00
Girish Ramakrishnan cea543cba5 On backup error, only set the task error
at some point, the backup ui can show this error
2019-12-05 16:34:40 -08:00
Girish Ramakrishnan a8b489624d fix error messages 2019-12-05 16:27:00 -08:00
Girish Ramakrishnan 49d3bddb62 Show download progress when restoring rsync backups 2019-12-05 15:44:52 -08:00
Girish Ramakrishnan c0ff3cbd22 move progressTag to the end 2019-12-05 15:44:52 -08:00
Girish Ramakrishnan 1de97d6967 do not clear localstorage during in-place import 2019-12-05 12:42:08 -08:00
Girish Ramakrishnan a44a82083e Add backups.testProviderConfig
fields like format/retention won't be validated here since it's only
testing the access credentials
2019-12-05 11:55:53 -08:00
Girish Ramakrishnan d57681ff21 put fqdn in the end 2019-12-05 11:15:21 -08:00
Girish Ramakrishnan e3de2f81d3 setup and clear addons before import 2019-12-05 11:12:40 -08:00
Girish Ramakrishnan e8c5f8164c do not delete data dir for in-place import 2019-12-05 11:01:27 -08:00
Girish Ramakrishnan c07e215148 Use BoxError in on error cases 2019-12-05 09:54:29 -08:00
Girish Ramakrishnan 4bb676fb5c add asserts 2019-12-05 09:32:45 -08:00
Johannes Zellner dbdf86edfc No need to return the same data which the route got passed in 2019-12-05 18:02:57 +01:00
Johannes Zellner 2c8e6330ce Do not allow to change the sysinfo in demo mode 2019-12-05 16:06:21 +01:00
Girish Ramakrishnan 1b563854a7 implement in-place import and custom backup config 2019-12-04 19:27:05 -08:00
Girish Ramakrishnan 80b890101b Add changes 2019-12-04 17:53:02 -08:00
Girish Ramakrishnan c3696469ff Add app fqdn to backup progress message 2019-12-04 17:49:31 -08:00
Girish Ramakrishnan 3e08e7c653 Typo in docker socket path 2019-12-04 14:37:00 -08:00
Girish Ramakrishnan 53e39f571c Make addons code remove a BoxError 2019-12-04 14:28:42 -08:00
Girish Ramakrishnan c992853cca lint 2019-12-04 11:18:39 -08:00
Girish Ramakrishnan 85e17b570b Use whilst instead of forever
this gets rid of the Error object
2019-12-04 11:17:44 -08:00
Girish Ramakrishnan 30eccfb54b Use BoxError instead of Error in all places
This moves everything other than the addon code and some 'done' logic
2019-12-04 11:02:54 -08:00
Girish Ramakrishnan 3623831390 Typo 2019-12-04 10:23:16 -08:00
Girish Ramakrishnan d0a3d00492 Use NOT_IMPLEMENTED error code 2019-12-04 10:22:22 -08:00
Girish Ramakrishnan 0b6fbfd910 Better addon error messages 2019-12-04 10:09:57 -08:00
Girish Ramakrishnan 8cfb27fdcd Add changes 2019-12-03 15:39:29 -08:00
Girish Ramakrishnan 841ab54565 better logs 2019-12-03 15:11:27 -08:00
Girish Ramakrishnan a2e9254343 lint 2019-12-03 15:10:06 -08:00
Johannes Zellner 43cb03a292 Send provider and version during registration 2019-12-02 18:19:51 +01:00
Johannes Zellner f2fca33309 Add support to upload custom profile avatar 2019-12-02 18:03:54 +01:00
Johannes Zellner 14d26fe064 Do not crash on migration
A bit late but still
2019-12-02 18:03:54 +01:00
Girish Ramakrishnan 9cc968e790 Pass the new data dir as a task argument 2019-11-25 14:22:27 -08:00
Girish Ramakrishnan 831e22b4ff Fix failing test 2019-11-23 18:35:15 -08:00
Girish Ramakrishnan 6774514bd2 Return args as part of task.get
the ui needs this to repair any failed app task
2019-11-23 18:06:33 -08:00
Girish Ramakrishnan f543b98764 Remove BoxError.UNKNOWN_ERROR 2019-11-22 14:27:41 -08:00
Johannes Zellner 2e94600afe Don't set 'Starting ...' as initial task progress message
This is confusing for tasks like "stop" as it will say "Starting ..."
2019-11-22 13:54:43 +01:00
Johannes Zellner 9295ce783a Other logs are lowercase 2019-11-22 12:31:41 +01:00