# Server matches wrong artifact during deployment

**URL:** <https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386>\
**Category:** General Discussions\
**Created:** [March 17, 2021, 4:04pm UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386 "2021-03-17T16:04:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![bender](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bender/32/847_2.png) [@bender](https://hub.mender.io/u/bender)\
**Post date:** [March 17, 2021, 4:04pm UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/1 "2021-03-17T16:04:10Z")

</div>

We have a test machine booted with release version 6 (which was installed manually with a rootfs-image local file with `mender install version6.mender`).

Our cloud server for release version 1 has these artifacts uploaded:

- rootfs-image for 1
- mender-binary-delta from 0 to 1
- mender-binary-delta from 2 to 1

The differentials are produced by `mender-binary-delta-1.1.0`.  
If I were to start a deployment to that test machine for release 1, one would expect the server would choose rootfs-image for 1. In reality server sends mender-binary-delta from 2 to 1 which of course fails (“rootfs\_image\_checksum” not satisfied by currently installed artifact ([hash\_of\_2] != [hash\_of\_6]).  
Deleting mender-binary-delta from 2 to 1 and retrying, the server picks the other differential and fails again.  
Deleting every other differential, the server finally chooses rootfs-image for 1 and succeeds.  
Uploading another differential from 6 to 1 (while keeping the rootfs-image for 1) chooses correctly that differential and installs it fine.  
Can something be wrong on the test machine or is it a bug on the server?

---

<div class="post-metadata">

**Author:** ![tranchitella](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tranchitella/32/606_2.png) [@tranchitella](https://hub.mender.io/u/tranchitella)\
**Post date:** [March 18, 2021, 10:22am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/2 "2021-03-18T10:22:34Z")

</div>

@bender a couple of questions:

1. Are you using Hosted Mender, or is it self-hosted?
2. How do you set up the deployment? The exact list of steps would be beneficial.

---

<div class="post-metadata">

**Author:** ![bender](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bender/32/847_2.png) [@bender](https://hub.mender.io/u/bender)\
**Post date:** [March 18, 2021, 10:39am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/3 "2021-03-18T10:39:47Z")

</div>

1. Hosted Mender
2. Choose the version 1 release, scroll to the bottom and click on “Create deployment with this release”. Select the group where the test machine is the only member \> Next \> Next \> Create

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [March 19, 2021, 7:10am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/4 "2021-03-19T07:10:53Z")

</div>

Hey @bender,

I’d like you to provide some info for further troubleshooting:

1. Can you call `mender-artifact read <ARTIFACT>` on all three artifacts and post the output here?
2. Can you call `mender show-provides` on the device, and post the output here?

---

<div class="post-metadata">

**Author:** ![bender](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bender/32/847_2.png) [@bender](https://hub.mender.io/u/bender)\
**Post date:** [March 19, 2021, 2:26pm UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/5 "2021-03-19T14:26:36Z")

</div>

@kacf I replied as a DM…

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [March 22, 2021, 8:25am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/6 "2021-03-22T08:25:02Z")

</div>

Thank you, I’ve verified that there is nothing wrong with the artifacts themselves, at least not as far as I can see.

> Our cloud server for release version 1 has these artifacts uploaded:

You did say Hosted Mender earlier, but I just want to double check: When you say “Our cloud server”, you mean that you host it yourself?

The reason I ask is that the Open Source backend does not support dependency resolution, this is an Enterprise feature. The Open Source backend just ignores them and picks the smallest artifact available, so it would produce the results you see.

---

<div class="post-metadata">

**Author:** ![bender](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bender/32/847_2.png) [@bender](https://hub.mender.io/u/bender)\
**Post date:** [March 22, 2021, 8:53am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/7 "2021-03-22T08:53:22Z")

</div>

Apologies for the confusion. We are on a `Mender Professional` account hosted by you. The differential feature is something we have used a lot already so its not new.

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [March 23, 2021, 8:58am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/8 "2021-03-23T08:58:52Z")

</div>

@bender: According to [Features | Mender](https://mender.io/plans/features), “Automatic assignment of delta updates” is only available in Enterprise plans. In Professional and lower plans they will behave like the Open Source version, dependencies are ignored. How have you been installed them previously?

---

<div class="post-metadata">

**Author:** ![bender](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bender/32/847_2.png) [@bender](https://hub.mender.io/u/bender)\
**Post date:** [March 23, 2021, 4:32pm UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/9 "2021-03-23T16:32:02Z")

</div>

if the selection on non-Enterprise plans is by choosing the smaller size then it may be the case that by chance that was the expected diff to be chosen leaving us the false impression that it works with multiple diffs uploaded.  
I guess the only way is to keep only one diff along with the full rootfs-image. Correct?

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [March 23, 2021, 9:34pm UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/10 "2021-03-23T21:34:46Z")

</div>

Without the “automatic assignment of delta updates” feature, you basically need to name each artifact independently and ensure that you are deploying with the correct one.

Honestly I don’t know if the behavior is defined where you have multiple artifacts, named the same, with the same compatible machines list but one is full image and one is delta.

@kacf @tranchitella is this defined? Should we maybe issue an error and not allow this situation?

Drew

---

<div class="post-metadata">

**Author:** ![bender](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bender/32/847_2.png) [@bender](https://hub.mender.io/u/bender)\
**Post date:** [March 24, 2021, 5:46am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/11 "2021-03-24T05:46:55Z")

</div>

> [@drewmoseley](#):
>
> name each artifact independently

What do you mean? The only field I have access to modify is the description and the release number.  
The description I believe is an optional free-text field for informational purposes. The release number defeats the purpose of having a differential update as the target machine will end up with a different release installed. I think you mean something else…

> [@drewmoseley](#):
>
> I don’t know if the behavior is defined where you have multiple artifacts

So are you saying that if we have one full rootfs-image and one mender-binary-delta for the same device type for the same release, it is not guaranteed that _always_ the delta will be chosen in case the target machine’s hash match the delta’s `depends` hash? I’m finding hard to believe that we have been that lucky so far in our tests…

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [March 24, 2021, 7:22am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/12 "2021-03-24T07:22:51Z")

</div>

> [@drewmoseley](#):
>
> Honestly I don’t know if the behavior is defined where you have multiple artifacts, named the same, with the same compatible machines list but one is full image and one is delta.
> 
> @kacf @tranchitella is this defined? Should we maybe issue an error and not allow this situation?

It’s defined: It always picks the smallest Artifact if both match the device type.

> [@bender](#):
>
> I guess the only way is to keep only one diff along with the full rootfs-image. Correct?

@drewmoseley is right, if you keep both the diff and the rootfs-image, then the rootfs-image will never be selected. In the absence of automatic delta assignment you will have to name each delta artifact differently, since each one needs to be its own release to be selected. I believe you can use `mender-artifact modify -n NAME` on the delta artifact to do name it `rootfs-v2-from-v1` for example. This still keeps software versioning as is, only the name of the artifact changes.

Of course another choice is to bite the bullet and go Enterprise, then all this is handled automatically and you won’t have to worry about it.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [March 24, 2021, 1:09pm UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/13 "2021-03-24T13:09:10Z")

</div>

> [@bender](#):
>
> What do you mean? The only field I have access to modify is the description and the release number.  
> The description I believe is an optional free-text field for informational purposes. The release number defeats the purpose of having a differential update as the target machine will end up with a different release installed. I think you mean something else…

You got my meaning correctly here. Without the automatic assignment you need to use separate release numbers.

---

<div class="post-metadata">

**Author:** ![basil](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/basil/32/2419_2.png) [@basil](https://hub.mender.io/u/basil)\
**Post date:** [February 13, 2025, 7:26am UTC](https://hub.mender.io/t/server-matches-wrong-artifact-during-deployment/3386/14 "2025-02-13T07:26:08Z")

</div>

Hi,

Is it still the case that the server does not necessarily choose the correct delta artifact if mulitple delta artifacts are present for a release?

Thank you in advance
