Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions api/scheduling/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
// These are distinct from per-step YAML options (FilterWeigherPipelineStepOpts),
// which are static and set when the pipeline is initialized.
type Options struct {
// ReadOnly means the pipeline run does not modify shared scheduling state (reservations,
// history, ...). Cortex may run read-only runs concurrently.
// ReadOnly means the pipeline run does not modify shared scheduling state (reservations, ...).
// Cortex may run read-only runs concurrently.
ReadOnly bool `json:"read_only,omitempty"`

// AssumeEmptyHosts ignores running instances on hosts, considering them as empty.
Expand All @@ -27,8 +27,6 @@ type Options struct {
// MaxCandidates limits the number of candidates (hosts) returned after weighing. 0 means no limit.
MaxCandidates int `json:"max_candidates,omitempty"`

// SkipHistory skips recording the placement decision in placement history.
SkipHistory bool `json:"skip_history,omitempty"`
// SkipInflight skips creating pessimistic blocking reservations for returned candidates.
SkipInflight bool `json:"skip_inflight,omitempty"`
// SkipCommittedResourceTracking skips writing the placed VM UUID into the matching
Expand All @@ -39,9 +37,6 @@ type Options struct {

// Validate checks for mutually exclusive or inconsistent option combinations.
func (o Options) Validate() error {
if o.ReadOnly && !o.SkipHistory {
return errors.New("read-only runs must not write scheduling history: set SkipHistory=true")
}
if o.ReadOnly && !o.SkipInflight {
return errors.New("read-only runs cannot create inflight reservations")
}
Expand Down
7 changes: 3 additions & 4 deletions api/scheduling/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ func TestOptions_Validate(t *testing.T) {
wantErr bool
}{
{"zero value is valid", Options{}, false},
{"read-only run, skipping all writes", Options{ReadOnly: true, SkipHistory: true, SkipInflight: true, SkipCommittedResourceTracking: true}, false},
{"ReadOnly without SkipHistory is invalid", Options{ReadOnly: true}, true},
{"ReadOnly without SkipInflight is invalid", Options{ReadOnly: true, SkipHistory: true}, true},
{"ReadOnly without SkipCommittedResourceTracking is invalid", Options{ReadOnly: true, SkipHistory: true, SkipInflight: true}, true},
{"read-only run, skipping all writes", Options{ReadOnly: true, SkipInflight: true, SkipCommittedResourceTracking: true}, false},
{"ReadOnly without SkipInflight is invalid", Options{ReadOnly: true}, true},
{"ReadOnly without SkipCommittedResourceTracking is invalid", Options{ReadOnly: true, SkipInflight: true}, true},
}

for _, tt := range tests {
Expand Down
3 changes: 2 additions & 1 deletion api/v1alpha1/decision_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ type DecisionStatus struct {

// Currently the Decision CRD is an in-memory scheduling object used by the external scheduler API
// and filter-weigher pipelines to compute a placement result. It is currently NOT persisted
// to etcd — the scheduling outcome is recorded in the History CRD instead.
// to etcd — the scheduling outcome (including a human-readable explanation) is written onto the
// scheduled resource instead, e.g. the nova VM's spec.cortex fields.
// The long-term shape of this CRD is still under discussion; until that is
// settled the Decision serves only as a transient carrier within a single
// scheduling run.
Expand Down
128 changes: 0 additions & 128 deletions api/v1alpha1/history_types.go

This file was deleted.

158 changes: 0 additions & 158 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading