Allow jobs not requiring any network resources (#14300)

Jobs not requiring any network resources should be allowed
even when the network fingerprinter is disabled.
This commit is contained in:
Will Jordan 2022-10-06 13:25:41 -07:00 committed by GitHub
parent b974c32ba6
commit 8ae13208c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

3
.changelog/14300.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
scheduler: Allow jobs not requiring network resources even when no network is fingerprinted
```

View File

@ -382,6 +382,11 @@ func (c *NetworkChecker) SetNetwork(network *structs.NetworkResource) {
} }
func (c *NetworkChecker) Feasible(option *structs.Node) bool { func (c *NetworkChecker) Feasible(option *structs.Node) bool {
// Allow jobs not requiring any network resources
if c.networkMode == "none" {
return true
}
if !c.hasNetwork(option) { if !c.hasNetwork(option) {
// special case - if the client is running a version older than 0.12 but // special case - if the client is running a version older than 0.12 but