Closed rina23q closed 1 year ago
Once validated the fix for that issue, one has to close this PR https://github.com/thin-edge/thin-edge.io/pull/1927 documenting a workaround.
Before I validate the bug the one who raised it, in this case @rina23q should first confirm that the bug is fixed (and correct the text in "how to reproduce")
@rina23q After talking with @gligorisaev I made a few improvements to the formatting and description of some of the steps in the initial ticket description.
Bug still exists
Let me try again to reproduce.
It works for me.
We'll debug the issue further to see what is going on here, it might just be a configuration or integration issue.
@gligorisaev It can be retested. The version is already available from cloudsmith.io, 0.10.0-264-gb245979f
Tested and not reproducable,
Describe the bug If you update a supported operation file in runtime of
tedge-mapper-c8y
, the mapper doesn't use the new content. The mapper needs to be restarted. For example,command
field of an operation file to new path (from/path/a
to/path/b
).tedge-mapper-c8y
still looks up at/path/a
.tedge-mapper-c8y
, it starts looking at/path/b
finally.To Reproduce Prerequisites:
/etc/tedge/operations/c8y/c8y_Command
doesn't exist yet.Steps:
/etc/tedge/operations/command0.sh
then make it executable./etc/tedge/operations/c8y/c8y_Command
./etc/tedge/operations/c8y/c8y_Command
./etc/tedge/operations/c8y/c8y_Command
. Should have been marked "successful" without this bug)Workaround
The current workaround to get the mapper to re-read the custom operation mapping files, you will need to restart the
tedge-mapper-c8y
service, see below for an example:The pending operation should start processing the
tedge-mapper-c8y
service restarts. However if there are multiple operations of the same type (e.g. shell operations), then the status/result of the operation might be out of order (due to the id-less handling of operations in Cumulocity).Expected behavior The
tedge-mapper-c8y
should catch the contents update of supported operation files immediately. Restart should not be required.Screenshots
Environment (please complete the following information):
Additional context