Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c8y-configuration-plugin supported configuration types is not updated via cloud update #1883

Closed
reubenmiller opened this issue Mar 31, 2023 · 2 comments
Assignees
Labels
bug Something isn't working theme:configuration Theme: Configuration management

Comments

@reubenmiller
Copy link
Contributor

reubenmiller commented Mar 31, 2023

Describe the bug

Adding a new configuration type and then applying the new c8y-configuration-plugin.toml file via a Cumulocity IoT operation does not update the list of support configurations in Cumulocity.

The test passes in version 0.10.0 (prior to the refactoring), and fails afterwards. The refactoring was done in #1828.

Note: Restarting the c8y-configuration-plugin does update the supported configurations in Cumulocity IoT, however this is not the expected behaviour.

To Reproduce

The regression was discovered in PR to add the integration tests: #1875

The failing test case is shown below:

Property Value
Source configuration_operation.robot
TestCase Update configuration plugin config via cloud

Expected behavior

Adding a new supported configuration type should be possible by applying a new c8y-configuration-plugin file type, and the new type should be visible in the Cumulocity IoT UI without having to restart the service.

Screenshots

Environment (please complete the following information):

  • OS [incl. version]: Debian 11
  • Hardware [incl. revision]: Docker
  • System-Architecture [e.g. result of "uname -a"]: arm64 (aarch64)
  • thin-edge.io version [e.g. 0.1.0]: 0.10.0-68-g63e33c09

Additional context

@reubenmiller reubenmiller added the bug Something isn't working label Mar 31, 2023
@reubenmiller reubenmiller added the theme:configuration Theme: Configuration management label Mar 31, 2023
@reubenmiller reubenmiller self-assigned this Apr 3, 2023
@reubenmiller
Copy link
Contributor Author

Update: Rebasing from main has fixed the cloud update handling, though some questions about some other inotify events are still being clarified before closing the ticket.

  • Handle in-place edits via sed, e.g. sed -i 's/CONFIG1/CONFIG3/g' /etc/tedge/c8y/c8y-configuration-plugin.toml
  • Handle overwriting a file via move, e.g. mv /etc/tedge/c8y/c8y-configuration-plugin-updated.toml /etc/tedge/c8y/c8y-configuration-plugin.toml

@reubenmiller reubenmiller changed the title Regression: c8y-configuration-plugin supported configuration types is not updated via cloud update c8y-configuration-plugin supported configuration types is not updated via cloud update Apr 4, 2023
@reubenmiller
Copy link
Contributor Author

Closing as this original problem was solved by rebasing the PR's branch. The additional gaps in the inotify events will be covered in #1896

@reubenmiller reubenmiller closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working theme:configuration Theme: Configuration management
Projects
None yet
Development

No branches or pull requests

1 participant