Commit Graph

3135 Commits

Author SHA1 Message Date
Pablo Carranza Velez
ea6ebf8223 test: Add a test case for deviceConfig.getDefaults
This would help avoid bugs like the one fixed in 9.11.1.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-28 16:01:00 -07:00
Resin CI
e5fee8d277 v9.12.4 2019-03-28 20:39:07 +02:00
Pablo Carranza Vélez
0f943dba1b
Merge pull request #924 from balena-io/only-modprobe-ip6tables-if-needed
Only modprobe ip6_tables if it's necessary
2019-03-28 11:36:52 -07:00
Pablo Carranza Velez
de05165316 Only modprobe ip6_tables if it's necessary
If the kernel was built with support for ip6tables, there's no need to load the module. This is the case when running
balenaOS in a container in Mac OS, which also can't do modprobes easily.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-28 11:12:10 -07:00
Resin CI
efdd3e817b v9.12.3 2019-03-28 16:47:23 +02:00
Page-
6fe04f8a0e
Merge pull request #951 from balena-io/faster-builds
Parallelise cache pulling for builds
2019-03-28 14:45:14 +00:00
Pagan Gazzard
9af416c7c0 Parallelise cache pulling for builds
Change-type: patch
2019-03-28 13:39:16 +00:00
Resin CI
898312151a v9.12.2 2019-03-28 15:23:17 +02:00
CameronDiver
d1bcbfbdbf
Merge pull request #952 from balena-io/fix-typo
Fix typo in delta request error message
2019-03-28 13:21:00 +00:00
Cameron Diver
175cbfee50
Fix typo in delta request error message
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-28 12:31:50 +00:00
Resin CI
56c79945c3 v9.12.1 2019-03-28 14:10:20 +02:00
CameronDiver
b26a527ed0
Merge pull request #933 from balena-io/fix-network-joining
Fix network alias creation and comparison
2019-03-28 12:08:24 +00:00
Cameron Diver
c4b7fb481a
Remove log-timestamp due to having journald logs
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-28 10:27:22 +00:00
Cameron Diver
1570935b2c
misc: Fix lint errors
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-28 10:27:22 +00:00
Cameron Diver
b3192679c7
fix: Correctly compare and generate network membership aliases
Before this change, service name resolution would only occur in the
default network. This was because we were not explicitly adding aliases
of the service names to the aliases fields.

We also fix the comparison, which would do funny things based on
container IDs, which was correct but unnecessary.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-28 10:27:21 +00:00
Resin CI
f1c6dd46c3 v9.12.0 2019-03-28 11:45:43 +02:00
CameronDiver
e956242d45
Merge pull request #949 from balena-io/use-default-device-config
When a device config variables requested value is not valid, fallback to the default
2019-03-28 09:43:30 +00:00
Resin CI
88a58b683f v9.11.4 2019-03-27 22:36:57 +02:00
Pablo Carranza Vélez
0eb43615c4
Merge pull request #946 from balena-io/change-supervisor-net-ip
Ensure the supervisor0 network uses a subnet less likely to cause conflicts
2019-03-27 13:34:37 -07:00
Cameron Diver
1191b39ee5
misc: Update build stages to debian stretch
Jessie recently had the jessie-updates repos dropped. We upgrade to
stretch to avoid a 404 on update (and to update things anyway).

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-27 14:18:34 +00:00
Cameron Diver
c7499a6b12
device-config: Show invalid values in dashboard logs
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-27 14:03:45 +00:00
Cameron Diver
83d53cfb56
events: Allow system messages to not be tracked
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-27 13:14:40 +00:00
Cameron Diver
c211efe399
device-config: Use default values for any invalid target values
If a value is requested which does not pass validation, we instead set
it to the default value, to ensure that the state engine continues to
work and move towards the target state.

Change-type: minor
Closes: #938
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-27 13:08:04 +00:00
Pablo Carranza Velez
dab5d7546c Ensure the supervisor0 network uses a subnet less likely to cause conflicts
We put the supervisor0 network in the 10.114.104.0/25 subnet to avoid issues when the device
is in a network using the 172.17.* network.

We also ensure we recreate this network if it was created in the incorrect subnet (i.e. if we're updating
from an old supervisor that didn't do this), for which we have to kill any containers using this network.

Closes #731

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-21 16:02:49 -07:00
Resin CI
3e6a6359a7 v9.11.3 2019-03-21 15:08:31 +02:00
Page-
0444899762
Merge pull request #945 from balena-io/fix-await-provisioning
Fixes for the provisioning and pinning process
2019-03-21 13:06:53 +00:00
Pablo Carranza Velez
22a5b33196 fix: When pinning a preloaded device, ensure the pinning is done when retrying after a failure
Without this patch, if for some reason device pinning fails (e.g. connectivity goes down) or anything
interrupts the initialization after provisioning completes but before pinning is completed, after a retry
the supervisor would just skip the pinning code, leaving the device unpinned. This patch ensures that the
pinning procedure is run even if the device was already provisioned (as long as the pinning flag has been set,
of course). This matches the behavior that the CoffeeScript code had from before the TypeScript conversion.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-20 17:50:26 -07:00
Pablo Carranza Velez
6e3bedeb1d fix: Return a promise when retrying provisioning to avoid continuing after a failure
Otherwise we'll keep doing the rest of the APIBinder init steps, like reporting initial config,
potentially before completing the provisioning.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-20 16:48:20 -07:00
Resin CI
1572640bce v9.11.2 2019-03-20 21:56:37 +02:00
Pablo Carranza Vélez
b8ec9f0d54
Merge pull request #944 from balena-io/await-reporting-initial-config
fix: Await reporting the initial config before continuing APIBinder init
2019-03-20 12:54:35 -07:00
Pablo Carranza Velez
b374bd81dd fix: Await reporting the initial config before continuing APIBinder initialization
This avoid a race condition, in which config.txt can be cleared if a target state is fetched before the
initial values have been created as config vars.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-20 12:27:20 -07:00
Resin CI
59d2f98166 v9.11.1 2019-03-19 22:59:48 +02:00
Pablo Carranza Vélez
c9bea6890a
Merge pull request #942 from balena-io/fix-typo-default-device-config
Fix typo when getting device config default values
2019-03-19 13:57:39 -07:00
Pablo Carranza Velez
f32de99aff Fix typo when getting device config default values
Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-19 13:46:17 -07:00
Resin CI
000f9ae6c8 v9.11.0 2019-03-18 19:59:34 +02:00
Pablo Carranza Vélez
46c99e7001
Merge pull request #939 from balena-io/fix-migration-pinejs-update
fix: Correct use of $expand to avoid an exception when updating from …
2019-03-18 10:57:43 -07:00
Pablo Carranza Velez
d64dcb4b40 fix: Correct use of $expand to avoid an exception when updating from a legacy OS
The last update of pinejs-client to pinejs-client-request made the way we were
using $expand on the migration break. This switches to the correct way of doing it now.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2019-03-18 09:49:28 -07:00
CameronDiver
40786dda9d
Merge pull request #932 from balena-io/v2-api-additions
Additions to the V2 supervisor api
2019-03-13 16:10:20 +00:00
Cameron Diver
b922789dee
device-api: Add v2/device/tags api endpoint
This endpoint will fetch the device tags from the balena api

Change-type: minor
Closes: #890
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 14:21:23 +00:00
Cameron Diver
3f231e8ff3
device-api: Add v2/device/name endpoint
This endpoint returns the last known device name from the API. This
differs from the BALENA_DEVICE_NAME_AT_INIT env var because this will
not change throughout the runtime of the container.

Closes: #908
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 14:21:22 +00:00
Resin CI
2855295432 v9.10.2 2019-03-13 14:25:03 +02:00
CameronDiver
1f5ef1ab03
Merge pull request #929 from balena-io/fix-local-mode-env-var
Fix changing local mode environment variables from compose file
2019-03-13 12:22:43 +00:00
Cameron Diver
84356b82b8
state-engine: Return a noop when waiting for a dependency
We run the risk of the state engine exiting early when a dependency is
not ready, especially in local mode. This changes forces a noop to be
returned when we are waiting on another service, which is the process
used elsewhere in the state engine.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 10:34:15 +00:00
Cameron Diver
8f2d6f4d7b
Skip dependency check on kill in local mode
This function would usually check that an image is present for a
dependency, but in local mode the images would have never been inserted
into the database.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 10:34:14 +00:00
Resin CI
3b475db94c v9.10.1 2019-03-12 15:59:07 +02:00
CameronDiver
ca9ffb4b6d
Merge pull request #930 from balena-io/pin-lodash
Pin lodash types to avoid compile error
2019-03-12 13:56:53 +00:00
Cameron Diver
af734ad008
Pin lodash types to avoid compile error
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-12 13:36:46 +00:00
Resin CI
16ee0cec60 v9.10.0 2019-03-12 14:58:22 +02:00
CameronDiver
89d7e709fa
Merge pull request #928 from balena-io/add-status-docs
Add status endpoint documentation and standardise documentation file
2019-03-12 12:56:18 +00:00
Cameron Diver
d9bc26bd83
docs: Standardise naming and json in api documentation
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-11 16:39:06 +00:00