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
[DataStorage] BugFix for Device not found in cache(Issue #312) #374
Conversation
Signed-off-by: Nitu Gupta <nitu.gupta@samsung.com>
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your efforts. I have a question about this approach.
Assume that we have two devices, Device A(enp4s0:192.168.0.7, docker0:172.17.0.1) and B(enp4s0:192.168.0.8, docker0:172.17.0.1).
EdgeX containers are running on Device A and Edge Orchestration on Device B tries to connect to the EdgeX containers on Device A.
If we set the Host to 172.17.0.1 in Device B's configuration.toml, can Device B receive the callback from Device A?
docker0 is for local machines. For different machine you can use the real ip address, but you need to configure your docker network properly. https://docs.docker.com/network/ |
Could you explain a bit more on what "properly" means? |
An overlay network has to be setup for docker communication between multiple host. https://docs.docker.com/network/ |
Is it right to configure an overlay network with multiple devices to our Home IoT scenario?
|
Hello, I have tested with A running the edgex containers and B running the edge orchestration. I have replaced the host as A machine IP except for device service with B machine IP in configuration toml and i observed the device was detected and was able to post data from B to coredata. So considering the scenario it should work fine with 3 machines also. |
This is very good news! |
I would prefer modifying the document since the issue is of setup. How about providing info about both setups like localhost and different machine in datatstorage setup.md file so that user can configure on their own. Please provide your suggestion :) |
I think you need to add a description as a separate item/paragraph in the datastorage.md |
I can't decide which one is right since the setup is very vague to me. As you can see from |
ok will raise a separate PR for the same! |
Signed-off-by: Nitu Gupta nitu.gupta@samsung.com
Description
Bug: The edge-orchestration can not find the device in the cache if edge-orchestration registers device configuration to edgex for the first time. It works after reboot.
Reason:
When running metadata, coredata in dockers, these services are unable to reach device service when device gets added. Hence callback is not invoked and so cache is not updated.
Solution: Replace the HostIP of metadata, coredata and device service to docker0 IP in confuguration.toml file
Fixes #312
Type of change
How Has This Been Tested?
curl -X POST "localhost:49986/api/v1/resource/datastorage/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 123
The value gets uploaded successfully.
Test Configuration:
Checklist: