"Create Deployment for Single Device" doesn't overwrite existing module. I need to delete it first.

Iain White 146 Reputation points
2021-05-28T09:20:45.323+00:00

When I have an edge module running, if I want to update it, I need to remove it before using the "Create Deployment for Single Device" option in VSCode. If I don't delete it, the updated module isn't deployed. Is this a known issue? Is there anything I can do to fix this?

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
401 questions
0 comments No comments
{count} vote

Accepted answer
  1. QuantumCache 20,271 Reputation points
    2021-06-01T06:45:55.263+00:00

    Hello anonymous user I agree with your observation, and thanks for posting this question which is very helpful to others as well.

    Yes this behavior is by design. The Edge runtime is designed to detect changes in deployments. So if nothing has materially changed in the deployment definition itself (even if something referred to from the deployment — such as the image definition referred to by a tag — changes) then Edge does not take any action.

    So we have a the following options:

    1. Use a unique tag for every image
    2. Change the “version” property in the module’s entry to a new value every time
    3. Delete the module from the deployment and then add it back

    If this is during development, then you could simply run docker rm -f <module id> and that should cause Edge to download the image afresh.

    Related question: Github

    Please comment in the below section for feedback or comments.

    If the response is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.