Commit Graph

1456 Commits

Author SHA1 Message Date
resin-io-versionbot[bot]
2be9e18e25 Auto-merge for PR #492 via VersionBot
Forward resume options
2017-08-28 22:37:53 +00:00
resin-io-versionbot[bot]
3ed7687bf2 v6.2.5 2017-08-28 22:02:50 +00:00
Akis Kesoglou
a5980918b4 Forward resume options
Change-Type: patch
2017-08-29 00:02:26 +03:00
resin-io-versionbot[bot]
66f1be7d19 Auto-merge for PR #493 via VersionBot
Update docker-progress to v2.6.3
2017-08-28 20:39:34 +00:00
resin-io-versionbot[bot]
3211d170ca v6.2.4 2017-08-28 20:04:36 +00:00
Pablo Carranza Velez
5a369170c6 Update docker-progress to v2.6.3
2.6.2 has a serious bug which causes the js file to not be included in the published package.
Webpack gave us an unexpected workaround because it will add the .coffee file anyways, but we should
still update to the fixed version.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-28 10:02:50 -07:00
resin-io-versionbot[bot]
673996e2ee Auto-merge for PR #489 via VersionBot
Deploy all archs by default to Resin
2017-08-26 08:37:51 +00:00
resin-io-versionbot[bot]
8fe016362d v6.2.3 2017-08-26 08:04:47 +00:00
Akis Kesoglou
e2914012c0 Deploy all archs by default to Resin
Change-Type: patch
2017-08-25 23:36:31 +03:00
resin-io-versionbot[bot]
9b484543d7 Auto-merge for PR #491 via VersionBot
Remove a file from sqlite3 that took 30MB
2017-08-25 20:35:34 +00:00
resin-io-versionbot[bot]
282a9e38e6 v6.2.2 2017-08-25 18:42:28 +00:00
Pablo Carranza Velez
225f2318ba Remove an unnecessary directory from sqlite3 that took 30MB
node.dtps was big and useless.

See https://github.com/mapbox/node-sqlite3/issues/861

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-25 11:19:10 -07:00
resin-io-versionbot[bot]
2da570700d Auto-merge for PR #486 via VersionBot
Ensure /var/run/resin exists before trying to mount it as tmpfs
2017-08-18 22:26:34 +00:00
resin-io-versionbot[bot]
12e9253de6 v6.2.1 2017-08-18 21:52:43 +00:00
Pablo Carranza Velez
4ca311edbd Ensure /var/run/resin exists before trying to mount it as tmpfs
Fixes issues on systems where mount files if the target doesn't exist (seems to happen on
boards that run docker on overlayfs).

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-18 13:45:42 -07:00
resin-io-versionbot[bot]
05ab8ebf94 Auto-merge for PR #483 via VersionBot
Resumable deltas
2017-08-16 09:31:26 +00:00
resin-io-versionbot[bot]
4875c79703 v6.2.0 2017-08-16 08:48:18 +00:00
Akis Kesoglou
52c55a0c1b Apply a default timeout unless one is given 2017-08-09 11:55:22 +03:00
Akis Kesoglou
1412785886 Try to resume the download of a delta if it fails due to flaky network
Applying a delta update consists of two parts:

1. The request to the delta server for the delta payload (an rsync batch file, plus some prepended Docker metadata). The response is a redirect to a URL that contains the delta (currently S3).
2. The request for the actual download of the delta. The response is streamed directly to rsync, which applies it onto the mounted root filesystem of the final image.

The first step may take a while as it may trigger the generation of the delta if the request is the first one for this combination of src/dest image and the images are large. If the request times out, either because of the delta server taking too long to respond or bad network, the Supervisor automatically schedules a retry to be performed after a while.

Currently, similar behaviour applies to the second step as well -- if the request fails, we immediately bail out and the Supervisor schedules a retry of the whole process (i.e. from step 1). But in this case it means we might have downloaded and applied some or most of the delta when a socket timeout occurs causing us to start all over again, wasting time and bandwidth.

This commit splits the process into the two discreet steps and improves the behaviour on the second step. Specifically:

- makes the Supervisor try to resume the delta download request several times before it bails out and starts the process all over again.
- removes arbitrary timeout which applied over the whole process and meant some deltas would never manage to be applied (because of large delta size and low network bandwidth).
- makes sure any launched rsync processes always exit and any opened streams consumed and closed.

Most of the improvements are in the two dependencies linked below -- `resumable-request` and `node-docker-delta` -- and this commit merely combines the updated versions of these modules.

Change-Type: minor
Connects-To: #140
Depends-On: https://github.com/resin-io/node-docker-delta/pull/19
Depends-On: https://github.com/resin-io-modules/resumable-request/pull/2
2017-08-09 11:55:22 +03:00
resin-io-versionbot[bot]
b58eaf4de4 Auto-merge for PR #481 via VersionBot
Fix references in deploy-to-resin.js and use github credentials when pushing in pr-to-meta-resin.sh
2017-08-07 23:08:05 +00:00
resin-io-versionbot[bot]
24a23dece2 v6.1.4 2017-08-07 22:32:59 +00:00
Pablo Carranza Velez
925112bd13 Fix references in deploy-to-resin.js and use github credentials when pushing in pr-to-meta-resin.sh
deploy-to-resin.js had a few references to variables that are no longer defined.

In pr-to-meta-resin.sh, the passing of GitHub credentials was wrongly placed and messy.

As per @Page-'s advice, we use the credentials as part of the remote url when pushing (we don't do it when
cloning to avoid the github password being visible with a `git remote -v`).

We change GITHUB_USERNAME to GITHUB_USER as hub will automatically pick it up, avoiding the need
to pass the credentials when creating the PR.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-07 12:17:02 -03:00
resin-io-versionbot[bot]
bdf6214d12 Auto-merge for PR #484 via VersionBot
Avoid starting apps on startup if device has to reboot due to a config change
2017-08-03 21:20:45 +00:00
resin-io-versionbot[bot]
4d2c381e23 v6.1.3 2017-08-03 20:45:06 +00:00
Pablo Carranza Velez
6f87b1db18 Avoid starting apps on startup if device has to reboot due to a configuration change
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-02 20:07:13 -03:00
resin-io-versionbot[bot]
bb6652c52d Auto-merge for PR #472 via VersionBot
When the device is about to reboot or shutdown, close the API server and avoid applying updates
2017-07-28 00:35:58 +00:00
resin-io-versionbot[bot]
fdc7d49e18 v6.1.2 2017-07-27 23:59:50 +00:00
Pablo Carranza Velez
42ac7487e7 When the device is about to reboot or shutdown, close the API server and avoid applying updates
We mark when the device is rebooting and avoid some steps in the update cycle that change the device
state, similarly to when the device is in local mode, to avoid problems with non-atomic operations.
This doesn't solve *all* the potential scenarios of a reboot happening in the middle of an update, but at least
should prevent the case where we start an app container and reboot the device before saving the containerId, potentially
causing a duplicated container issue.

We also correct the API docs to reflect the 202 response when reboot or shutdown are successful.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 20:07:24 -03:00
resin-io-versionbot[bot]
bfc28a0ed4 Auto-merge for PR #469 via VersionBot
Some fixes for offline mode: don't persist uuid, and avoid an error with the missing apiEndpoint
2017-07-27 18:45:32 +00:00
resin-io-versionbot[bot]
902e31f1c0 v6.1.1 2017-07-27 18:07:56 +00:00
Pablo Carranza Velez
55ad977ede Avoid unhandled errors when in offline mode due to a missing apiEndpoint
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 12:46:14 -03:00
Pablo Carranza Velez
f0344ca4be Do not persist the uuid when in offline mode, so that the supervisor tries to provision if it goes out of offline mode
We used to store the uuid which would cause the supervisor to not attempt a provisioning even if offline mode
was turned off. This was to avoid preloaded apps being reloaded constantly leaving multiple containers.

We now avoid persisting the uuid, so that when the supervisor goes out of offline mode it can provision
without the need to wipe out the db. We avoid the problem with preloaded apps by not loading them
if there's apps already stored on the db.

(In the future, apps in the db will only represent target state and we can make preloaded apps be reloaded on every
start, but for now we can't do it as long as we store the containerId on the db - deleting an app on the db
means losing track of its containerId and therefore leaving an orphaned container)

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 12:46:14 -03:00
resin-io-versionbot[bot]
3ba7641d17 Auto-merge for PR #477 via VersionBot
Update docker-delta to 1.1.1, docker-toolbelt to 3.0.1, docker-progress to 2.6.0 to add support for deltas and overlay2
2017-07-27 15:20:35 +00:00
resin-io-versionbot[bot]
0f491c1a98 v6.1.0 2017-07-27 14:45:11 +00:00
Pablo Carranza Velez
7aedd7062d Update docker-delta to 1.1.1, docker-toolbelt to 3.0.1, docker-progress to 2.6.0 to add support for deltas and overlay2
This makes the Async suffix for docker functions unnecessary. It also allows us to remove dockerode as an
explicit dependency.

Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 01:48:35 -03:00
resin-io-versionbot[bot]
e5cac89f1b Auto-merge for PR #479 via VersionBot
Fix preloading and parsing of arguments in the dind supervisor
2017-07-27 04:44:44 +00:00
resin-io-versionbot[bot]
6978465ca8 v6.0.5 2017-07-27 04:06:14 +00:00
Pablo Carranza Velez
f5f8ca6df2 Allow building the supervisor source without optimizations for easier debugging with dindctl
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 20:30:51 -03:00
Pablo Carranza Velez
babee8667e Pull the supervisor image if it's not available when running with dindctl
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 20:30:51 -03:00
Pablo Carranza Velez
3771fd53ea Fix preloading and parsing of arguments in the dind supervisor
We now remove the quotes from the image name in the ExecStartPre of the supervisor dind service,
so that the images are properly pulled.

We also fix the parsing of arguments in dindctl so that it correctly parses all of the arguments (the last one was being missed if it didn't have a parameter).

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 20:30:51 -03:00
resin-io-versionbot[bot]
8e1a38d610 Auto-merge for PR #478 via VersionBot
Fix the message shown when docker gives a 500 error when starting a container
2017-07-26 20:02:44 +00:00
resin-io-versionbot[bot]
097262878d v6.0.4 2017-07-26 18:47:54 +00:00
Pablo Carranza Velez
279ab60233 Fix the message shown when docker gives a 500 error when starting a container
The test for an exec format error caused a `err.json.trim` is not a function
error so the message shown didn't relate to what the problem actually was.
This makes the test for the exec format error safer.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 10:41:25 -03:00
resin-io-versionbot[bot]
49d149a196 Auto-merge for PR #476 via VersionBot
Use a pinned build of the debian image to build base and gosuper, to avoid unnecessary rebuilds
2017-07-25 20:46:34 +00:00
resin-io-versionbot[bot]
b6742851f2 v6.0.3 2017-07-25 20:09:26 +00:00
Pablo Carranza Velez
7746d6be99 Use a pinned build of the debian image to build base and gosuper, to avoid unnecessary rebuilds
Up to now, a new debian:jessie build would invalidate the cache for the base and gosuper images, slowing down Circle builds.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-25 10:52:40 -03:00
resin-io-versionbot[bot]
654e6ce929 Auto-merge for PR #470 via VersionBot
Refactor build process and switch to CircleCI
2017-07-25 00:45:06 +00:00
resin-io-versionbot[bot]
7ee2d48706 v6.0.2 2017-07-24 20:03:30 +00:00
Pablo Carranza Velez
b328a1e916 Make the ARCH-supervisor-base image builder smaller by not keeping the downloads, sstate and build directories
We should revisit this if we want to later copy those folders into the host and use Circle's caching system with them, or if https://github.com/moby/moby/issues/32507 gets implemented in which case we can use a bind mounted folder instead.

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
d9605c71dd automation/build.sh: build base, nodesuper and gosuper before supervisor, and use them for cache
Otherwise the step where we build them doesn't reuse what was built when building the supervisor,
because we're explicitly setting `--cache-from` options.

We also push the images as soon as they're built.

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00