Commit Graph

6095 Commits

Author SHA1 Message Date
Grant Limberg
9a8b74d744
Fix oidc client lookup query
join condition referenced the wrong table.  Worked fine unless there were multiple identical client IDs
2023-05-31 09:34:31 -07:00
Grant Limberg
f42841a6ab
fix init order for EmbeddedNetworkController (#2014) 2023-05-25 11:09:08 -07:00
Joseph Henry
524363dcf7
Improve validation test (#2013) 2023-05-25 10:54:26 -07:00
Grant Limberg
17f6b3a10b
central controller metrics & request path updates (#2012)
* internal db metrics

* use shared mutexes for read/write locks

* remove this lock. only used for a metric

* more metrics

* remove exploratory metrics

place controller request benchmarks behind ifdef
2023-05-23 12:11:26 -07:00
Brenton Bostick
da71e2524c
fix typos (#2010) 2023-05-19 19:21:24 +02:00
Brenton Bostick
f3da2b4031
Capture setContent by-value instead of by-reference (#2006)
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-05-17 17:55:32 -07:00
travis laduke
e2dad367b4 Don't re-apply routes on BSD
See issue #1986
2023-05-17 14:41:59 -07:00
travis laduke
9b7ff43118 Enable RTTI in Windows build
The new prometheus histogram stuff needs it.

Access violation - no RTTI data!INVALID packet 636ebd9ee8cac6c0 from cafe9efeb9(2605:9880:200:1200:30:571:e34:51/9993) (unexpected exception in tryDecode())
2023-05-17 13:36:15 -07:00
Grant Limberg
adfbbc3fb0
Controller Metrics & Network Config Request Fix (#2003)
* add new metrics for network config request queue size and sso expirations
* move sso expiration to its own thread in the controller
* fix potential undefined behavior when modifying a set
2023-05-16 11:56:58 -07:00
Grant Limberg
f621261ff9
Update readme files for metrics (#2000) 2023-05-05 12:44:41 -07:00
Grant Limberg
00d55fc4b4
Metrics consolidation (#1997)
* Rename zt_packet_incoming -> zt_packet

Also consolidate zt_peer_packets into a single metric with tx and rx labels.  Same for ztc_tcp_data and ztc_udp_data

* Further collapse tcp & udp into metric labels for zt_data

* Fix zt_data metric description

* zt_peer_packets description fix

* Consolidate incoming/outgoing network packets to a single metric

* zt_incoming_packet_error -> zt_packet_error

* Disable peer metrics for central controllers

Can change in the future if needed, but given the traffic our controllers serve, that's going to be a *lot* of data

* Disable peer metrics for controllers pt 2
2023-05-04 11:12:55 -07:00
Grant Limberg
74dc41c7c7
Peer metrics (#1995)
* Adding peer metrics

still need to be wired up for use

* per peer packet metrics

* Fix crash from bad instantiation of histogram

* separate alive & dead path counts

* Add peer metric update block

* add peer latency values in doPingAndKeepalive

* prevent deadlock

* peer latency histogram actually works now

* cleanup

* capture counts of packets to specific peers

---------

Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>
2023-05-04 07:58:02 -07:00
Grant Limberg
925599cab0
Network-metrics (#1994)
* Add a couple quick functions for converting a uint64_t network ID/node ID into std::string

* Network metrics
2023-05-03 13:43:45 -07:00
Brenton Bostick
a43048a1ad
fix type signatures (#1991) 2023-05-03 11:18:04 -07:00
Joseph Henry
d6c5a6cd59
More aggressive CLI spamming (#1993) 2023-05-03 10:49:27 -07:00
Grant Limberg
54f339f0c0
fix a couple of metrics (#1989) 2023-05-03 10:23:06 -07:00
Brenton Bostick
115b9147b9
fix memory leak (#1992) 2023-05-03 10:14:18 -07:00
Grant Limberg
6b5c9b1b8e
separate the bind & listen calls on the http backplane (#1988) 2023-05-02 16:46:06 -07:00
Grant Limberg
06b487119d
More packet metrics (#1982)
* found path negotation sends that weren't accounted for

* Fix histogram so it will actually compile

* Found more places for packet metrics
2023-05-02 11:16:55 -07:00
Grant Limberg
4ca3f27293
Don't force rebuild on Windows build GH Action (#1985)
Switching `/t:ZeroTierOne:Rebuild` to just `/t:ZeroTierOne` allows the Windows build to use the rust cache.  `/t:ZeroTierOne:Rebuild` cleared the cache before building.
2023-05-02 08:53:29 -07:00
Grant Limberg
785a121825
Fix rust dependency caching (#1983)
* fun with rust caching

* kick

* comment out invalid yaml keys for now

* Caching should now work

* re-add/rename key directives

* bump

* bump

* bump
2023-05-01 16:30:22 -07:00
Brenton Bostick
f73e51e94c
Brenton/curly braces (#1971)
* fix formatting

* properly adjust various lines
breakup multiple statements onto multiple lines

* insert {} around if, for, etc.
2023-05-01 11:48:16 -07:00
Joseph Henry
e6802690b8
Add short-term validation test workflow (#1974)
Add short-term validation test workflow
2023-05-01 09:07:03 -07:00
Grant Limberg
595e033776
Outgoing Packet Metrics (#1980)
add tx/rx labels to packet counters and add metrics for outgoing packets
2023-04-28 14:24:19 -07:00
Grant Limberg
e5fc89821f
use cpp-httplib for HTTP control plane (#1979)
refactored the old control plane code to use [cpp-httplib](https://github.com/yhirose/cpp-httplib) instead of a hand rolled HTTP server.  Makes the control plane code much more legible.  Also no longer randomly stops responding.
2023-04-28 11:03:28 -07:00
Grant Limberg
411e54023a
adding incoming zt packet type metrics (#1976) 2023-04-26 08:49:54 -07:00
Sean OMeara
8f05c85838
x86_64-unknown-linux-gnu on ubuntu runner (#1975) 2023-04-26 13:13:09 +02:00
Grant Limberg
e4cb74896b
Central startup update (#1973)
* allow specifying authtoken in central startup

* set allowManagedFrom

* move redis_mem_notification to the correct place

* add node checkins metric

* wire up min/max connection pool size metrics
2023-04-25 12:44:18 -07:00
Grant Limberg
8e6e4ede6d
Add prometheus metrics for Central controllers (#1969)
* add header-only prometheus lib to ext

* rename folder

* Undo rename directory

* prometheus simpleapi included on mac & linux

* wip

* wire up some controller stats

* Get windows building with prometheus

* bsd build flags for prometheus

* Fix multiple network join from environment entrypoint.sh.release (#1961)

* _bond_m guards _bond, not _paths_m (#1965)

* Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964)

* Serve prom metrics from /metrics endpoint

* Add prom metrics for Central controller specific things

* reorganize metric initialization

* testing out a labled gauge on Networks

* increment error counter on throw

* Consolidate metrics definitions

Put all metric definitions into node/Metrics.hpp.  Accessed as needed
from there.

* Revert "testing out a labled gauge on Networks"

This reverts commit 499ed6d95e.

* still blows up but adding to the record for completeness right now

* Fix runtime issues with metrics

* Add metrics files to visual studio project

* Missed an "extern"

* add copyright headers to new files

* Add metrics for sent/received bytes (total)

* put /metrics endpoint behind auth

* sendto returns int on Win32

---------

Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
2023-04-21 12:12:43 -07:00
Grant Limberg
0b03ad9a21
Add note that binutils is required on FreeBSD (#1968) 2023-04-19 15:37:49 -07:00
dependabot[bot]
0e6a314d86
Bump h2 from 0.3.16 to 0.3.17 in /zeroidc (#1963)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.16...v0.3.17)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-04-19 15:37:17 -07:00
Brenton Bostick
1b59712c48
Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964) 2023-04-18 12:14:05 -07:00
Brenton Bostick
7c8d5b0afd
_bond_m guards _bond, not _paths_m (#1965) 2023-04-18 12:12:33 -07:00
Leonardo Amaral
7f63d896f9
Fix multiple network join from environment entrypoint.sh.release (#1961) 2023-04-12 16:47:26 +02:00
Sean OMeara
2115b18ae3
new drone bits 2023-03-31 16:29:18 +02:00
dependabot[bot]
4ac3e7b864
Bump openssl from 0.10.45 to 0.10.48 in /zeroidc (#1938)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.45 to 0.10.48.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.45...openssl-v0.10.48)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 18:52:29 -04:00
Grant Limberg
03bd96d1d1
move begin/commit into try/catch block (#1932)
Thread was exiting in some cases
2023-03-24 13:03:15 -07:00
Travis LaDuke
4a85cf5e74
Change if_def again so ios can build (#1937)
All apple's variables are "defined"
but sometimes they are defined as "0"
2023-03-24 13:02:52 -07:00
Joseph Henry
a8fde9e530
Minor tweak to Synology Docker image script (#1936) 2023-03-24 11:58:34 -07:00
Travis LaDuke
1f9a15dd18
Release notes for 1.10.6 (#1931) 2023-03-23 12:13:53 -07:00
Adam Ierymenko
646147c275
1.10.6 (#1929)
* 1.10.5 bump

* 1.10.6

* 1.10.6 AIP for Windows.
2023-03-23 13:38:22 -04:00
Travis LaDuke
314099a267
fix binding temporary ipv6 addresses on macos (#1910)
The check code wasn't running.

I don't know why !defined(TARGET_OS_IOS) would exclude code on
desktop macOS. I did a quick search and changed it to defined(TARGET_OS_MAC).
Not 100% sure what the most correct solution there is.

You can verify the old and new versions with

`ifconfig | grep temporary`

plus

`zerotier-cli info -j` -> listeningOn
2023-03-21 15:25:01 -04:00
Joseph Henry
ce9330e9bb
Prevent path-learning loops (#1914)
* Prevent path-learning loops

* Only allow new overwrite if not bonded
2023-03-21 13:18:21 -04:00
Adam Ierymenko
b2a981f353
1.10.5 (#1905)
* 1.10.5 bump

* 1.10.5 for Windows

* 1.10.5
2023-03-10 11:45:15 -05:00
Travis LaDuke
a372619fee
Fix addIp being called with applied ips (#1897)
This was getting called outside of the check for existing ips
Because of the added ifdef and a brace getting moved to the
wrong place.

```
if (! n.tap()->addIp(*ip)) {
	fprintf(stderr, "ERROR: unable to add ip address %s" ZT_EOL_S, ip->toString(ipbuf));
}
WinFWHelper::newICMPRule(*ip, n.config().nwid);

```
2023-03-10 10:57:54 -05:00
Brenton Bostick
12cdf39165 actual fix for ANDROID-56: crash inside newNetworkConfig
cast all arguments to varargs functions as good style
2023-03-09 06:51:29 -05:00
Brenton Bostick
19c5343a0a Revert "temp fix for ANDROID-56: crash inside newNetworkConfig from too many args"
This reverts commit dd627cd7f4.
2023-03-09 06:51:29 -05:00
Adam Ierymenko
4a4c8f84d5 Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2023-03-07 17:50:01 -05:00
Adam Ierymenko
f94208f493 Windows 1.10.4 Advanced Installer bump 2023-03-07 17:49:35 -05:00
Adam Ierymenko
f2cb9b36b2 Merge branch 'dev' 2023-03-07 16:51:02 -05:00