Skip to content

After reconnecting tedge, lost the new name of main device modified via /twin/name #3734

@zhongys-c8y

Description

@zhongys-c8y

Describe the bug
I want to change the main device's name both locally and on the Cumulocity platform. The name was successfully changed by publishing retained message with the new name to the topic te/device/main///twin/name. But after reconnecting tedge (sudo tedge reconnect c8y), the previous name will override the new name. The /etc/tedge/device folder was empty during the entire process.

To Reproduce

  1. Normal thin-edge setup
  2. tedge mqtt pub -r te/device/main///twin/name '"<new-name>"'
  3. tedge mqtt sub '#' shows [te/device/main///twin/name] "<new-name>". Name changed on the Cumulocity platform.
  4. sudo tedge reconnect c8y
  5. tedge mqtt sub '#' shows [te/device/main///twin/name] "<old-name>". Name changed back to old name on the Cumulocity platform.

Environment (please complete the following information):

  • OS: Debian GNU/Linux 12 (bookworm)
  • Hardware: Raspberry PI 5
  • System-Architecture: aarch64
  • thin-edge.io version: 1.5.1

Additional context
Inspired by #3666

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtheme:entity_storeEntity store related functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions