Commit Graph

2408 Commits

Author SHA1 Message Date
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
Resin CI
cff5965d5e v9.7.7 2019-02-13 17:02:02 +01:00
CameronDiver
321d9e39cf
Merge pull request #904 from balena-io/fix-deltas
Fix image token authentication, and image fetch backoff in all cases
2019-02-13 16:00:15 +00:00
Cameron Diver
7bd7f7e025
Improve error messages, and add description to ImageAuth error
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-13 15:44:42 +00:00
Cameron Diver
81ec85c581
fix: Request image authentication token with explicitly as json
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-13 15:43:55 +00:00
Cameron Diver
d9177404b5
Always back off on image fetch failure
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-13 15:43:18 +00:00
Resin CI
c6d20a598b v9.7.6 2019-02-12 15:29:43 +01:00
CameronDiver
775643d58b
Merge pull request #902 from balena-io/843-better-healthcheck
Don't treat a non-200 status response on patch as report errors
2019-02-12 14:28:03 +00:00
Cameron Diver
06580bf437
Don't treat a non-200 status response on patch as report errors
Non-200 errors were causing the watchdog to restart the supervisor,
which in some cases could cause a restart loop. Instead we change the
code to only treat communication failures as an error, and report status
code failures directly.

Change-type: patch
Closes: #843
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-12 13:56:54 +00:00
Resin CI
e2cd757b46 v9.7.5 2019-02-12 13:29:17 +01:00
CameronDiver
b03338ca8e
Merge pull request #901 from balena-io/fix-whitespace-handling
Fix whitespace handling in environment variables
2019-02-12 12:27:14 +00:00
Cameron Diver
49dbaaba12
Allow newlines to be part of environment variables
We were not allowing newlines previously by virtue of the regex not
allowing them. The docker daemon and supervisor handling code both
support them, so we allow them in the parsing code too.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-12 11:19:55 +00:00
Cameron Diver
6bf008cc85
Remove environment variable whitespace trimming
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-11 17:13:35 +00:00
Resin CI
3b43579da7 v9.7.4 2019-02-11 14:19:11 +01:00
CameronDiver
3e98222064
Merge pull request #900 from balena-io/fix-config-change-events
Make sure to correctly convert config emit events after validation
2019-02-11 13:17:30 +00:00
Cameron Diver
3d6dc88eb0
Make sure to correctly convert config emit events after validation
We were validating the input configuration values by coercing them to
the correct type, and then using the initial value to be saved (which
currently is always converted to a string).

We now use the coerced value as the actual value we will store, and more
importantly emit. This means that the config.on('change' ...) calls will
always be properly typed, which before this change was not a guarantee
that we could make.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-11 11:22:08 +00:00
Resin CI
5567682c1c v9.7.3 2019-02-11 11:54:12 +01:00
CameronDiver
c48e37556e
Merge pull request #899 from balena-io/delta-apply-timeout
Set default delta apply timeout of 0
2019-02-11 10:52:36 +00:00
Cameron Diver
88f19b4147
Set default delta apply timeout of 0
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-11 10:21:04 +00:00
Resin CI
d19e63d38f v9.7.2 2019-02-11 11:05:10 +01:00
CameronDiver
7c81061898
Merge pull request #898 from balena-io/897-normalise-compose-ports
fix: Normalize ports from compose file on instantiation
2019-02-11 10:03:25 +00:00
Cameron Diver
f3264862ca
fix: Normalize ports from compose file on instantiation
Adjacent ports are always grouped together by docker when reporting the
container state (from an inspect), so adjacent ports defined in the
compose file would not match as they would not have been normalized.

We make sure to always normalize the input port configuration, so that
it will match the docker output (if it should).

We also don't sort in the fromComposePorts function anymore as that is
handled by the normalize function.

Closes: #897
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-08 15:14:07 +00:00
Resin CI
04a9790e11 v9.7.1 2019-02-06 13:25:17 +01:00
CameronDiver
7d25f79dc6
Merge pull request #893 from balena-io/841-delete-then-download
fix: Rework delete-then-download handling in state engine
2019-02-06 12:24:09 +00:00
Cameron Diver
e9b51bbcd7
fix: Rework delete-then-download handling in state engine
In the original implementation it was possible that the delete did not
wait for the kill step to be finished, so it would not be deleted.

We seperate this process into two steps, to allow for the container to
have stopped before proceeding.

Change-type: patch
Closes: #841
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-06 11:41:05 +00:00
Resin CI
9d8552ea8d v9.7.0 2019-02-05 20:55:12 +01:00
CameronDiver
f6bbf6dd50
Merge pull request #888 from balena-io/873-backoff-on-image-failure
Backoff on image download error
2019-02-05 19:53:44 +00:00
Cameron Diver
828a0fc345
Make the failure backoff time the same as the appUpdatePollTime
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 18:40:18 +00:00
Cameron Diver
146267b402
Backoff on image download error
Change-type: patch
Closes: #873
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 18:40:18 +00:00
CameronDiver
b606332312
Merge pull request #828 from balena-io/add-status-endpoint
Add application status endpoint
2019-02-05 18:21:46 +00:00
Cameron Diver
c0e68bb069
Add the release to the status endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 17:57:58 +00:00
Cameron Diver
769e2f3c51
Add application status endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 17:57:57 +00:00
Cameron Diver
d863326783
misc: Improve typings
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 17:57:57 +00:00
Resin CI
65f267f793 v9.6.6 2019-02-05 18:54:47 +01:00
CameronDiver
1792eac742
Merge pull request #892 from balena-io/884-fin-overlay
Ensure the balena-fin always has it's overlay assigned
2019-02-05 17:53:08 +00:00
Cameron Diver
2e09ed071c
Ensure the balena-fin always has it's overlay assigned
Change-type: patch
Closes: #884
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 16:19:42 +00:00
Resin CI
d0c9b697da v9.6.5 2019-02-04 19:16:16 +01:00
CameronDiver
0e39c7239a
Merge pull request #889 from balena-io/879-dont-pull-on-error
fix: Don't attempt a pull if the token requests fails
2019-02-04 18:14:58 +00:00
Cameron Diver
d8085a6ef8
fix: Don't attempt a pull if the token requests fails
Change-type: patch
Closes: #879
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-04 17:50:26 +00:00
Resin CI
93460d36b9 v9.6.4 2019-02-04 14:55:32 +01:00
CameronDiver
59bba13348
Merge pull request #886 from balena-io/fix-override-lock
Fix override locking from the dashboard
2019-02-04 13:52:54 +00:00
Cameron Diver
28d09f2772
Pin terser version to avoid breaking change in minor update
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-04 11:58:14 +00:00
Cameron Diver
a92d9cef3d
Build: Respect package-lock when building
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-04 11:44:58 +00:00
Cameron Diver
d75c58f09d
Move legacy renaming to formatting function
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-04 11:08:36 +00:00
Cameron Diver
f12f474516
Fix typo in OVERRIDE_LOCK
Closes: #885
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-04 11:08:26 +00:00
Resin CI
94b267c199 v9.6.3 2019-02-03 12:54:35 +01:00