Commit Graph

2403 Commits

Author SHA1 Message Date
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
Cameron Diver
4a17f704ab
docs: Add documentation for v2/state/status endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-11 16:24:44 +00:00
Resin CI
92049534f5 v9.9.1 2019-03-08 17:54:16 +02:00
Heds Simons
d3e3d3116a
Merge pull request #927 from balena-io/926-add-codeowners
codeowners: Add @CameronDiver, @pcarranzav and @Page-
2019-03-08 15:52:54 +00:00
Heds Simons
68a28955ad
codeowners: Add @CameronDiver, @pcarranzav and @Page-
Connects-to: #926
Change-type: patch
Signed-off-by: Heds Simons <heds@balena.io>
2019-03-08 15:33:34 +00:00
Resin CI
b821d08754 v9.9.0 2019-03-07 20:50:42 +02:00
CameronDiver
0bffb91f51
Merge pull request #923 from balena-io/fix-airgapped-preload
state-engine: Add rate limited steps to device-config
2019-03-07 18:49:10 +00:00
Cameron Diver
1aa58fd7b9
state-engine: Add an exponential backoff for device-config noops
To avoid unnecesarilly using resources, we add an exponential backoff
when the noops explicitly come from the device-config module.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-07 18:40:09 +00:00
Cameron Diver
ea1b247d3f
fix: Fix connectivity active VPN check
During the conversion to typescript, the VPN active check was being
performed on the directory, and not the file that the VPN creates,
meaning it would always return true (as we explicitly create the
directory on startup if it does not exist).

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-07 18:39:32 +00:00
Cameron Diver
6f79702099
state-engine: Add rate limited steps to device-config
In the case of an airgapped supervisor, with a target state that
requests the vpn be enabled, the supervisor will constantly loop on
trying to set the vpn to on. Unfortunately the vpn requires an internet
connection to be configured, so it will never be turned on.

We add the concept of no-ops to the device-config state change steps,
and don't end the state engine transition while these are present
(similar to how image pulls are implemented).

Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-07 18:39:30 +00:00
Resin CI
9c55574533 v9.8.7 2019-02-28 12:53:57 +01:00
Rich Bayliss
9009f08c92
Merge pull request #922 from balena-io/include-api-url-with-device-api-key
feature: Add `BALENA_API_URL` environment variable
2019-02-28 11:52:02 +00:00
Rich Bayliss
aeb96aa807
feature: Add BALENA_API_URL environment variable when using the balena-api feature label
When using the label `io.balena.features.balena-api` the supervisor will inject 2 environment
variables into the container:
- BALENA_API_KEY
- BALENA_API_URL

This allows the container to access the currently associated API using the KEY.

Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
Connects-to: #847
2019-02-28 11:41:28 +00:00
Giovanni Garufi
50d2df73a1 v9.8.6 2019-02-25 14:12:08 +01:00
Cameron Diver
987de0e097 debug: Print more information about failing validations
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-25 13:22:09 +01:00
Cameron Diver
f9626a3ee4 device-config: Add migration for SUPERVISOR_DELTA_APPLY_TIMEOUT
The default value for the delta apply timeout was changed from `''` to
`'0'` (note strings as these are database values) - but if the value
existed in the database already, this would fail validation. We add a
migration which will look explcitily for the failing value and switch it
to the new default.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-25 13:22:02 +01:00
Giovanni Garufi
bdaf1bc41f v9.8.5 2019-02-25 13:21:33 +01:00
Cameron Diver
c9507e013c Increase max payload size in bodyparser to avoid PayloadTooLarge errors
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-25 13:18:55 +01:00
Giovanni Garufi
58fa0ac761 v9.8.4 2019-02-25 13:16:22 +01:00
Cameron Diver
0e3f260978
Fix provisioning workflow when UUID already exists
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-22 10:53:24 +00:00
Resin CI
19584c465a v9.8.3 2019-02-19 19:10:49 +01:00
CameronDiver
6e603928d1
Merge pull request #913 from balena-io/synchronous-iptables
Run iptables rules synchronous to avoid locking errors
2019-02-19 18:08:45 +00:00
Cameron Diver
911ee7f009
Run iptables rules synchronous to avoid locking errors
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-19 17:43:04 +00:00
Resin CI
b3f90e94ec v9.8.2 2019-02-19 18:09:32 +01:00
CameronDiver
431bf15a71
Merge pull request #912 from balena-io/revert-node8
Revert "Upgrade to node 8 for supported architectures"
2019-02-19 17:07:37 +00:00
Cameron Diver
b3a07da8e4
Revert "Upgrade to node 8 for supported architectures"
This reverts commit 338ba4cdd7.

This is to unblock the release of the supervisor version, pending the
fix of the introduction of the race condition currently affecting v2
deltas.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-19 14:48:19 +00:00
Resin CI
112bc644c4 v9.8.1 2019-02-14 15:06:34 +01:00
CameronDiver
229f478efc
Merge pull request #906 from balena-io/dont-remount
Don't mount /lib/modules if it is already mounted
2019-02-14 14:04:20 +00:00
Cameron Diver
fae2548f27
Don't mount /lib/modules if it is already mounted
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-14 13:49:03 +00:00
Resin CI
adc8ef231e v9.8.0 2019-02-14 10:40:54 +01:00
CameronDiver
a7b709bf34
Merge pull request #871 from balena-io/867-block-ipv6
Apply iptables rules to ipv6
2019-02-14 09:38:48 +00:00
Cameron Diver
5f82f6fd3f
Apply iptables rules to ipv6
Change-type: patch
Closes: #867
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-13 20:57:05 +00:00
Cameron Diver
93c24298ff
Symlink kernel modules and modprobe ip6_tables
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-13 20:57:05 +00:00