Manager & website: provide more helpful info when Worker auth fails
Provide more useful info when a Worker tries to communicate but fails the authentication check. The message about this is now more friendly and links to a new FAQ entry at https://flamenco.blender.org/faq/#what-does-unknown-worker-is-trying-to-communicate-mean
This commit is contained in:
parent
26c14bf095
commit
f464aea137
@ -14,6 +14,7 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"projects.blender.org/studio/flamenco/internal/manager/persistence"
|
||||
"projects.blender.org/studio/flamenco/pkg/website"
|
||||
)
|
||||
|
||||
type workerContextKey string
|
||||
@ -89,7 +90,7 @@ func WorkerAuth(ctx context.Context, authInfo *openapi3filter.AuthenticationInpu
|
||||
// Check the password.
|
||||
err = passwordHasher.CompareHashAndPassword([]byte(hashedSecret), []byte(p))
|
||||
if err != nil {
|
||||
logger.Warn().Str("username", u).Msg("authentication error")
|
||||
logger.Warn().Str("worker", u).Msgf("unknown worker is trying to communicate, see %s", website.WorkerCredsUnknownHelpURL)
|
||||
return authInfo.NewError(errAuthBad)
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,8 @@
|
||||
package website
|
||||
|
||||
const (
|
||||
DocVariablesURL = "https://flamenco.blender.org/usage/variables/blender/"
|
||||
BugReportURL = "https://flamenco.blender.org/get-involved"
|
||||
ShamanRequirementsURL = "https://flamenco.blender.org/usage/shared-storage/shaman/#requirements"
|
||||
DocVariablesURL = "https://flamenco.blender.org/usage/variables/blender/"
|
||||
WorkerCredsUnknownHelpURL = "https://flamenco.blender.org/faq/#what-does-unknown-worker-is-trying-to-communicate-mean"
|
||||
BugReportURL = "https://flamenco.blender.org/get-involved"
|
||||
ShamanRequirementsURL = "https://flamenco.blender.org/usage/shared-storage/shaman/#requirements"
|
||||
)
|
||||
|
@ -179,3 +179,33 @@ Disable add-ons one-by-one to see which one is causing this issue.
|
||||
It means that the program (probably Blender) exited with an error status. Take a
|
||||
look at the task log, which you can access by going to the task in Flamenco's
|
||||
web interface.
|
||||
|
||||
### What does "unknown worker is trying to communicate" mean?
|
||||
|
||||
When a Worker connects to its Manager for the first time, it registers itself.
|
||||
This makes the Manager aware that the Worker exists. The Worker can now be seen
|
||||
in the web interface for configuration of [tags][worker-tags] and its [sleep
|
||||
schedule][sleep-schedule].
|
||||
|
||||
If for some reason the Manager forgets about this Worker, the Manager will show
|
||||
this message. There are a few reasons this can happen:
|
||||
|
||||
After downloading a new version of Flamenco, you started the Manager from a different folder than before.
|
||||
: Stop the Manager (Ctrl+C) and follow the [upgrade guide][upgrade].
|
||||
|
||||
The `flamenco-manager.sqlite` file was deleted / moved.
|
||||
: Stop the Manager (Ctrl+C). Restore the file from the wastebin, or move it back. Then start the Manager again.
|
||||
|
||||
The Worker was deleted via the Flamenco Manager web interface.
|
||||
: This means the Worker info (its tags, sleep schedule, etc.) has been deleted. Stop the Worker (Ctrl+C) and restart it again. It will automatically re-register as a new Worker.
|
||||
|
||||
|
||||
[upgrade]: {{< ref "usage/upgrading" >}}
|
||||
[worker-tags]: {{< ref "usage/worker-configuration/tags" >}}
|
||||
[sleep-schedule]: {{< ref "usage/worker-configuration/sleep-schedule" >}}
|
||||
|
||||
### What does "Security requirements failed" mean?
|
||||
|
||||
This is shown on the Manager after an "unknown worker is trying to communicate"
|
||||
message. It is also shown on the Worker for the same reason. See
|
||||
[What does "unknown worker is trying to communicate" mean?](#what-does-unknown-worker-is-trying-to-communicate-mean)
|
||||
|
5
web/project-website/content/usage/upgrading/_index.md
Normal file
5
web/project-website/content/usage/upgrading/_index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Upgrading Flamenco
|
||||
---
|
||||
|
||||
TODO: write this.
|
Loading…
x
Reference in New Issue
Block a user