Stuck at Tutorial: Docker Compose - upgrade traefik (manifest/v2)

Hey guys,

i am going through the docker compose update tutorial for understanding and stucking right now at the update of the docker compose.

I am at the tutorial on Step " Update your composition using delta " but there is an error after passing the app-gen command:

app-gen --artifact-name "${ARTIFACT_NAME}-v2" \
        --device-type "$DEVICE_TYPE" \
        --platform "$PLATFORM" \
        --application-name "$ARTIFACT_NAME" \
        --image docker.io/library/traefik:v2.9,docker.io/library/traefik:v2.10 \
        --orchestrator docker-compose \
        --manifests-dir ./manifests/v2 \
        --output-path artifact-v2.mender \
        --deep-delta \
        -- \
        --software-name "${ARTIFACT_NAME}" \
        --software-version "v2" \
        --depends "rootfs-image.${ARTIFACT_NAME}.version:v1"

Getting error:

declare -a images_shas=([0]="66c077549480f6828d39797ca3855e6299d0c1e7daf08d67cd62320c07515ff0" [1]="7bf33d2be1db3d2e3269b3f7952c276cbf9c1eaddc95c629257537490f8db2be")
/home/mender/bin/app-gen: line 291: parent2id[null] not set.

Any thoughts about this? Creation manifest/v1 worked like a charme.

I am using debian 12 as my workstation.

Linux mender-dev 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux

Hi @octaconnect,

Thanks for the heads up! I could reproduce it, and the tutorial unfortunately doesn’t point out the required tools on the host. For manifest v1, respectively app-gen artifact creation without deltas, it is:

  • jq
  • tree

For deltas, it is additionally

  • xdelta3
  • docker-compose (if you are using the docker-compose example)

Greetz,
Josef

Hm interesting, on my workstation and the device all packages are installed (jq, tree, xdelta3 and docker compose extension). I am using the extension docker compose (not docker-compose).

Still not working and the same error return.

Hi @octaconnect,

Please try to install docker-compose, and not just the extension variant. I don’t think that the app-gen script is fit for both variants.

Greetz,
Josef

I am having the same problem. I tried sudo apt install docker-compose, but it still did not work. And by the way, I cannot see that docker-compose is called anywhere in the app-gen script. Any help is appreciated!

For people who encounter the same problem in the future, I found a solution:

My first problem was that I used v1.0.0 of the application update module, since that is what the tutorial links to. However, newer versions of docker (>= 25, I believe), create OCI-compliant images with docker image save, which requires v1.1.0 of app-gen (simply replace all “1.0.0” in the tutorial with “1.1.0”). This allowed me to generate the artifacts in the tutorial.

I got a new error when deploying the v2 artifact to my device:

ERROR: current image is not in OCI format while the new one is, cant continue with deep delta.

It turns out that I had docker version < 25 on my device (and that was the latest available version). I ended up installing an older version of docker on my workstation, and stuck to v1.0.0 of the application update module.

1 Like

Hi all,
Adding a bit more onto this:

I was also dealing with this problem until I found that version 1.0 of app-gen did not have the oci_deep_delta function. After upgrading from master I was able to generate the artifacts but not install the update.

My issue differs from the one of the previously mentioned ones. When doing standalone deployment and calling the mender-update install command, I get some debug messages that go looking for the sha246 directories. One, however, is not found:

record_id=48 severity=info time="2025-Jan-09 19:12:29.766939" name="Global" msg="Update Module output (stderr): open /var/lib/docker/tmp/docker-import-3234564186/blobs/sha256/ac4d34842145233183135a3a3ddc7d2bf181b1da3023b6ca9627dd8ab946b73c: no such file or directory" 

In my workstation, where the artifacts are generated, I use docker inspect on the versions 2.9 and 2.10 of traefik. This yields the following results:

// traefik v2.10
"Layers": [
        "sha256:ac4d34842145233183135a3a3ddc7d2bf181b1da3023b6ca9627dd8ab946b73c",
        "sha256:aebf07596a72256347e3562f09b0935d5be2cd71d1bdd1a97b4cfe08943582ee",
        "sha256:7a06da8012624d2e01eb6471bca70b99822c076797f26538ef3a6de258b6e6ea",
        "sha256:80a16eb735a4a805adf93d41b9e211c41712543608e086f7a9fe931cb8d1aaf5"
    ]
// traefik v2.9
"Layers": [
        "sha256:bf3c9ec9aec09ee4ed7849f3515732f22b657cb1dedf14640187bfbb52e657bf",
        "sha256:c3a0102d2f55c8d2b7ed039faa5a5792702ef70f86c5ef1794adad3de329f9cf",
        "sha256:25de568ca4c4ad18588efd5f9fd11a3a07866ed309cd3b31123f2c8c46cd1715",
        "sha256:351769e383ad665c265e87e71446ba13c498dcded6d1034c2fd0da87e1a7328e"
    ]

We can see that the sha corresponding to the first layer of the new image is the sha of the directory that cannot be found, although a previous message shown during the installing indicates the layer is actually present:

record_id=28 severity=info time="2025-Jan-09 19:12:29.056057" name="Global" msg="Update Module output (stdout): ./blobs/sha256/ac4d34842145233183135a3a3ddc7d2bf181b1da3023b6ca9627dd8ab946b73c.source" 

I have ensured that my device in which the update is being deployed the latest modules are being installed.

SRC_URI = "git://github.com/mendersoftware/app-update-module;branch=master;protocol=https"

Has anyone seen this error?