Skip to content
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

Geographic coordinates reported by EVE #2600

Merged
merged 6 commits into from
Apr 26, 2022
Merged

Conversation

milan-zededa
Copy link
Contributor

@milan-zededa milan-zededa commented Apr 21, 2022

This PR implements functionality described here:
https://wiki.lfedge.org/display/EVE/GPS+coordinates+exposed+by+EVE

To summarize: with this PR EVE is able to obtain location information from a GNSS
receiver integrated into an LTE modem. This information is then propagated to 3 destinations:

  • to the controller as ZInfoMsg with newly added ZInfoLocation into InfoContent
  • to the Local profile server
  • to any locally deployed application via meta-data service

By default location reporting is disabled and has to be explicitly enabled under the cellular configuration.

Test (partially covering the functionality): lf-edge/eden#757

docs/ECO-METADATA.md Outdated Show resolved Hide resolved
docs/ECO-METADATA.md Outdated Show resolved Hide resolved
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Some nits in the detailed comments.

@milan-zededa
Copy link
Contributor Author

Note that I'm not going to fix the remaining two Yetus issues - it would look weird if ZInfoTypes combined two different naming conventions for enum values.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run eden

@@ -6,6 +6,7 @@
| timer.config.interval | integer in seconds | 60 | how frequently device gets config |
| timer.metric.interval | integer in seconds | 60 | how frequently device reports metrics |
| timer.metric.diskscan.interval | integer in seconds | 300 | how frequently device should scan the disk for metrics |
| timer.location.interval | integer in seconds | 20 | how frequently device reports geographic location information (to controller and to local profile server) |
Copy link
Contributor

@gkodali-zededa gkodali-zededa Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once every 20 seconds is too high. How about a default of once every 60 minutes? And a shortest allowed interval of 5 minutes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically any interval configured that is lower than 5 minutes shall round up default to 5 minutes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkodali-zededa that might mean two timers; one for local (sent to local profile server and available from 169.254.169.254) where 20 seconds is a reasonable default, and one for reporting to the controller where we have to be concerned about load/scale.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if required it makes sense to have two different timers. Fetch at the interval that is minimum of these two.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will split into something like timer.location.cloud.interval and timer.location.app.interval.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Also can you please change the default cloud export interval to 60 minutes and then the smallest cloud export interval to 5 minutes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@eriknordmark
Copy link
Contributor

Note that I'm not going to fix the remaining two Yetus issues - it would look weird if ZInfoTypes combined two different naming conventions for enum values.

Correct.

API for device location information obtained from a GNSS receiver
integrated with an LTE modem.

Signed-off-by: Milan Lenco <milan@zededa.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
Location information is obtained from a GNSS receiver by wwan
microservice and stored under /run/wwan/location.json
This is then picked up by nim and published to other microservices
via pubsub.
Zedagent then periodically publishes location reports to the controller
and to a Local profile server.
Zedrouter also makes location info available to any application via
meta-data servers.

Signed-off-by: Milan Lenco <milan@zededa.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eriknordmark eriknordmark merged commit 75d2623 into lf-edge:master Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants