-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add periodic cgroup fingerprinter #712
Conversation
Make the exec driver fingerprinter periodic to disable the driver when cgroups become unavailable.
0019b8f
to
5266f6d
Compare
@@ -41,6 +43,7 @@ var builtinFingerprintMap = map[string]Factory{ | |||
} | |||
|
|||
// NewFingerprint is used to instantiate and return a new fingerprint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental new line?
LGTM. Minor comments! |
@@ -60,6 +58,10 @@ func (d *ExecDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, | |||
return true, nil | |||
} | |||
|
|||
func (d *ExecDriver) Periodic() (bool, time.Duration) { | |||
return true, 15 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract 15 in a constant.
Awesome! Thanks Ivo! |
Add periodic cgroup fingerprinter
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Periodically check for the availability of cgroups. Disable the exec driver if cgroups are not available.