Commit Graph

1720 Commits

Author SHA1 Message Date
Pablo Carranza Velez
7e342e9d80 Fix the check for whether the device is provisioned by correctly getting registered_at and deviceId from config.json into the ApiBinder
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-14 21:50:31 -03:00
resin-io-versionbot[bot]
fa6dcd45e7
Auto-merge for PR #586 via VersionBot
Fix using hostname from host when network mode is host, and fix working_dir comparison
2018-03-15 00:49:47 +00:00
resin-io-versionbot[bot]
a6f1d939a8 v7.1.12 2018-03-15 00:25:40 +00:00
Pablo Carranza Velez
08a98f47e4 compose: Use the hostname on the host as default hostname for services with host network mode
Otherwise if the hostname on the supervisor container differs from the hostname on the host, the current and target
services will never match.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-14 21:18:11 -03:00
Pablo Carranza Velez
557b6a8d07 Pass the correct working_dir to the container config, and compare containers for working dir changes
We were getting the correct working dir from the compose or image config, but not really using it.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-14 15:41:19 -03:00
resin-io-versionbot[bot]
44e5778acc
Auto-merge for PR #585 via VersionBot
DeviceConfig: avoid trying to enable or disable the VPN when in offline mode
2018-03-14 12:06:47 +00:00
resin-io-versionbot[bot]
32880653c1 v7.1.11 2018-03-14 11:54:22 +00:00
Pablo Carranza Velez
1febdc9eb0 DeviceConfig: avoid trying to enable or disable the VPN when in offline mode
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-14 10:15:07 +02:00
resin-io-versionbot[bot]
f99f59c6ae
Auto-merge for PR #584 via VersionBot
Fix updates when only releaseId and imageId have changed
2018-03-14 07:42:47 +00:00
resin-io-versionbot[bot]
c01accd208 v7.1.10 2018-03-14 07:28:29 +00:00
Pablo Carranza Velez
0101d62ace ApplicationManager: try to match available images by imageId to avoid keeping around unused image entries in the db
This should fix an issue where, on an update that only changes container metadata, the image install for the old image
is kept around on the API.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-13 18:45:26 -03:00
Pablo Carranza Velez
4ba4736aba compose: Emit a change event when a container is renamed, so that the updated imageId and releaseId are reported
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-13 18:45:26 -03:00
resin-io-versionbot[bot]
62ad5ce3ba
Auto-merge for PR #581 via VersionBot
When migrating from legacy supervisors, mark the temporary compositio…
2018-03-13 21:34:53 +00:00
resin-io-versionbot[bot]
310cff05a5 v7.1.9 2018-03-13 21:20:41 +00:00
Pablo Carranza Velez
de654ec60e Skip taking the lock when updating the releaseId or imageId for a service that comes from a legacy supervisor
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-13 18:00:07 -03:00
Pablo Carranza Velez
9dfb76d2c8 When migrating from legacy supervisors, mark the temporary composition as legacy
We migrate to a default composition because we need to avoid deleting existing docker images, but
we need to use the legacy-container label to avoid potentially creating a duplicated container when a target state comes in.

(Just like we do for preloaded apps)

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-13 08:17:25 -07:00
resin-io-versionbot[bot]
7df07482d1
Auto-merge for PR #579 via VersionBot
Some fixes for the supervisor API
2018-03-13 14:14:55 +00:00
resin-io-versionbot[bot]
a2579a1c9a v7.1.8 2018-03-13 13:59:53 +00:00
Pablo Carranza Velez
f76aacc7fb Avoid trying to send a response to API calls after we've already sent an error
In some cases we were using early `return res.status(...).send(...)` to send 400 errors
but this happened inside a promise chain that later sent another status and response.

We fix this with the correct indentation of the success response so that an early return doesn't fall there.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-09 14:48:34 -08:00
Pablo Carranza Velez
79b4d39acd Fix passing a target service to start in /v1/apps/:appId/start, and getting the containerId
We weren't passing a "target" to serviceAction, which made the start action fail.
Plus we need to get the container again after starting to get the latest containerId.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-09 14:41:19 -08:00
resin-io-versionbot[bot]
f4e07e3ce8
Auto-merge for PR #577 via VersionBot
gosuper: Treat systemd unit states that are not "inactive" or "deacti…
2018-03-09 18:17:14 +00:00
resin-io-versionbot[bot]
0f7c9f66dc v7.1.7 2018-03-09 17:41:40 +00:00
Pablo Carranza Velez
58bb660758 gosuper: Treat systemd unit states that are not "inactive" or "deactivating" as enabled states
This should make the supervisor detect the VPN as enabled when it's starting up (or restarting because of an error).

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-09 09:19:54 -08:00
resin-io-versionbot[bot]
3b60065f12
Auto-merge for PR #575 via VersionBot
Fix bug in image management after update
2018-03-09 15:33:59 +00:00
resin-io-versionbot[bot]
affdcb1bc8 v7.1.6 2018-03-09 15:19:23 +00:00
Pablo Carranza Velez
f009e34293 migrations: Use the correct service name for legacy apps
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-09 06:54:16 -08:00
Pablo Carranza Velez
b6631b7367 ApplicationManager: only use dockerImageId to identify images for current apps, to avoid trying to delete an image that is in use
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-09 06:54:16 -08:00
resin-io-versionbot[bot]
bc153ffe5d
Auto-merge for PR #574 via VersionBot
Fix bug in require for migrations for legacy preload
2018-03-09 14:47:07 +00:00
resin-io-versionbot[bot]
bda308306d v7.1.5 2018-03-09 14:33:32 +00:00
Cameron Diver
d27c529ebe
Fix bug in require for migrations for legacy preload
Change-type: patch
Connects-to: #573
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-03-09 14:10:11 +00:00
resin-io-versionbot[bot]
f6df2a3b96
Auto-merge for PR #571 via VersionBot
compose: fix type error, createVolume returns a promise
2018-03-09 08:26:23 +00:00
resin-io-versionbot[bot]
ae2a1acb14 v7.1.4 2018-03-09 08:13:11 +00:00
Petros Angelatos
4ba020a784
compose: fix type error, createVolume returns a promise
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Change-type: patch
2018-03-09 00:00:44 -08:00
resin-io-versionbot[bot]
d61c5fe640
Auto-merge for PR #570 via VersionBot
lib: add missing flag to openAsync()
2018-03-08 23:18:50 +00:00
resin-io-versionbot[bot]
feec2c0267 v7.1.3 2018-03-08 23:05:38 +00:00
Petros Angelatos
7d03de51f6
lib: add missing flag to openAsync()
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Change-type: patch
2018-03-08 14:59:07 -08:00
resin-io-versionbot[bot]
f273da4828
Auto-merge for PR #569 via VersionBot
compose: fix volume migration code
2018-03-08 22:37:07 +00:00
resin-io-versionbot[bot]
3c20663979 v7.1.2 2018-03-08 22:23:38 +00:00
Petros Angelatos
4b83a08512
compose: fix volume migration code
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Change-type: patch
2018-03-08 14:15:50 -08:00
resin-io-versionbot[bot]
615ee5df9a
Auto-merge for PR #568 via VersionBot
Convert object to array when normalising legacy target apps
2018-03-08 16:20:24 +00:00
resin-io-versionbot[bot]
f12882b3fd v7.1.1 2018-03-08 16:04:16 +00:00
Cameron Diver
a150dbf329
Convert object to array when normalising legacy target apps
Change-type: patch
Connects-to: #567
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-03-08 15:48:03 +00:00
resin-io-versionbot[bot]
5320b92c98
Auto-merge for PR #566 via VersionBot
New base image and ipv6 support
2018-03-07 16:07:27 +00:00
resin-io-versionbot[bot]
1520f7f702 v7.1.0 2018-03-07 15:54:35 +00:00
Petros Angelatos
cda561f997 Introduce workaround for IPv6 DNS resolution until nodejs becomes RFC 3484 compliant
Change-Type: patch
2018-03-07 07:01:43 -08:00
Pablo Carranza Velez
2f0fcff8ef Start using an externally built resin/$ARCH-supervisor-base:v1.1.0 as base image, which adds the verbatim option to dns.lookup
Depends-on: https://github.com/resin-io/resin-supervisor-base/pull/5
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-07 07:01:43 -08:00
resin-io-versionbot[bot]
a60f1a1077
Auto-merge for PR #482 via VersionBot
Multicontainer
2018-03-07 13:37:25 +00:00
resin-io-versionbot[bot]
80f06adb0f v7.0.0 2018-03-07 13:23:36 +00:00
Pablo Carranza Velez
1b043230a5 Send logs to the resin API by default
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 21:10:04 -08:00
Pablo Carranza Velez
15da221382 Implement a new logger that sends logs to the resin API, that can be used optionally instead of PubNub
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 21:09:06 -08:00