Closed reubenmiller closed 1 year ago
The issue has been resolved and the test cases have been expanded to cover for both the main and child devices and are viewable here:
The test cases were added as part of work in https://github.com/thin-edge/thin-edge.io/pull/2368
QA has thoroughly checked the feature and here are the results:
Describe the bug
thin-edge.io has the following bugs when dealing with the configuration management on the main and child devices:
To Reproduce
Main Device (Uploading from a device to cloud)
Install thin-edge.io and configure to connect to Cumulocity IoT
Configure the configuration plugin to access a binary file using the configuration file
file: /etc/tedge/c8y/c8y-configuration-plugin.toml
Create the dummy binary file on the thin-edge.io device (so there is something to upload)
In the Cumulocity UI (Device management application), request the binary configuration file with type
/etc/tedge/tedge.toml.tar.gz
Child Device
For downloads, the file is downloaded to the file server, however accessed by a child device, the local http server returns a status code 500 (indicating an unexpected error). Below shows the response shown by the server when access via curl:
See the linked PR's system tests for the example procedure.
Expected behavior
Configuration files should be treated as plain bytes and the contents should not be assumed to be of any specific format (e.g. utf-8 encoded text). This is applicable for both the main and child devices.
Screenshots
Downloading
Downloading a binary from Cumulocity to the device fails with the failure reason:
Uploading
Uploading a binary from the device to Cumulocity fails with the failure reason:
The log output shows the error:
Environment (please complete the following information):
Debian GNU/Linux 11 (bullseye)
Raspberry Pi Zero 2 W Rev 1.0
Linux pippin 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
tedge 0.12.1~365+g5a52630
Additional context