67ffcb35e9
Add a scatter-gather for multiregion job plans. Each region's servers interpolate the plan locally in `Job.Plan` but don't distribute the plan as done in `Job.Run`. Note that it's not possible to return a usable modify index from a multiregion plan for use with `-check-index`. Even if we were to force the modify index to be the same at the start of `Job.Run` the index immediately drifts during each region's deployments, depending on events local to each region. So we omit this section of a multiregion plan.
21 lines
631 B
Go
21 lines
631 B
Go
// +build !ent
|
|
|
|
package nomad
|
|
|
|
import "github.com/hashicorp/nomad/nomad/structs"
|
|
|
|
// enforceSubmitJob is used to check any Sentinel policies for the submit-job scope
|
|
func (j *Job) enforceSubmitJob(override bool, job *structs.Job) (error, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// multiregionRegister is used to send a job across multiple regions
|
|
func (j *Job) multiregionRegister(args *structs.JobRegisterRequest, reply *structs.JobRegisterResponse) error {
|
|
return nil
|
|
}
|
|
|
|
// interpolateMultiregionFields interpolates a job for a specific region
|
|
func (j *Job) interpolateMultiregionFields(args *structs.JobPlanRequest) error {
|
|
return nil
|
|
}
|