thin-edge.io
thin-edge.io copied to clipboard
Directory for custom fragments /etc/tedge/device does not exist
Describe the bug To add custom fragments to a device it is mentioned that /etc/tedge/device/inventory.json should be populated. However currently neither the file inventory.json nor the directory /etc/tedge/device/ does exist. Since the /etc/tedge directory is created during the installation process it would be a better user experience to create the directory or event better the file directly.
Thanks @mbay-ODW . We will change our implementation to create /etc/tedge/device/
by tedge_mapper --init c8y
.
The inventory.json
is always parsed from the standard path( /etc/tedge/device/inventory.json
), when the config directory is created in the custom
path (using --config-dir
) then it will not work.
Resolved #1425
Steps to test:
Install thin-edge from here https://github.com/thin-edge/thin-edge.io/actions/runs/3035966989
Test 1:
sudo tedge --init
sudo -u tedge -- tedge_mapper --init c8y
Check if there is a /etc/tedge/device
directory
Test 2:
sudo tedge --init --config-dir /tmp/test
sudo -u tedge -- tedge_mapper --config-dir /tmp/test --init c8y
Check if there is a /tmp/test/device
directory
@PradeepKiruvale Both tests are failing or wrongly explained
Tested. The Directory existance check will be integrated in some of the automated tests
@mbay-ODW Now on the installation of the mapper, the directory {CONFIG_DIR}/device
(CONFIG_DIR
by default is /etc/tedge
) will be created by tedge_mapper --init c8y
. Can we close the issue?
Yes @rina23q, will close. Thanks!