RWTH-EBC/FiLiP

Cannot create entities or devices for IoT-Agent JSON v1.19.0 with FiLiP v0.2.5

Closed this issue · 2 comments

Describe the bug
In our current cluster setup, which is running the following versions

  • iotagent-json:1.19.0
  • mongodb:6.0.9-debian-11-r5
  • orion:3.7.0

we are able to create service group, entities and devices using API requests via Postman, however, we are unable to create any of these using the FiLiP library. The only thing possible is reading the version.

Going through the logs, we identified the following two errors in this process:
time=2023-10-19T14:51:04.356Z | lvl=DEBUG | corr=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | trans=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | op=IoTAgentNGSI.RestUtils | srv=PerformanceTestsDebuggingTest | subsrv=/PerformanceTestsDebuggingTest | msg=Errors found validating request: {"valid":false,"errors":[{"attribute":"additionalProperties","property":"devices.0.attributes.1.metadata","actual":{},"message":"must not exist"},{"attribute":"additionalProperties","property":"devices.0.attributes.0.metadata","actual":{},"message":"must not exist"}]} | comp=IoTAgent
time=2023-10-19T14:51:04.356Z | lvl=DEBUG | corr=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | trans=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | op=IoTAgentNGSI.GenericMiddlewares | srv=PerformanceTestsDebuggingTest | subsrv=/PerformanceTestsDebuggingTest | msg=Error [WRONG_SYNTAX] handling request: Wrong syntax in request: Errors found validating request. | comp=IoTAgent

To Reproduce
You can find a script for the device creation including the current configuration for our cluster in our internal git repository https://git-ce.rwth-aachen.de/ebc/projects/EBC0391_BMWi_PL-Reg_GES/communication/datamodelsforsemanticnetworking/-/tree/BoosterDatamodelsStresstests/datamodels/BES?ref_type=heads. The main.py will try to create service group, entities, devices, subscriptions and grafana dashboards to cover a full check of the FIWARE setup. For checking if the process was successful, you can either request the created objects or check within the cluster components directly. However, for the latter, you will require the credentials.

Expected behavior
We expect the entity and device creation etc. via FiLiP to behave the same as via API request from Postman. So, after the creation, they should appear as stored objects in the mongodb.

Environment (please complete the following information):

  • OS [Windows 10 Education]
  • pydantic: [1.8.2]
  • filip [0.2.5]

@msc-d1s7fa1eza can you search for 9b6f9b8d-a609-4253-bc0d-6cf208c887fc in logs? Then, you can see which device caused the problem. Please try to provision this device via Filip. And it not works, please post your code below

@djs0109 Please excuse the delayed reply. We already discussed the background to this issue in person. For the record and history, I would like to share the insights here:

In fact, the issue was caused with the version 1.14.0 of the IoT Agent. This version seems to not be compatible with the current FiLiP version any more, which resulted in not being able to create any devices or service groups etc. As we are using Kubernetes for the FIWARE deployment, there are currently only HELM charts available for the version 1.14.0 of the IoT Agent json, for reference, see our issue here. Due to a change of the mountPath from /opt/iotajson/config.js to /opt/iotagent-json/config.js, when switching the image version to 1.19.0, the IoT Agent was not able to connect to the mongoDB correctly, consequently, again resulting in not being able to use the IoTA API. Fixing the mountPath allows for installing the latest IoTA version, which is working just fine with the current FiLiP version so far. Therefore, if you could add a hint that version 1.14.0 is no longer supported, this would probably help in finding potential incompatibilities in the setup. We also have tested the 1.19.0 version of the IoT Agent, which seemed also to be working just fine, so I would close the issue now.