Commit Graph

3834 Commits

Author SHA1 Message Date
Balena CI
f332ba646d v12.10.7 2021-09-01 23:46:44 +03:00
bulldozer-balena[bot]
60d22a49b5
Merge pull request #1779 from balena-os/dependabot/npm_and_yarn/tar-4.4.19
Bump tar from 4.4.13 to 4.4.19
2021-09-01 20:44:54 +00:00
dependabot[bot]
b7cb494602 Bump tar from 4.4.13 to 4.4.19
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Change-type: patch
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 16:36:34 -04:00
Balena CI
79f7f5fb24 v12.10.6 2021-09-01 21:13:03 +03:00
bulldozer-balena[bot]
e1e04c9a74
Merge pull request #1784 from balena-os/edit-config-doc
Remove "variable list" heading in configuration doc
2021-09-01 18:11:29 +00:00
Miguel Casqueira
5205e8ce07 Remove "variable list" heading in configuration doc
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2021-09-01 14:03:19 -04:00
Balena CI
0ae52edbc8 v12.10.5 2021-09-01 01:59:03 +03:00
bulldozer-balena[bot]
2c9e7bbd3e
Merge pull request #1783 from balena-os/cleanup-configurations.md
Clean up configurations.md
2021-08-31 22:56:52 +00:00
Miguel Casqueira
af51ef8eb5 Clean up configurations.md
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2021-08-31 18:48:31 -04:00
Balena CI
337e6affcd v12.10.4 2021-08-31 21:57:46 +03:00
bulldozer-balena[bot]
1bc1fc139a
Merge pull request #1782 from balena-os/document-upgrades-in-readme
Include issues with downgrading versions in README
2021-08-31 18:56:12 +00:00
Miguel Casqueira
1280ac3656 Include issues with downgrading versions in README
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2021-08-31 14:46:24 -04:00
Balena CI
f8cc2bc0ce v12.10.3 2021-08-25 16:53:22 +03:00
bulldozer-balena[bot]
259b81c994
Merge pull request #1776 from balena-os/klutchell/1775-skip-service-restart
Skip restarting services if they are part of conf targets
2021-08-25 13:51:49 +00:00
Kyle Harding
669866b4c2
Skip restarting services if they are part of conf targets
Some recent changes to the OS allowed some services to restart
automatically when the associated config files are changed.

In these cases we want to avoid restarting the same services
manually from the supervisor.

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2021-08-24 14:03:55 -04:00
Alexandru Costache
7693f490b4 test: Update extra_uEnv test slugs list
We do this since we added for TX2 NX and
derived device types.

Signed-off-by: Alexandru Costache <alexandru@balena.io>
2021-08-24 07:25:20 +00:00
Alexandru Costache
7d678fa838 backends/extra-uEnv: Extend custom DTB support for Jetson TX2 NX
We just added support for the TX2 NX, which supports u-boot
thus allows for using custom device-trees. Let's allow
for Jetson TX2 NX and future TX2 NX derived
device types to have device-trees configurable from the dashboard.

Change-type: patch
Signed-off-by: Alexandru Costache <alexandru@balena.io>
2021-08-24 07:24:48 +00:00
Alex Gonzalez
9e0cbe04c6 api-keys: Remove os variant parameter for authentication check
The current code authenticates unmanaged production devices which makes
no sense. Unmanaged devices do not need to authenticate with the API.

Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
2021-08-05 09:30:35 +00:00
Alex Gonzalez
1abd10a129 os-release: Use developmentMode to ascertain OS variant in new releases
Newer BalenaOS releases have replaced OS variants for a developmentMode
configuration setting. This commit uses this variable to set the OS
variant in the absence of `VARIANT_ID` from the os-release file.

Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
2021-08-05 09:30:35 +00:00
Alex Gonzalez
4ad7a3ae91 config: Add developmentMode to schema
Add a `developmentMode` configuration variable to the schema. Do not expose
this on the device target state until local key-based authentication is
sorted.

Relates-to: https://jel.ly.fish/e9525e9e-aa74-478c-b931-52951c679f78
Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
2021-08-05 09:30:35 +00:00
Balena CI
7e2ce7fc56 v12.10.2 2021-08-03 01:22:12 +03:00
bulldozer-balena[bot]
61b07c8cb8
Merge pull request #1762 from peakyDicers/firewall-logs-remove-emoji
Removed fire emoji from firewall logs.
2021-08-02 22:20:05 +00:00
peakyDicers
30c728fae2 Removed fire emoji prefix for firewall logs.
Change-type: patch
2021-08-02 17:24:03 -04:00
Balena CI
49a391823c v12.10.1 2021-08-02 19:35:58 +03:00
bulldozer-balena[bot]
57fc32e436
Merge pull request #1760 from balena-os/images-local-mode
Fix regression with local mode push
2021-08-02 16:34:08 +00:00
Felipe Lalanne
6f5f3bc2f3 Fix regression with local mode push
PR #1749 introduced a bug when pushing local target state. An update to
the [image name normalization](f1bd4b8d9b/src/lib/docker-utils.ts (L81))
failed to consider the local image name format. This results in mangling
of image names in the database, i.e. the image `ubuntu:latest` is stored
as `/ubuntu:latest`. This causes an exception to be returned by the
dockerode `getImage('/ubuntu:latest').inspect()` call.

This sends the supervisor into a crash loop and is shown on the supervisor
journal logs as

```
getaddrinfo ENOTFOUND images
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26)
```

Unfortunately if this happens on a user device, since the mangled image
name is already on the database, the easiest way to fix is to remove the
supervisor database and let the supervisor recreate it. Deleting the
database should be side effect free.

Change-type: patch
2021-08-02 11:52:07 -04:00
Balena CI
0df979be55 v12.10.0 2021-07-31 01:27:29 +03:00
bulldozer-balena[bot]
27013b1d72
Merge pull request #1753 from balena-os/no-db-ids
Remove comparisons based on image, release, and service ids
2021-07-30 22:25:38 +00:00
Felipe Lalanne
104a8006fb Update apiSecret table to id services by name
It adds a migration replacing the serviceId column by serviceName and
populates serviceNames from services in the target state.
2021-07-28 09:57:38 -04:00
Felipe Lalanne
50aab3ba78 Update tests removing dependency on db ids 2021-07-28 09:57:38 -04:00
Felipe Lalanne
b67f94802d Remove comparison based on image, release, and service ids
Preparing for the new v3 target state, where the supervisor will make environment
dependent ids optional and rely on using general UUIDs and user known identifiers
for comparison. This PR moves forward in that direction by removing some of those
comparisons for v2 target state.

- imageId to be replaced with imageName
- serviceId to be replace by serviceName
- releaseId to be replaced by commit (future release_uuid)

This is a backwards compatible change, meaning it doesn't completely get rid of
these identifiers (which are still being used by supervisor API and for state
patch), but will not depend on those identifiers for calculating steps to target state.

Change-type: minor
2021-07-28 09:57:38 -04:00
Felipe Lalanne
77070712a4 Remove image manager appUpdatePollInterval listener 2021-07-28 09:57:36 -04:00
Felipe Lalanne
a1d098d8f3 Refactor image "volatile state" to use state pattern
This replaces stored `volatileState` with a more declarative ImageTask API.
An ImageTask stores volatile image state for operations that cannot be
obtained through an engine query, such as fetching and removing an
image, state that can be updated while the task is running.

Image controller methods can now use the `reportEvent` method to create
and update the state of a longer running task.
2021-07-28 09:56:38 -04:00
Balena CI
06c3f488e5 v12.9.6 2021-07-26 17:05:14 +03:00
bulldozer-balena[bot]
51748c5f44
Merge pull request #1749 from balena-os/1616-old-images
Use tags instead of dockerIds to track supervised images in docker
2021-07-26 14:02:52 +00:00
Felipe Lalanne
f1bd4b8d9b Use tags to track supervised images in docker
The image manager module now uses tags instead of docker IDs as the main
way to identify docker images on the engine. That is, if the target
state image has a name `imageName:tag@digest`, the supervisor will always use
the given `imageName` and `tag` (which may be empty) to tag the image on
the engine after fetching. This PR also adds checkups to ensure
consistency is maintained between the database and the engine.

Using tags allows to simplify query and removal operations, since now
removing the image now means removing tags matching the image name.

Before this change the supervisor relied only on information in the
supervisor database, and used that to remove images by docker ID. However, the docker
id is not a reliable identifier, since images retain the same id between
releases or between services in the same release.

List of squashed commits
- Remove custom type NormalizedImageInfo
- Remove dependency on docker-toolbelt
- Use tags to traack supervised images in docker
- Ensure tag removal occurs in sequence
- Only save database image after download confirmed

Relates-to: #1616 #1579
Change-type: patch
2021-07-26 09:52:25 -04:00
Balena CI
19bcc6232b v12.9.5 2021-07-22 19:02:51 +03:00
bulldozer-balena[bot]
17d09b91ae
Merge pull request #1756 from balena-os/1755-delta-logs
Log the delta URL that will be downloaded on update
2021-07-22 16:00:16 +00:00
Felipe Lalanne
c05c5803f0 Log the delta URL that will be downloaded on update
Change-type: patch
Closes: #1755
2021-07-22 11:05:00 -04:00
Balena CI
f6774be127 v12.9.4 2021-07-08 22:26:09 +03:00
bulldozer-balena[bot]
a220b87804
Merge pull request #1745 from balena-os/db-helper-fix
Fix db-helper module for tests
2021-07-08 19:24:21 +00:00
Felipe Lalanne
357d1baf61 Fix db-helper module for tests
The previous module was using `rewire` to get the knex instance from the
db module but that was leading to issues when running tests using `test:fast`.
This provides a fix for the test module that just removes the destroy
call entirely (it turns out it is not necessary).

Change-type: patch
2021-07-08 14:43:13 -04:00
Balena CI
74ba1823c5 v12.9.3 2021-07-08 15:15:39 +03:00
bulldozer-balena[bot]
5334e93212
Merge pull request #1738 from balena-os/patch-hup-breadcrumbs-allow-force
Allow users to override HUP lock if device is stuck in invalid state
2021-07-08 12:13:25 +00:00
Christina Wang
17e740a4ba
Allow users to override HUP lock if device is stuck in invalid state
This functionality is needed when breadcrumbs aren't deleted after a HUP
rollback for whatever reason. Also rename HUP lock function.

Change-type: patch
Connects-to: #1459
Signed-off-by: Christina Wang <christina@balena.io>
2021-07-08 12:43:32 +09:00
Balena CI
3caf608158 v12.9.2 2021-07-07 16:54:35 +03:00
bulldozer-balena[bot]
1d10d324ca
Merge pull request #1736 from balena-os/override-lock-config-var
Point users to the configuration page for overriding update locks
2021-07-07 13:52:27 +00:00
Thodoris Greasidis
3e960f0f09 Point users to the configuration page for overriding update locks
Change-type: patch
See: https://jel.ly.fish/32cc2ee4-c5a7-4ec8-8e91-1ba4f1379bc4
See: https://www.flowdock.com/app/rulemotion/r-product/threads/9mk8QcdNp4UAwKeEUpXPHVxYM_c
Signed-off-by: Thodoris Greasidis thodoris@balena.io
Co-authored-by: Kyle Harding <kyle@balena.io>
2021-07-07 15:46:38 +03:00
Balena CI
3cdab68df5 v12.9.1 2021-07-06 03:51:12 +03:00
bulldozer-balena[bot]
5ad1917300
Merge pull request #1741 from balena-os/clarify-temp-action
Clarify that /v2/applications/:appId/stop-service is temporary
2021-07-06 00:49:09 +00:00