Rich Bayliss
5aecd94e24
bug: Firewall not blocking supervisor access from outside the device
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-08-12 13:43:33 +01:00
Rich Bayliss
e9b536a889
bug: Allow DNS through firewall for local containers
...
We provide a local DNS server for containers to use and this
was not allowed through the firewall when enabled.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-08-11 15:17:06 +01:00
Cameron Diver
aa823c1cfc
Fix device-tag fetching function
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-08-05 13:30:34 +01:00
Pagan Gazzard
511cbbe74e
Update pinejs-client-request and make use of a named key
...
Update pinejs-client-request from 7.0.0 to 7.1.0
Change-type: patch
2020-08-03 09:27:11 +00:00
Nitish Agarwal
11cac2dd69
Fixes #1299 v1 start/stop endpoint issue with service access.
...
Change-Type: patch
Signed-off-by: Nitish Agarwal <1592163+nitishagar@users.noreply.github.com>
2020-07-31 23:08:50 +05:30
Rich Bayliss
59561132cc
bug: Fix undefined containerId object
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-07-31 11:51:15 +01:00
Miguel Casqueira
9b37ce96f9
fix matching extra_uEnv backend with unsupported devices
...
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-07-30 14:04:37 -04:00
Pagan Gazzard
ffe3da6261
Fix an issue with reporting initial config using a stale target state
...
Change-type: patch
2020-07-30 10:48:54 +01:00
Matthew McGinn
15c57a86b4
fix up "atleast" -> "at least"
...
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2020-07-29 11:55:22 -04:00
Miguel Casqueira
cac2e3612c
Support setting device/fleet configuration in extra_uEnv.txt
...
Closes : #1385
Change-Type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-07-28 16:36:16 -04:00
Pagan Gazzard
eeda7e3ab1
Extract current state reporting to its own module
...
Change-type: minor
2020-07-24 17:35:17 +01:00
dt-rush
41987d8e76
log detection of changes to VPN status
...
Change-type: patch
Signed-off-by: dt-rush <nickp@balena.io>
2020-07-23 19:20:59 -04:00
Rich Bayliss
60132134de
common: Fix bug where aliases might be undefined
...
Should handle the scenario where the network aliases are undefined.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-07-23 16:41:40 +01:00
Miguel Casqueira
3b3babfd62
Fix docker-util using incorrect reference for function
...
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-07-21 20:02:20 -04:00
Cameron Diver
d14d8f31cc
Fix purge and restart invocations by providing instanced apps
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-07-20 18:18:07 +01:00
Cameron Diver
d2a7d3b965
Fix purge invocations of new singletons
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-07-20 18:17:01 +01:00
Rich Bayliss
898c7e71da
bug: Fix unhandled promise rejection
...
When invoking iptables-restore it can fail. This wasn't handled
and this makes sure that it fails gracefully.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-07-13 13:05:12 +01:00
Cameron Diver
270f9f854a
Fix bug where a promise was not resolved in db-format
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-07-08 12:05:09 +01:00
Cameron Diver
5337c0102c
Convert deviceConfig module to a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-07-08 12:05:09 +01:00
Cameron Diver
03ca0ee9ad
avahi: Control with HOST_DISCOVERABILITY
...
The host config variable HOST_DISCOVERABILITY can be set to
true or false, controlling the state of the avahi service. This
determines if the device advertises it's presence over mDNS.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-07-06 13:02:29 +01:00
Rich Bayliss
28c5a44e71
firewall: Add Host Firewall functionality
...
Controlled by BALENA_HOST_FIREWALL_MODE, the firewall can
either be 'on' or 'off'.
- In the 'off' state, all traffic is allowed.
- In the 'on' state, only traffic for the core services provided
by Balena is allowed.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-07-01 18:43:08 +01:00
Miguel Casqueira
59fc589eb2
Added support for configuring FDT directive in extlinux.conf
...
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-06-23 15:56:10 -04:00
Miguel Casqueira
3098abeca5
Refactor backends into seperate files and added tests for extlinux
...
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-06-23 15:56:10 -04:00
Rich Bayliss
1b91ef3405
state: Report device MAC address to the API
...
When reporting device information, send the MAC address of any
interfaces on the system. Also expose in the Supervisor API at
the route GET /v1/device.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-06-22 10:41:06 +01:00
Pagan Gazzard
c15f77434b
Update pinejs-client-request to 7.x
...
Update pinejs-client-request from 5.2.0 to 7.0.0
Change-type: patch
2020-06-18 12:24:52 +00:00
Cameron Diver
0e8d92e08a
Make service-manager module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-17 14:56:57 +00:00
Cameron Diver
adaad786af
Make volume-manager module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-17 14:56:57 +00:00
Cameron Diver
8fc97b9de8
Make network-manager module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-17 14:56:57 +00:00
Akis Kesoglou
1dccbaecd8
Use API v6
...
See: https://github.com/balena-io/open-balena/issues/80
Change-type: minor
2020-06-15 13:57:32 +03:00
Cameron Diver
695d91d494
Db-format module code fixups
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-15 10:53:21 +01:00
Robert Günzler
ae646a07ec
Add label to expose gpu to container
...
In the absence of an upstream implementation of the DeviceRequest API introduced
as part of Docker API v1.40 we roll our own using a feature label.
As per my comment in the code, we fall back to the default behavior of
docker cli's `--gpu` and request single device with the `gpu` capabilty.
The only implementation at the moment is the NVIDIA driver; here:
https://github.com/balena-os/balena-engine/blob/master/daemon/nvidia_linux.go
Background on the composefile implementation:
https://github.com/compose-spec/compose-spec/issues/74
https://github.com/docker/compose/issues/6691
Change-type: patch
Connects-to: https://github.com/balena-os/balena-jetson/pull/75
Signed-off-by: Robert Günzler <robertg@balena.io>
2020-06-11 14:06:16 +02:00
Cameron Diver
b31d5007fb
Move database app processing out to its own module
...
This is part of the work to make the application-manager module much
less monolithic, in preperation for system apps and more generally
multi-app.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-11 11:55:11 +01:00
Cameron Diver
c0e170c61f
Make target-state-cache a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-11 11:55:11 +01:00
Cameron Diver
b5918f0d84
Respect an initialDeviceName field in the config.json
...
Closes : #909
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-10 13:27:03 +01:00
Cameron Diver
2b3dc2fbce
Make images module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-10 11:29:28 +01:00
Rich Bayliss
b89425c607
fix: API auth missing on state GET/PATCH
...
When performing a state GET/PATCH the authentication header was being
missed off.
Change-type: patch
Signed-off-by: Rich Bayliss
2020-06-09 15:03:16 +01:00
Cameron Diver
651e48b1bd
Make logger module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-08 17:19:20 +01:00
Pagan Gazzard
e37b52dd68
Fix exponential backoff for state polling
...
Change-type: patch
2020-06-08 15:41:11 +01:00
Cameron Diver
389e14ec6b
Make the event-tracker module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-08 10:13:33 +01:00
Pagan Gazzard
17a5d8dd49
Isolate target state fetching to its own module which emits on update
...
Change-type: minor
2020-06-03 17:37:38 -04:00
Cameron Diver
aad20e2c2f
Make docker module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-02 17:57:18 +01:00
Cameron Diver
ff4a31a0e6
Make the config module a singleton
...
Change-type: patch
Co-authored-by: Pagan Gazzard <page@balena.io>
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-06-02 14:29:05 +01:00
Miguel Casqueira
5550a3a330
Refactor device-state healthchecks to log reason for failure
...
Closes : #1292
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-05-29 16:24:01 -04:00
Miguel Casqueira
ef83acdaeb
Refactor api-binder healthchecks to log reason for failure
...
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-05-29 16:14:58 -04:00
Pagan Gazzard
1decd87c21
Update dependencies
...
Change-type: patch
2020-05-29 14:22:23 -04:00
Cameron Diver
1d7381327e
Make the db module a singleton
...
We were treating the database class as a singleton, but still having to pass
around the db instance. Now we can simply require the db module and have
access to the database handle.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-29 15:02:38 +01:00
Cameron Diver
972b896c95
Check for ApiError before using it as such
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-26 14:43:59 +01:00
Cameron Diver
eaaa9c257e
check for 409 status code, rather than string matching uuid conflicts
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-21 14:57:26 -04:00
Cameron Diver
87278c0d8c
Use safeStateClone to avoid call-stack exceeding errors
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-21 16:47:09 +01:00
Miguel Casqueira
db7c27037c
Improved handling of invalid appId in V2 state endpoint
...
Closes : #1294
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-05-19 10:53:19 -04:00