Merge pull request #519 from hdhoang/pak-counter

Fix labels cardinality error when registering unknown pre-auth key
This commit is contained in:
Juan Font 2022-03-25 00:25:19 +01:00 committed by GitHub
commit b5aace6d3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,10 @@
## 0.16.0 (2022-xx-xx) ## 0.16.0 (2022-xx-xx)
### Changes
- Fix labels cardinality error when registering unknown pre-auth key [#519](https://github.com/juanfont/headscale/pull/519)
## 0.15.0 (2022-03-20) ## 0.15.0 (2022-03-20)
**Note:** Take a backup of your database before upgrading. **Note:** Take a backup of your database before upgrading.

2
api.go
View File

@ -573,7 +573,7 @@ func (h *Headscale) handleAuthKey(
machineRegistrations.WithLabelValues("new", RegisterMethodAuthKey, "error", pak.Namespace.Name). machineRegistrations.WithLabelValues("new", RegisterMethodAuthKey, "error", pak.Namespace.Name).
Inc() Inc()
} else { } else {
machineRegistrations.WithLabelValues("new", RegisterMethodAuthKey, "error").Inc() machineRegistrations.WithLabelValues("new", RegisterMethodAuthKey, "error", "unknown").Inc()
} }
return return