Commit Graph

2402 Commits

Author SHA1 Message Date
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
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
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
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
c6d20a598b v9.7.6 v9.7.6 2019-02-12 15:29:43 +01:00
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
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
e2cd757b46 v9.7.5 v9.7.5 2019-02-12 13:29:17 +01:00
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
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
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
3b43579da7 v9.7.4 v9.7.4 2019-02-11 14:19:11 +01:00
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
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
5567682c1c v9.7.3 v9.7.3 2019-02-11 11:54:12 +01:00
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
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
d19e63d38f v9.7.2 v9.7.2 2019-02-11 11:05:10 +01:00
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
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
04a9790e11 v9.7.1 v9.7.1 2019-02-06 13:25:17 +01:00
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
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
9d8552ea8d v9.7.0 v9.7.0 2019-02-05 20:55:12 +01:00
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
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
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
b606332312 Merge pull request #828 from balena-io/add-status-endpoint
Add application status endpoint
2019-02-05 18:21:46 +00:00
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
769e2f3c51 Add application status endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 17:57:57 +00:00
d863326783 misc: Improve typings
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-02-05 17:57:57 +00:00
65f267f793 v9.6.6 v9.6.6 2019-02-05 18:54:47 +01:00
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
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
d0c9b697da v9.6.5 v9.6.5 2019-02-04 19:16:16 +01:00
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
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
93460d36b9 v9.6.4 v9.6.4 2019-02-04 14:55:32 +01:00
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
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
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
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
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
94b267c199 v9.6.3 v9.6.3 2019-02-03 12:54:35 +01:00
652080ae8b Merge pull request #883 from balena-io/fix-promise-map
Wrap services.getAll in a bluebird promise
2019-02-03 11:52:46 +00:00
ef7d993db6 Wrap services.getAll in a bluebird promise
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-01-31 10:09:25 +00:00
e2c159f009 v9.6.2 v9.6.2 2019-01-29 17:19:03 +01:00
a940180bf3 Merge pull request #882 from balena-io/fix-healthcheck
Fix healthcheck and container restart
2019-01-29 16:17:27 +00:00
6a9ca2a60d fix: Properly bind context to healthchecks
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-01-29 14:19:45 +00:00
707ddb5f45 fix: Only apply supervisor api authentication after healthcheck entry
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-01-29 14:19:45 +00:00