Azure IoT Edge模块在启动时是否接收到孪生补丁?

huangapple go评论41阅读模式
英文:

Does Azure IoT Edge module receive a twin patch when it starts up?

问题

每次 IoT 边缘模块启动时都接收到孪生补丁是正常的吗?

想象一下这种情况:

  • IoT 边缘配置在本地虚拟机上
  • 在 example_module 的孪生期望属性中添加了一个属性
  • example_module 接收到一个补丁,并根据接收到的补丁设置其环境变量,并报告属性
  • 由于与无关的问题,example_module 崩溃并重新启动

在崩溃后重新启动时,example_module 是否会接收到一个补丁?

英文:

Is it normal for an IoT Edge Module to receive a twin patch everytime it starts up?

Imagine this scenario:

  • IoT edge is configured in an On-prem VM
  • A property is added into example_module's twin desired properties
  • example_module receives a patch and sets its environmental variables based on the patch received and reports back the properties
  • example_module crashes due to an unrelated issue and restarts

Does example_module receive a patch when it starts up after the crash?

答案1

得分: 1

是的,这正是发生的情况。

您描述的情况是,example_module 在崩溃后重新启动,它将接收一个包含最新期望属性的补丁。IoT Edge 运行时会维护每个模块的期望属性状态,当一个模块启动或重新启动时,它会将其状态与edgeAgent中的期望属性同步。这种行为确保模块始终与其模块双生子中定义的期望状态保持同步,即使在崩溃或重新启动后也是如此。

英文:

Yes, that's exactly what happens.

The scenario you described the example_module restarts after a crash, it would receive a patch containing the latest desired properties. The IoT Edge runtime maintains the desired properties state for each module, and when a module starts or restarts, it syncs up its state with the desired properties from the edgeAgent. This behaviour ensures the module is always in sync with the desired state defined in its module twin, even after crashes or restarts.

huangapple
  • 本文由 发表于 2023年5月7日 05:09:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/76191157.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定