-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issues with iot agent json (1.14.0) during registration #208
Comments
As far as I understand IOTAManager is responsing with 500 to IOTA under this circustance. What do you think expected behavior should be? Responding with 400 with a more specific cause? |
shouldn't be the configuration overwritten? who is the latest source of "correct" configuration? |
That's an option, for sure. But maybe it's safer delete + create instead of overwrite. |
sure, but when the iot agent starts and send the command, is doing it automatically, so either the logic in the iot-agentlib is changed (delete and recreate), or the logic on iot agent manager overwrite existing services |
Looking again to the trace, which operation is the one which is failing? |
yes, correct
and the part generating issue should be the |
Looking to the index that is causing the duplicated key error at MongoDB:
it seems it doesn't have to do with services alone, but with the combination of apikey (which comes from sercice) + resource + protocol. I think is a good idea not allowing two IOTAs register the same apikey+resource+protocol combination. And, in the case of IOTAManager getting a registration attempt on an existing apikey+resource+protocol is probably due to some misconfiguration of the IOTA (which, at least should use a different apikey). In that case, it seems better to report an error (in the form of 400 response) than overriding, so the admin can be aware of the situation and fix the conflicting IOTA configuration. |
concrete use case:
this means that configuration recovery will never work toward iot agent manager, unless you first delete everything. |
when iot agent tries to register services (already existing):
IoT agent managers reports:
The text was updated successfully, but these errors were encountered: