Skip to content

Fix invalid cross-device link when moving geolocation databases #1638

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

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

bcmmbaga
Copy link
Contributor

Describe your changes

Resolve the issue of a cross-device link error when transferring geolocation databases to the management datadir, which is mounted on Docker.

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@bcmmbaga bcmmbaga force-pushed the fix-geo-database-loading branch from b2daf00 to 38e02f7 Compare February 28, 2024 12:51
@bcmmbaga bcmmbaga changed the title Fix invalid cross-device link when moving geonames db Fix invalid cross-device link when moving geolocation databases Feb 28, 2024
@ph1ll
Copy link
Contributor

ph1ll commented Feb 28, 2024

I've just run into this myself in a setup using different Kubernetes volumes for /tmp and /var/lib/netbird. The error encountered is:

2024-02-28T12:40:42Z WARN management/cmd/management.go:169: could not initialize geo location service: failed to load MaxMind databases: rename /tmp/geolite3153836044/GeoLite2-City.mmdb /var/lib/netbird/GeoLite2-City.mmdb: invalid cross-device link, we proceed without geo support

This step checks the existence and proper functioning of geolocation databases, including GeoLite2-City.mmdb and Geonames.db. It will help us ensure that geolocation databases are loaded correctly in the management.
@bcmmbaga bcmmbaga requested a review from mlsmaycon February 28, 2024 13:31
@bcmmbaga bcmmbaga merged commit f64e73c into main Feb 28, 2024
@bcmmbaga bcmmbaga deleted the fix-geo-database-loading branch February 28, 2024 13:42
@mlsmaycon
Copy link
Collaborator

Hello @ph1ll the version 0.26.2 includes the fix.

Foosec pushed a commit to Foosec/netbird that referenced this pull request May 8, 2024
…irdio#1638)

* Fix invalid cross-device link when move geonames db

* Add test for geolocation databases in workflow

This step checks the existence and proper functioning of geolocation databases, including GeoLite2-City.mmdb and Geonames.db. It will help us ensure that geolocation databases are loaded correctly in the management.

* Enable debug mode

* Increase sleep duration in geolocation tests
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