Issue with push image OTA from torizon.io

Hi,

I connect my card (colibri imx8x, iris board v2) to torizon.io for OTA. Docker-compose deploy work well. I try now to deploy an image.

I setup torizoncode-builder from my laptop and a torizoncore OS from easy installer on a board.

cat /etc/os-release 
ID=torizon
NAME="TorizonCore"
VERSION="6.5.0+build.8 (kirkstone)"
VERSION_ID=6.5.0-build.8
PRETTY_NAME="TorizonCore 6.5.0+build.8 (kirkstone)"
DISTRO_CODENAME="kirkstone"
BUILD_ID="8"
ANSI_COLOR="1;34"
VARIANT="Docker"

I do

  • torizoncore-builder images download --remote-host 192.168.1.74 --remote-username torizon --remote-password <pwd>

  • torizoncore-builder build

Building image as per configuration file 'tcbuild.yaml'...

=>> Handling input section
Unpacking Toradex Easy Installer image.
Copying Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision 302d3d0ed6bbb0639f341a24735fe59e0b7506241955ab4c87f77481aacb961c from local repository...
935 metadata, 9196 content objects imported; 593.3 MB content written                                                                                                                      
0 metadata, 0 content objects imported; 0 bytes content written                                                                                                                            
Unpacked OSTree from Toradex Easy Installer image:
  Commit checksum: 302d3d0ed6bbb0639f341a24735fe59e0b7506241955ab4c87f77481aacb961c
  TorizonCore Version: 6.5.0+build.8

=>> Handling output section
Commit 71023dc314f9046e6a5fb08cd3db5f55975dd9452ccd07bfc5c2e1bf173ac4d8 has been generated for changes and is ready to be deployed.
Deploying commit ref: tcbuilder-20240320105749
Pulling OSTree with ref tcbuilder-20240320105749 from local archive repository...
  Commit checksum: 71023dc314f9046e6a5fb08cd3db5f55975dd9452ccd07bfc5c2e1bf173ac4d8
  TorizonCore Version: 6.5.0+build.8-tcbuilder.20240320105749
  Default kernel arguments: quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 

935 metadata, 9196 content objects imported; 593.3 MB content written                                                                                                                      
Pulling done.
Deploying OSTree with checksum 71023dc314f9046e6a5fb08cd3db5f55975dd9452ccd07bfc5c2e1bf173ac4d8
Deploying done.
Copy files not under OSTree control from original deployment.
Packing rootfs...
Packing rootfs done.
Updating TorizonCore image in place.

=>> Build command successfully executed!

  • torizoncore-builder platform push --credentials credentials.zip --package-name testOS --package-version 0.3 --hardwareid colibri-imx8x torizon-core-docker-colibri-imx8x-Tezi_6.5.0+build.8.tar
Pushing 'torizon-core-docker-colibri-imx8x-Tezi_6.5.0+build.8.tar' with package version 0.3 to OTA server.
Successfully pushed torizon-core-docker-colibri-imx8x-Tezi_6.5.0+build.8.tar to OTA server.

Push success, but then deploy image on card failed, journalctl -f -u aktualizr* gives

Mar 20 11:01:54 colibri-imx8x-07202633 aktualizr-torizon[966]: Current version for ECU ID: c1b34bd7b346a2482fcbe7e0222bddce984c77be59c42ef14a949bc090530571 is unknown
Mar 20 11:01:54 colibri-imx8x-07202633 aktualizr-torizon[966]: Cannot install a non-OSTree package on an OSTree system
Mar 20 11:01:54 colibri-imx8x-07202633 aktualizr-torizon[966]: Inconsistency between Director metadata and available ECUs: The target had a non-OSTree package that can not be installed on an OSTree system.
Mar 20 11:01:54 colibri-imx8x-07202633 aktualizr-torizon[966]: Unable to verify metadata.
Mar 20 11:01:54 colibri-imx8x-07202633 aktualizr-torizon[966]: Event: UpdateCheckComplete, Result - Error

How can I fixe this ostree issue ?

Thanks in advances,

I just found the issue, I push the *.tar file now I push base with this command:

torizoncore-builder platform push --credentials credentials.zip --package-name testOS --package-version 0.4 --hardwareid colibri-imx8x base

Some questions remains what is base ? It’s the last state from image unpack, or build . And how to select/show previous states ?

Thanks,

Hi @fjolain,

Glad you were able to solve your issue, let me see if I can help clarify your remaining question.

Some questions remains what is base ? It’s the last state from image unpack, or build . And how to select/show previous states ?

Internally the torizoncore-builder tool manages customization using OSTree. OSTree has a “git-like” structure with branches/refs and commits and such. When you first run the unpack command an initial branch/ref is created, this gets labeled as base. Every time you run the union command a new branch/ref gets created with the name you pass in this command, but base still exists. Whenever you clear the storage like how it asks you during the unpack command:

torizoncore-builder images unpack torizon-core-docker-apalis-imx8-Tezi_6.5.0+build.8.tar
Storage not empty. Delete current image before continuing? [y/N]

Then all previously created branch/refs get deleted, and a new base is created with whatever image you just unpacked. As a side-note whenever you run the build command it automatically unpacks the clears storage. In your build yaml file you can specify a branch name as seen here: TorizonCore Builder Tool “build” command | Toradex Developer Center

Though this is optional, if you don’t then a kind of random name gets generated instead.

Finally, no there is not a nice way at the moment to list all the branch/ref names, you just need to remember any name you create with union. Though with how often storage gets cleared during standard workflow this point is kind of moot. Especially if you use the build command since storage will get deleted with every execution anyways.

For your case you could set a static known branch name in your tcbuild.yaml. Then just use that to push after every build command.

Best Regards,
Jeremias