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] Device Not found in Cache Issue #396
Conversation
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 the contribution!
Pleaset take a look at my comment.
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.
Host
of Service in configuration.toml is empty with this PR.
Please refer to the log below.
$ docker exec -ti edge-orchestration /bin/bash
root@t25kim:/edge-orchestration# cat res/configuration.toml
[Clients]
[Clients.Data]
Host = "10.113.70.227"
Port = 48080
Protocol = "http"
Timeout = 5000
[Clients.Metadata]
Host = "10.113.70.227"
Port = 48081
Protocol = "http"
Timeout = 5000
[Device]
DataTransform = true
InitCmd = ""
InitCmdArgs = ""
MaxCmdOps = 128
MaxCmdValueLen = 256
ProfilesDir = "./res"
RemoveCmd = ""
RemoveCmdArgs = ""
[[DeviceList]]
Description = "RESTful Device"
Labels = ["rest","json"]
Name = "edge-orchestration-c1b23cc6-0767-400a-9cf0-36e1b3902da2"
Profile = "edge-orchestration-c1b23cc6-0767-400a-9cf0-36e1b3902da2"
[DeviceList.Protocols]
[DeviceList.Protocols.other]
[Registry]
CheckInterval = "10s"
FailLimit = 3
FailWaitTime = 10
Host = "10.113.70.227"
Port = 8500
Type = "consul"
[Service]
AsyncBufferSize = 16
ConnectionRetries = 20
EnableAsyncReadings = true
Host = ""
Labels = []
OpenMsg = "REST device started"
Port = 49986
Timeout = 5000
[Writable]
LogLevel = "DEBUG"
Signed-off-by: Nitu Sajjanlal Gupta <nitu.gupta@samsung.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
LGTM Thanks for the contribution!
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.
Seems good to me. Appreciate for your contribution to resolve the issue. 💯
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.
LGTM
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.
okay
@@ -22,19 +22,19 @@ FailWaitTime = 10 | |||
[Clients] | |||
[Clients.Data] | |||
Protocol = "http" | |||
Host = "localhost" | |||
Host = '172.17.0.1' | |||
Port = 48080 | |||
Timeout = 5000 | |||
|
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.
Pls add code comments briefing the rationale behind using values 16 , 20 , 10s etc ..for future maintainability
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.
LGTM, thanks for the quick fix before the release
Signed-off-by: Nitu Sajjanlal 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.
Solution: The configuration toml file is generated automatically, so the ip of edge-orchestration resolves the issue and callbacks are recieved.
Fixes #312
Type of change
How Has This Been Tested?
curl -X POST "{ip of edge-orchestration}:49986/api/v1/resource/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 123
For example:
curl -X POST "107.108.70.126:49986/api/v1/resource/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 123
The value gets uploaded successfully. which is verified with GET command
Test Configuration:
Checklist: