Commit Graph

1511 Commits

Author SHA1 Message Date
bcmmbaga
cf211f6337
Refactor 2024-07-30 17:15:47 +03:00
bcmmbaga
8d9ea40bf1
Add tests for peer update behavior on dns settings changes 2024-07-30 16:38:32 +03:00
bcmmbaga
7647701898
Add tests for peer update behavior on group changes 2024-07-30 16:01:11 +03:00
bcmmbaga
6554b26600
Add tests for peer update behavior on policy changes 2024-07-30 14:56:23 +03:00
bcmmbaga
8455455142
Add tests for peer update behavior on posture check changes 2024-07-29 21:46:50 +03:00
bcmmbaga
c48f244bee
Remove unused isPolicyRuleGroupsEmpty 2024-07-26 17:47:02 +03:00
bcmmbaga
b7fcd0d753
Remove UpdatePeerSSHKey method 2024-07-23 21:16:25 +03:00
bcmmbaga
a19c2f660c
Merge branch 'refs/heads/feature/optimize-network-map-updates' into feature/validate-group-association 2024-07-22 15:24:30 +03:00
bcmmbaga
936215b395
Optimize account peers updates on route changes 2024-07-22 13:51:18 +03:00
bcmmbaga
bb08adcbac
Remove condition check for network serial update 2024-07-20 20:36:36 +03:00
bcmmbaga
f5ec234f09
Optimize peer update on user deletion and changes 2024-07-20 20:08:29 +03:00
bcmmbaga
26f089e30d
Refactor peer account updates for efficiency 2024-07-20 12:37:25 +03:00
bcmmbaga
713c0341be
Optimize update of account peers on jwt groups sync 2024-07-19 14:09:33 +03:00
bcmmbaga
1bbd8ae4b0
Optimize account peers update in DNS settings 2024-07-19 10:51:20 +03:00
bcmmbaga
a723c424f0
Refactor group changes 2024-07-19 10:51:05 +03:00
bcmmbaga
3e76deaa87
Update account peers if ns group has peers 2024-07-18 21:04:58 +03:00
bcmmbaga
36d4c21671
Optimize group change effects on account peers 2024-07-18 20:37:29 +03:00
bcmmbaga
181e8648a8
Refactor group management 2024-07-18 19:59:37 +03:00
bcmmbaga
1012c2f990
Add HasPeers function to group 2024-07-18 19:59:14 +03:00
bcmmbaga
1b28d1dfbc
Refactor group link checking into re-usable functions 2024-07-18 16:41:21 +03:00
Bethuel Mmbaga
f17016b5e5
Skip peer update on unchanged network map (#2236)
* Enhance network updates by skipping unchanged messages

Optimizes the network update process
by skipping updates where no changes in the peer update message received.

* Add unit tests

* add locks

* Improve concurrency and update peer message handling

* Refactor account manager network update tests

* fix test

* Fix inverted network map update condition

* Add default group and policy to test data

* Run peer updates in a separate goroutine

* Refactor

* Refactor lock
2024-07-18 13:50:44 +03:00
ctrl-zzz
a711e116a3
fix: save peer status correctly in sqlstore (#2262)
* fix: save peer status correctly in sqlstore

https://github.com/netbirdio/netbird/issues/2110#issuecomment-2162768273

* feat: update test function

* refactor: simplify status update
2024-07-16 18:38:12 +03:00
bcmmbaga
b6cef2ce2c
Remove account peers update on saving setup key 2024-07-16 18:30:47 +03:00
bcmmbaga
dedf13d8f1
Update account peer if posture check is linked to policy 2024-07-16 18:19:05 +03:00
Maycon Santos
668d229b67
Fix metric label typo (#2278) 2024-07-16 16:55:57 +02:00
bcmmbaga
d676c41c74
Remove incrementing network serial and updating peers after group deletion 2024-07-16 16:50:44 +03:00
Maycon Santos
7c595e8493
Add get_registration_delay_milliseconds metric (#2275) 2024-07-16 15:36:51 +02:00
Jakub Kołodziejczak
f9c59a7131
Refactor log util (#2276) 2024-07-16 11:50:35 +02:00
Jakub Kołodziejczak
1d6f5482dd
feat(client): send logs to syslog (#2259) 2024-07-16 10:19:58 +02:00
Carlos Hernandez
12ff93ba72
Ignore no unique route updates (#2266) 2024-07-16 10:19:01 +02:00
Maycon Santos
88d1c5a0fd
fix forwarded metrics (#2273) 2024-07-16 10:14:30 +02:00
Bethuel Mmbaga
1537b0f5e7
Add batch save/update for groups and users (#2245)
* Add functionality to update multiple users

* Remove SaveUsers from DefaultAccountManager

* Add SaveGroups method to AccountManager interface

* Refactoring

* Add SaveUsers and SaveGroups methods to store interface

* Refactor method SaveAccount to SaveUsers and SaveGroups

The method SaveAccount in user.go and group.go files was split into two separate methods. Now, user-specific data is handled by SaveUsers and group-specific data is handled by SaveGroups method. This provides a cleaner and more efficient way to save user and group data.

* Add account ID to user and group in SqlStore

* Refactor SaveUsers and SaveGroups in store

* Remove unnecessary ID assignment in SaveUsers and SaveGroups
2024-07-15 17:04:06 +03:00
Maycon Santos
2577100096
Limit GUI process execution to one per UID (#2267)
replaces PID with checking process name and path and UID checks
2024-07-15 14:53:52 +02:00
Zoltan Papp
bc09348f5a
Add logging option for wg device (#2271) 2024-07-15 14:45:18 +02:00
Edouard Vanbelle
d5ba2ef6ec
fix 2260: fallback serial to Board (#2263) 2024-07-15 14:43:50 +02:00
pascal-fischer
47752e1573
Support DNS routes on iOS (#2254) 2024-07-15 10:40:57 +02:00
Maycon Santos
58fbc1249c
Fix parameter limit issue for Postgres store (#2261)
Added CreateBatchSize for both SQL stores and updated tests to test large accounts with Postgres, too. Increased the account peer size to 6K.
2024-07-12 09:28:53 +02:00
dependabot[bot]
1cc341a268
Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#2248)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-12 08:52:27 +02:00
Viktor Liu
89df6e7242
Get client ui locale on windows natively (#2251) 2024-07-12 08:25:33 +02:00
Maycon Santos
f74646a3ac
Add release version to windows binaries and update sign pipeline version (#2256) 2024-07-11 19:06:55 +02:00
pascal-fischer
e8c2fafccd
Avoid empty domain overwrite (#2252) 2024-07-10 14:08:35 +02:00
Maycon Santos
85e991ff78
Fix issue with canceled context before pushing metrics and decreasing pushing interval (#2235)
Fix a bug where the post context was canceled before sending metrics to the server.

The interval time was decreased, and an optional environment variable NETBIRD_METRICS_INTERVAL_IN_SECONDS was added to control the interval time.

* update doc URL
2024-07-04 19:15:59 +02:00
Maycon Santos
f9845e53a0
Sort routes by ID and remove DNS routes from overlapping list (#2234) 2024-07-04 16:50:07 +02:00
pascal-fischer
765aba2c1c
Add context to throughout the project and update logging (#2209)
propagate context from all the API calls and log request ID, account ID and peer ID

---------

Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com>
2024-07-03 11:33:02 +02:00
Zoltan Papp
7cb81f1d70
Fix nil pointer exception in case of error (#2230) 2024-07-02 18:18:14 +02:00
Viktor Liu
cea19de667
Debounce network monitor restarts (#2225) 2024-07-02 17:09:00 +02:00
Bethuel Mmbaga
29e5eceb6b
Fix linux serial number retrieval (#2206)
* Change source of serial number in sysInfo function

The serial number returned by the sysInfo function in info_linux.go has been fixed. Previously, it was incorrectly fetched from the Chassis object. Now it is correctly fetched from the Product object. This aligns better with the expected system info retrieval method.

* Fallback to product.Serial in sys info

In case of the chassis is "Default String" or empty then try to use product.serial

---------

Co-authored-by: Zoltán Papp <zoltan.pmail@gmail.com>
2024-07-02 13:19:08 +02:00
dependabot[bot]
0f63737330
Bump golang.org/x/image from 0.10.0 to 0.18.0 (#2205)
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.10.0 to 0.18.0.
- [Commits](https://github.com/golang/image/compare/v0.10.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 13:12:28 +02:00
Viktor Liu
bf518c5fba
Remove interface network monitor checks (#2223) 2024-07-02 12:41:15 +02:00
Maycon Santos
eab6183a8e
Add stack trace when saving empty domains (#2228)
added temporary domain check for existing accounts to trace where the issue originated

Refactor save account due to complexity score
2024-07-02 12:40:26 +02:00