[aktualizr, offline updates] Found in archive a file with bad file type: 40960

Hi,

I’ve been experimenting with offline updates for docker-compose on a Verdin IMX8MM using a slightly customized (mostly drivers and services) TorizonCore 5.7.0.

First, I had to edit platform.py in torizoncore-builder to allow me to login to Docker Hub and use private registries with torizoncore-builder platform lockbox. This works and I ensured the file is properly canonicalized via torizoncore-builder bundle, which does have support for private registries and creates a canonical docker-compose.yml.

Now, I am able to upload a docker-compose.lock.yml file in canonical format to Torizon OTA, create a lockbox via the web interface and then use torizoncore-builder platform lockbox to generate it. I copy it onto a USB stick, plug the stick into the test device, and the update is initiated. All goes well until it reaches a certain tarball/image, where aktualizr-torizon complains that it finds a file with bad file type: 40960, see below.

Aug 24 13:09:47 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Current version for ECU ID: 9c6306b589af7dc5fa471e189444102fd4355f16c6903cf7d97e9b7759e60baf is unknown
Aug 24 13:09:47 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Image already fetched; skipping fetching
Aug 24 13:09:47 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Event: DownloadTargetComplete, Result - Success
Aug 24 13:09:47 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Event: AllDownloadsComplete, Result - Success
Aug 24 13:09:47 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Current version for ECU ID: 9c6306b589af7dc5fa471e189444102fd4355f16c6903cf7d97e9b7759e60baf is unknown
Aug 24 13:09:47 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Waiting for Secondaries to connect to start installation...
Aug 24 13:09:48 verdin-imx8mm-06944460 aktualizr-torizon[1025]: No update to install on Primary
Aug 24 13:09:48 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Event: InstallStarted
Aug 24 13:09:48 verdin-imx8mm-06944460 aktualizr-torizon[1025]: docker-compose file matches expected digest
Aug 24 13:09:48 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/2f779b3fac92271738cfaa66067167e29a7c1dd9bddd5f92e53c2d9326c9b5f2.tar
Aug 24 13:10:45 verdin-imx8mm-06944460 aktualizr-torizon[1025]: PROXY: sending device data to Torizon OTA.
Aug 24 13:10:51 verdin-imx8mm-06944460 aktualizr-torizon[1049]: Loaded image: jabbla/allora3-bt:digest_sha256_2f779b3fac92271738cfaa66067167e29a7c1dd9bddd5f92e53c2d9326c9b5f2
Aug 24 13:10:51 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/2f779b3fac92271738cfaa66067167e29a7c1dd9bddd5f92e53c2d9326c9b5f2.tar" finished, code: 0, status: success
Aug 24 13:10:51 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/8a74d7d66f11c3c238294d5f023314802587f6131f2eeb13048b6a798d9e6d5a.tar
Aug 24 13:11:24 verdin-imx8mm-06944460 aktualizr-torizon[1067]: Loaded image: jabbla/allora3-hw:digest_sha256_8a74d7d66f11c3c238294d5f023314802587f6131f2eeb13048b6a798d9e6d5a
Aug 24 13:11:24 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/8a74d7d66f11c3c238294d5f023314802587f6131f2eeb13048b6a798d9e6d5a.tar" finished, code: 0, status: success
Aug 24 13:11:24 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/e3119fbc75341e4ae07c6e10187534739973be5109b780d715e31d93a3105f76.tar
Aug 24 13:11:25 verdin-imx8mm-06944460 aktualizr-torizon[1084]: Loaded image: eclipse-mosquitto:digest_sha256_e3119fbc75341e4ae07c6e10187534739973be5109b780d715e31d93a3105f76
Aug 24 13:11:25 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/e3119fbc75341e4ae07c6e10187534739973be5109b780d715e31d93a3105f76.tar" finished, code: 0, status: success
Aug 24 13:11:25 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/118c6159a1372ef165332409d9f151ca954c060a77ea174470d5955e871a04d0.tar
Aug 24 13:11:50 verdin-imx8mm-06944460 aktualizr-torizon[1096]: Loaded image: jabbla/allora3-skippy:digest_sha256_118c6159a1372ef165332409d9f151ca954c060a77ea174470d5955e871a04d0
Aug 24 13:11:50 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/118c6159a1372ef165332409d9f151ca954c060a77ea174470d5955e871a04d0.tar" finished, code: 0, status: success
Aug 24 13:11:50 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/b67eabdd265a17d6d8582df00487288193cf1d7555fc64bc00ef8f8a8a0a62f8.tar
Aug 24 13:12:15 verdin-imx8mm-06944460 aktualizr-torizon[1109]: Loaded image: jabbla/allora3-speech:digest_sha256_b67eabdd265a17d6d8582df00487288193cf1d7555fc64bc00ef8f8a8a0a62f8
Aug 24 13:12:15 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/b67eabdd265a17d6d8582df00487288193cf1d7555fc64bc00ef8f8a8a0a62f8.tar" finished, code: 0, status: success
Aug 24 13:12:15 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/72da2b96284cbd9f09457c4d42daf6faecc274cce8d4cafe70c8e6452b583ca8.tar
Aug 24 13:13:13 verdin-imx8mm-06944460 aktualizr-torizon[1124]: Loaded image: jabbla/allora3-web:digest_sha256_72da2b96284cbd9f09457c4d42daf6faecc274cce8d4cafe70c8e6452b583ca8
Aug 24 13:13:13 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/72da2b96284cbd9f09457c4d42daf6faecc274cce8d4cafe70c8e6452b583ca8.tar" finished, code: 0, status: success
Aug 24 13:13:13 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/5374677586f3df47994effc1e42c96bb66671ae3bdf31e58f09e6cfa7e73200a.tar
Aug 24 13:15:02 verdin-imx8mm-06944460 aktualizr-torizon[1147]: Loaded image: jabbla/allora3-kiosk:digest_sha256_5374677586f3df47994effc1e42c96bb66671ae3bdf31e58f09e6cfa7e73200a
Aug 24 13:15:02 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/5374677586f3df47994effc1e42c96bb66671ae3bdf31e58f09e6cfa7e73200a.tar" finished, code: 0, status: success
Aug 24 13:15:02 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/2aba5915c2eb9ef942225ce0f442cf7ff65d759d9323dfc1f8a837e5ccb5a7cf.tar
Aug 24 13:15:33 verdin-imx8mm-06944460 aktualizr-torizon[1163]: Loaded image: jabbla/siab:digest_sha256_2aba5915c2eb9ef942225ce0f442cf7ff65d759d9323dfc1f8a837e5ccb5a7cf
Aug 24 13:15:33 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of "/media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/2aba5915c2eb9ef942225ce0f442cf7ff65d759d9323dfc1f8a837e5ccb5a7cf.tar" finished, code: 0, status: success
Aug 24 13:15:33 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading metadata from tarball: /media/3F62-C968/images/5019ebc3d57b7a598011e9005f88bfdac3132ed722aaafd474713ef267f2a846.images/73aa9327063a85d943cf31471bb123a1b61b7fc4585111cd29f034f74db9026a.tar
Aug 24 13:15:33 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Found in archive a file with bad file type: 40960
Aug 24 13:15:53 verdin-imx8mm-06944460 aktualizr-torizon[1025]: validateMetadata: Key '00dcf3b16735f3d15ba4e800c155877470bacc7dab40e7cd3665b3ab316aced9/layer.tar' not found in metamap [RE]
Aug 24 13:15:53 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Loading of tarballs aborted!
Aug 24 13:15:53 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Offline loading failed: Failed to load docker tarball 73aa9327063a85d943cf31471bb123a1b61b7fc4585111cd29f034f74db9026a.tar
Aug 24 13:15:53 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Rolling back container update
Aug 24 13:15:53 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Running docker-compose up
Aug 24 13:15:53 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Running command: /usr/bin/docker-compose --file /var/sota/storage/docker-compose/docker-compose.yml -p torizon up --detach --remove-orphans
Aug 24 13:15:57 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-bt ...
Aug 24 13:15:57 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-skippy ...
Aug 24 13:15:57 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-hw     ...
Aug 24 13:15:57 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-speech ...
Aug 24 13:15:57 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting weston         ...
Aug 24 13:15:57 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-web    ...
Aug 24 13:16:01 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-bt     ... done
Aug 24 13:16:01 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting weston         ... done
Aug 24 13:16:04 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-hw     ... done
Aug 24 13:16:05 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-speech ... done
Aug 24 13:16:05 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-skippy ... done
Aug 24 13:16:05 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting allora3-web    ... done
Aug 24 13:16:05 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting torizon_kiosk_1 ...
Aug 24 13:16:17 verdin-imx8mm-06944460 aktualizr-torizon[1208]: Starting torizon_kiosk_1 ... done
Aug 24 13:16:18 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Removing not used containers, networks and images
Aug 24 13:16:18 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Running command: docker system prune -a --force
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: Deleted Images:
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: jabbla/allora3-skippy:digest_sha256_118c6159a1372ef165332409d9f151ca954c060a77ea174470d5955e871a04d0
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:4aeebc27283dc48db2242d256531849c0277b127b913b8c30daed7b046442c56
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:f38535c140b1a12029f4aad4a7c6178eb2743fcd442396c6440eab6b5c348f6c
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:1f075959c2211236bb079a540c63fdd88649ca7f8d8ca5093576967b805f5306
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:acc315818877c3ed4924b0a5f5216a7fc8e24738896266147a6b297c7bf61079
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:06b9633e09d4bafb21e9a226e5e732bdc51623e870271c530b9c6c4d1bbad620
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:434771d56f00a58eebc8e95eb7156aeab8ba51a6c997c47e034e4fe1bc190a7f
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:04e18b2d0288731256c0dc05f86bcebd7a0e225c2b0e0f70282b056699223d4f
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: jabbla/allora3-web:digest_sha256_72da2b96284cbd9f09457c4d42daf6faecc274cce8d4cafe70c8e6452b583ca8
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:dc3535888313f5436892e204bd384fa51a261c5b3c661b43886578b5ee9c032d
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:d90c757936d655ced5da2b19e57a19d2e695fcf3e0ccbaf35817836a26add052
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:dd06a753b729b999ed9fbf91ce0c108078f6c545cb043c7c3ec737f4757eb80c
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:17d915a880862a9b5fa6aa44e148ac4f2a4459858ee09fb2a4bfb7762082816e
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:5b25f149b458ea0dd770488b1194953e4b07178968e62b7e68fde8519829b21b
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:3e7b2564f1f0bda37a22ac866eeb845d43095fb4e01f2e9b792f8f0423ab138d
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:9776ae3e25911df74a9f9d811c6985e56379de7dcbf1513189a2023c6b205262
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:b310c601a3dfbf093116d9d2868b9bb4cc828b940fffd62f861aa13b500aecc4
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:772553d587d2937f0bfff453fb1adc190b2434c71576b1b7e297b9621fa96bc8
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:067db400488d44fd50ac08c5e057c19aba6c5f52111bfb63f6f549d4331186dd
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:5b7df235d876e8cd4a2a329ae786db3fb152eff939f88379c49bcaaabbafbd9c
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: eclipse-mosquitto:digest_sha256_e3119fbc75341e4ae07c6e10187534739973be5109b780d715e31d93a3105f76
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:3d0dec29d43434d0455eb0a93d0cd7bcad3933466a5874ccfc26698aec0a685a
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:48d7f38658cefe6311d9a6e2627a82006b89dfb5a17e04a69852a053fde1abb0
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:5c44969593ff4ea310dc55e63f9270bace55394ef22462b9b65c4c339d54fce7
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:62170e181a92ced0deb88df006382d43977c9fc1ee8463603224492435f72735
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: jabbla/siab:digest_sha256_2aba5915c2eb9ef942225ce0f442cf7ff65d759d9323dfc1f8a837e5ccb5a7cf
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:8f0b6531c3ce0adadeab80690cbc40f27309201fdb985cdeb2e9b52247c70b27
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:0bb24ae95afb130ffe874750e2157a750981637a43fc83353aa9857ac0c35449
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:c721dd31bb9f1c03e1c74b13776b886039667192151be8a4cd3349f3a29506e9
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:a0140c9b31e93345f25532937f9ef63afa2d1b9607da132ad778f8c0be0a31dd
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:f3cad9f8ac1ee2f04e09db4d66d14c7806b881917a632bed9ae1117c6b10e1f9
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: jabbla/allora3-kiosk:digest_sha256_5374677586f3df47994effc1e42c96bb66671ae3bdf31e58f09e6cfa7e73200a
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: jabbla/allora3-bt:digest_sha256_2f779b3fac92271738cfaa66067167e29a7c1dd9bddd5f92e53c2d9326c9b5f2
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: jabbla/allora3-hw:digest_sha256_8a74d7d66f11c3c238294d5f023314802587f6131f2eeb13048b6a798d9e6d5a
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: untagged: jabbla/allora3-speech:digest_sha256_b67eabdd265a17d6d8582df00487288193cf1d7555fc64bc00ef8f8a8a0a62f8
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:62f8d52e4a858f72acad9fd04fe0ffc3b0c172135372f9c307c4d69f618b50fb
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:8a60c3c2f2175ba8b66aabf00d3ab1162bc95f6bc11ada238301d6e974efaa99
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: deleted: sha256:2d5280ab2cb20552f16c4b764fe6e07d1204e5a0ec1a4df88d2feeb0a1185d38
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1837]: Total reclaimed space: 324.4MB
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Running command: fw_setenv rollback 1
Aug 24 13:16:26 verdin-imx8mm-06944460 aktualizr-torizon[1025]: Running command: reboot

I investigated this, and in that archive there is a layer.tar that symlinks to another. Aktualizr-torizon cannot deal with this symlink and expects only directories or files in the archive, but the symlink is generated by platform.py calling docker save. In the aktualizr-torizon source, in dockertarballloader.cc, the method loadMetadataEntry contains the following check:

  // Ensure file type is good.
  if (archive_entry_filetype(entry) != AE_IFREG && archive_entry_filetype(entry) != AE_IFDIR) {
    LOG_WARNING << "Found in archive a file with bad file type: " << archive_entry_filetype(entry);
    return false;
  }

I guess docker does not always symlink when saving a tarball and therefore this situation simply didn’t occur before?

Is there a way to prevent docker/torizoncore-builder from creating these symlinks? In any case, I think the fix is that Aktualizr-Torizon should be prepared to handle the eventuality of a symlink.

Kind regards and thanks for reading,

Ernest Van Hoecke

Greetings @Ernest,

This is an interesting issue that never came up in our testing or observations before. I’m unable to reproduce this, at least with any of my test Lockboxes. Is it possible to share with us your containers and compose file that is causing this issue for you? I understand you have the containers in a private registry however. It would just be nice for our team to be able to reproduce this so we can analyze the issue.

Some other questions I have. If you re-download/re-make the Lockbox does this happen every time? Basically is it consistently reproducible?

Also, if you manually docker load the tarball produced from torizoncore-builder platform lockbox, do the container images load properly?

Best Regards,
Jeremias

Thanks for the fast reply @jeremias.tx,

I’ve made the repository producing a symlink public for your testing: Docker Hub. Let me know when we can set it private again, but it contains no critical code and is simply a small edit of Weston. I hope it still occurs using only that repo, but I suspect it will as the symlink pointed to another layer within that image. The docker-compose snippet of this weston container is included below. I did find some info online that this is a thing docker save can do. I also manually replaced the symlink with a copy of the layer.tar it pointed to which seemed to fix the issue. I’ll be scripting that step if necessary.

This did seem to be consistent yes. It always occurs in the same spot and I tried a few different lockboxes and copy methods before I singled in on the issue.

I can try the docker load later, but don’t have the time now.

Kind regards,

Ernest Van Hoecke

weston container definition in docker-compose:

  weston:
    cap_add:
    - CAP_SYS_TTY_CONFIG
    container_name: weston
    device_cgroup_rules:
    - c 4:0 rmw
    - c 4:7 rmw
    - c 13:* rmw
    - c 199:* rmw
    - c 226:* rmw
    environment:
      ACCEPT_FSL_EULA: '1'
    image: jabbla/allora3-weston@sha256:73aa9327063a85d943cf31471bb123a1b61b7fc4585111cd29f034f74db9026a
    network_mode: host
    restart: unless-stopped
    volumes:
    - source: /tmp
      target: /tmp
      type: bind
    - source: /dev
      target: /dev
      type: bind
    - source: /run/udev
      target: /run/udev
      type: bind
    - source: /allora3/weston/weston.ini
      target: /etc/xdg/weston/weston.ini
      type: bind
    - source: /allora3/weston/icons
      target: /usr/share/icons
      type: bind

Thank you very much for providing a way to reproduce this, it’s very much appreciated.

That said, using this image I was able to reproduce the error on my own setup quite easily now. I’ve made a copy of the container image so we should be able to reproduce this for further testing and analysis going forward.

As for the issue itself after a brief internal discussion this does seem to be a limitation due to the lack of proper symlink handling. I’ll pass this onto our teams as a bug to be fixed. Once it gets properly fixed we’ll try to notify you, though I can’t give any timelines yet of when this will happen.

Best Regards,
Jeremias

I’m glad to hear it helped!

This might be unrelated, but is there a way to programmatically generate a lockbox on the Torizon Platform? I’d like to do that as part of a CI workflow.

EDIT: I’ve figured it out via the Chrome dev tools and stumbling upon the API client creator in the Torizon Platform settings.

Kind regards,
Ernest

This might be unrelated, but is there a way to programmatically generate a lockbox on the Torizon Platform? I’d like to do that as part of a CI workflow.

Though you already found this out for yourself, I do have some additional information to provide on this. We’re beginning to document the API for our platform service on our developer site as seen here: Torizon OTA | Toradex Developer Center

Keep in mind this documentation is still in progress and early. Furthermore, we also plan to create a CLI tool that will act as a sort of wrapper for the API, though this is still in the conceptual phase and we have nothing to share at the moment.

Best Regards,
Jeremias

Thans for the info! I was sure there’d be some documentation on it but couldn’t (quickly) find it via Google or the dev site. A tiny CLI for this lockbox creation is exactly what I made.

Kind regards,

Ernest Van Hoecke

The API for our platform is in the process of becoming more public. Well the API itself is already public, but the other things like supporting documentation and tooling are still a work in itself. So keep an eye out as these things become more polished and available.

Best Regards,
Jeremias

hello,
I ran in the same error.
Any news about the fix?

Regards,
Rocco

Hi @RoccoBr,

This isn’t fixed yet, but I’ve attached the Python script I use to patch the lockboxes as a workaround. It replaces each symlink with a copy of what it links to. It should be self-explanatory with the help string. Takes in two arguments, an input and output directory. The directories should contain an ‘images’ and ‘metadata’ folder as expected.
lockbox_patcher.py (2.8 KB)

It’s a step in my CI pipeline that every update goes through, you can easily run it manually.

P.S.: You might want to check if you don’t run into this issue if you also want synchronous updates. Just to save you the time up front.

Kind regards,

Ernest Van Hoecke

1 Like

Hi @Ernest ,

Thank you for your effort and for sharing your patch.

The team is already aware of this topic. We will post an update as soon as we have something available.

Best Regards
Kevin

thank you very much @Ernest , if I patch the lockbox with your script the installation is completed succesfully!

2 Likes

Hello @Ernest , many thanks for sharing your workaround :slight_smile:
@RoccoBr , if that solved your problem, could you mark the post as a solution please?

Best regards,
Josep