balena-supervisor/test
Felipe Lalanne 5197a1330d Show warning instead of exception for invalid network config
A previous PR (#1656) fixed validation for network ipam config,
checking that both network and subnet are defined for each ipam config entry
(as described in the docker documentation).

After that PR, the validations throws an exception if the network target state is incorrect,
but this turns out to be the wrong approach, because that exception is also triggered
when querying target state.

This isn't a problem in normal operation, but it is in local mode, because local
mode queries the old target state before sending a new one. Since the query fails,
the CLI can never push the new target state.

This PR replaces the exception with a warning on the logs, since a
misconfigured network won't cause any engine failures, it will just
prevent containers to communicate through the provided network.

A future improvement should move this validation to an earlier point in the process,
so the target state can get rejected before it even gets to a point it
can be used.

Relates-to: #1693
Change-type: patch
2021-05-06 16:27:40 -04:00
..
data Improved mutable (/data) file system detection 2021-04-08 17:34:27 -04:00
lib Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
src Show warning instead of exception for invalid network config 2021-05-06 16:27:40 -04:00
00-init.spec.ts Add more test coverage for compose/images 2020-11-03 13:08:41 -05:00
01-constants.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
02-db.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
03-config.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
04-service.spec.ts Fix gpu label support 2021-02-09 11:27:03 +01:00
05-device-state.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
06-validation.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
07-blink.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
08-event-tracker.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
09-network.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
10-api-binder.spec.ts Update balena-register-device and send extra info at provision time 2021-04-29 13:44:30 +00:00
11-logger.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
12-device-config.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
13-application-manager.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
14-conversions.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
15-ports.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
16-config-utils.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
18-startup.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
19-compose-utils.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
20-compose-volume.spec.ts Make logger module a singleton 2020-06-08 17:19:20 +01:00
21-supervisor-api.spec.ts Consolidated Supervisor API tests into clearer files 2020-11-30 15:42:49 -05:00
22-local-mode.spec.ts Skip localmode test suite 2021-04-08 17:34:27 -04:00
23-contracts.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
24-deltas.spec.ts Convert all test files to TS and add .spec to all filenames 2020-06-05 18:34:24 -04:00
25-journald.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
27-extlinux-config.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
28-db-format.spec.ts Infer legacy Volumes that do not have the supervised label 2021-03-15 19:46:53 -04:00
29-append-directive.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
30-fdt-directive.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
31-docker-utils.spec.ts docker-utils: Test network gateway determination logic 2020-07-22 13:17:16 +01:00
32-compose-app-manager.spec.ts application-manager: Convert to a singleton 2020-09-14 11:23:36 +01:00
33-extra-uenv-config.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
34-firewall.spec.ts Infer legacy Volumes that do not have the supervised label 2021-03-15 19:46:53 -04:00
35-os-release.spec.ts tests: Clean up and consistify naming scheme 2020-10-12 14:41:21 +01:00
36-compose-app.spec.ts Prevent unintended image removal when calling purge endpoints to remove volumes 2021-04-05 12:10:09 +00:00
37-odmdata-config.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
38-sys-info.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
39-compose-commit.spec.ts Allow storing commits against their appIds 2020-11-10 10:50:08 +00:00
39-compose-images.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
40-target-state.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
41-device-api-v1.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
42-device-api-v2.spec.ts Fix mock dockerode module 2021-04-27 13:00:56 -04:00
43-splash-image.spec.ts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00
44-volume-manager.spec.ts Patch list volumes to always return an array 2021-04-01 20:31:09 -04:00
fast-mocha.opts Update mocha options for recursive test lookup 2021-04-09 13:02:29 -04:00
mocha.opts Remove mz, mkdirp, body-parser dependencies 2021-04-28 07:20:15 +09:00