The chrony changes were made directly on the host device (I mounted the system in rw mode) so it was the same config in both case (and it was acting normal).
I made some further investigation concerning this issue, I retrieve the target state locally through the supervisor API and here is what I got :
{
"status": "success",
"state": {
"local": {
"name": "white-voice",
"config": {
"SUPERVISOR_LOCAL_MODE": "1",
"SUPERVISOR_POLL_INTERVAL": "600000",
"SUPERVISOR_VPN_CONTROL": "true",
"SUPERVISOR_CONNECTIVITY_CHECK": "true",
"SUPERVISOR_LOG_CONTROL": "true",
"SUPERVISOR_DELTA": "false",
"SUPERVISOR_DELTA_REQUEST_TIMEOUT": "30000",
"SUPERVISOR_DELTA_APPLY_TIMEOUT": "0",
"SUPERVISOR_DELTA_RETRY_COUNT": "30",
"SUPERVISOR_DELTA_RETRY_INTERVAL": "10000",
"SUPERVISOR_DELTA_VERSION": "2",
"SUPERVISOR_OVERRIDE_LOCK": "false",
"SUPERVISOR_PERSISTENT_LOGGING": "false"
},
"apps": {
"1": {
"appId": 1,
"name": "localapp",
"commit": "localrelease",
"releaseId": 1,
"services": [{
"imageId": 1,
"serviceName": "my_app",
"appId": 1,
"releaseId": 1,
"serviceId": 1,
"imageName": "local_image_my_app:latest",
"dependsOn": null,
"config": {
"environment": {
"BALENA_APP_ID": "1",
"BALENA_APP_NAME": "localapp",
"BALENA_SERVICE_NAME": "my_app",
"BALENA_DEVICE_UUID": "my_uuid",
"BALENA_DEVICE_TYPE": "intel-nuc",
"BALENA_HOST_OS_VERSION": "balenaOS 2.31.2+rev1",
"BALENA_SUPERVISOR_VERSION": "9.11.1",
"BALENA_APP_LOCK_PATH": "/tmp/balena/updates.lock",
"BALENA": "1",
"RESIN_APP_ID": "1",
"RESIN_APP_NAME": "localapp",
"RESIN_SERVICE_NAME": "my_app",
"RESIN_DEVICE_UUID": "my_uuid",
"RESIN_DEVICE_TYPE": "intel-nuc",
"RESIN_HOST_OS_VERSION": "balenaOS 2.31.2+rev1",
"RESIN_SUPERVISOR_VERSION": "9.11.1",
"RESIN_APP_LOCK_PATH": "/tmp/balena/updates.lock",
"RESIN": "1",
"RESIN_SERVICE_KILL_ME_PATH": "/tmp/balena/handover-complete",
"BALENA_SERVICE_HANDOVER_COMPLETE_PATH": "/tmp/balena/handover-complete",
"USER": "root",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"UDEV": "1",
"NODE_VERSION": "8.16.0",
"YARN_VERSION": "1.15.2",
"WORKING_DIR": "/company/app",
"RESIN_API_KEY": "secret",
"BALENA_API_KEY": "secret",
"RESIN_API_URL": "https://api.my.domain",
"BALENA_API_URL": "https://api.my.domain",
"RESIN_SUPERVISOR_PORT": "48484",
"BALENA_SUPERVISOR_PORT": "48484",
"RESIN_SUPERVISOR_API_KEY": "secret",
"BALENA_SUPERVISOR_API_KEY": "secret",
"RESIN_SUPERVISOR_HOST": "127.0.0.1",
"BALENA_SUPERVISOR_HOST": "127.0.0.1",
"RESIN_SUPERVISOR_ADDRESS": "http://127.0.0.1:48484",
"BALENA_SUPERVISOR_ADDRESS": "http://127.0.0.1:48484"
},
"labels": {
"io.balena.features.kernel-modules": "1",
"io.balena.features.firmware": "1",
"io.balena.features.dbus": "1",
"io.balena.features.supervisor-api": "1",
"io.balena.features.balena-api": "1",
"io.balena.local.image": "1",
"io.balena.local.service": "my_app",
"io.balena.supervised": "true",
"io.balena.app-id": "1",
"io.balena.service-id": "1",
"io.balena.service-name": "my_app",
"io.balena.architecture": "amd64"
},
"privileged": true,
"tty": true,
"ipc": "host",
"restart": "always",
"networkMode": "host",
"volumes": ["1_resin-data:/data", "/tmp/balena-supervisor/services/1/my_app:/tmp/resin", "/tmp/balena-supervisor/services/1/my_app:/tmp/balena", "/run/dbus:/host/run/dbus", "/lib/modules:/lib/modules", "/lib/firmware:/lib/firmware"],
"image": "sha256:c151e17d0fb39f8c7c5e78dd1ec31bb289496324728333075effe4c929677a44",
"running": true,
"hostname": "d034791",
"command": ["npm", "start"],
"entrypoint": ["/usr/bin/entry.sh"],
"stopSignal": "SIGTERM",
"workingDir": "/company/app",
"user": "",
"oomKillDisable": false,
"readOnly": false,
"sysctls": {},
"portMaps": [{
"ports": {
"internalStart": 2947,
"internalEnd": 2947,
"externalStart": 2947,
"externalEnd": 2947,
"host": "",
"protocol": "tcp"
}
}],
"capAdd": [],
"capDrop": [],
"cgroupParent": "",
"devices": [],
"dnsOpt": [],
"extraHosts": [],
"expose": ["2947/tcp"],
"networks": {},
"dns": [],
"dnsSearch": [],
"ulimits": {},
"groupAdd": [],
"healthcheck": {
"test": ["NONE"]
},
"pid": "",
"pidsLimit": 0,
"securityOpt": [],
"stopGracePeriod": 10,
"tmpfs": [],
"usernsMode": "",
"cpuShares": 0,
"cpuQuota": 0,
"cpus": 0,
"cpuset": "",
"domainname": "",
"macAddress": "",
"memLimit": 0,
"memReservation": 0,
"oomScoreAdj": 0,
"shmSize": 67108864
}
}],
"networks": {},
"volumes": {
"resin-data": {
"labels": {}
}
}
}
}
},
"dependent": {
"apps": [],
"devices": []
}
}
}
I then disable local mode on the same device and it downloaded my app latest release.
When I requested the balena API about it here is what I found :
curl -X GET "https://api.my.domain/resin/release?\$filter=belongs_to__application%20eq%2<ID>" -H "Content-Type: application/json" -H "Authorization: Bearer <Token>"
result :
{
"d": [{
"created_at": "2019-07-03T08:52:21.603Z",
"id": 57,
"belongs_to__application": {
"__deferred": {
"uri": "/resin/application(4)"
},
"__id": 4
},
"commit": "0055afcb8f3bd0e53d3bd071b0006108",
"composition": {
"version": "2.1",
"networks": {},
"volumes": {
"resin-data": {}
},
"services": {
"main": {
"image": "my_app:647be9ff83c5552cd85208ee4bef210097a83fd8_my_app",
"privileged": true,
"tty": true,
"restart": "always",
"network_mode": "host",
"volumes": ["resin-data:/data"],
"labels": {
"io.resin.features.kernel-modules": "1",
"io.resin.features.firmware": "1",
"io.resin.features.dbus": "1",
"io.resin.features.supervisor-api": "1",
"io.resin.features.resin-api": "1"
}
}
}
},
"status": "success",
"source": "local",
"build_log": null,
"start_timestamp": "2019-07-03T08:52:21.496Z",
"end_timestamp": "2019-07-03T08:52:28.048Z",
"update_timestamp": "2019-07-03T08:52:28.151Z",
"__metadata": {
"uri": "/resin/release(57)",
"type": ""
}
}]
}
So it seems that the ipc:host was not taken into consideration in my docker-compose.yml . Maybe its a limitation of the API when you declare the composition of an app ?
Don’t know how to enable the support access as I’m running my own open-balena server.
Here is the docker-compose.yml file I use in case you need it :
version: '2.1'
networks: {}
volumes:
resin-data: {}
services:
my_app:
build: "."
privileged: true
tty: true
ports:
- 2947:2947
ipc: host
restart: always
network_mode: host
volumes:
- resin-data:/data
labels:
io.resin.features.kernel-modules: 1
io.resin.features.firmware: 1
io.resin.features.dbus: 1
io.resin.features.supervisor-api: 1
io.resin.features.resin-api: 1