-
Notifications
You must be signed in to change notification settings - Fork 72
File Ownership Issue in 'send collectd configuration to device' #3143
Copy link
Copy link
Closed
Description
Describe the bug
I am experiencing an unexpected behaviour when updating a certain configuration file (/etc/collectd/collectd.conf) via thin-edge from Cumulocity. The same operation succeeds only every second try, the others in between failing with:
config-manager failed downloading a file: Error while performing a file operation: Could not move file from "/tmp/collectd.conf.tmp" to "/tmp/collectd.conf": Failed to change owner: "/tmp/collectd.conf".
See reproduction steps to make the problem clear.
To Reproduce
- Have a Cumulocity tenant and bootstrap a thin-edge device via https://github.com/thin-edge/tedge-demo-container
- Go to your Device in Cumulocity and check current configuration of the tedge-configuration-plugin:
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/plugins/tedge-log-plugin.toml', type = 'tedge-log-plugin', user = 'tedge', group = 'tedge', mode = 0o644 },
{ path = '/etc/tedge/system.toml', type = 'system.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/mosquitto/conf.d/mosquitto.conf', type = 'mosquitto.conf', user = 'root', group = 'root', mode = 0o644 },
{ path = '/etc/collectd/collectd.conf', type = 'collectd.conf', user = 'root', group = 'root', mode = 0o644 },
{ path = '/etc/c8y-command-plugin/env', type = 'shell', user = 'tedge', group = 'tedge', mode = 0o644 },
]
- Within Configuration tab select
collectdand get snapshot from Device. Click on save to repository once it's there. - Stay on Configuration tab and send the collectd file (which you've just saved to repo) to the Device:
- First try: it fails with
Failed to change owner: "/tmp/collectd.conf" - Second try (on same device and same file): Now the operation succeeds.
- Third try: it fails with
Failed to change owner: "/tmp/collectd.conf" - Fourth try: succeeds
...and so on.
Environment (please complete the following information):
- thin-edge.io version 1.3.0
- Environment: reproducible in tedge-demo-container, also reproducible on a Pi5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working