Skip to content
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

pkg/operator: lay down ClusterOperator for MCO #386

Merged
merged 3 commits into from
Feb 9, 2019
Merged
Changes from 1 commit
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
22 changes: 11 additions & 11 deletions pkg/operator/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ func (optr *Operator) syncAll(rconfig renderConfig) error {
// syncFuncs is the list of sync functions that are executed in order.
// any error marks sync as failure but continues to next syncFunc
var syncFuncs = []syncFunc{
{ "pools", optr.syncMachineConfigPools },
{ "mcc", optr.syncMachineConfigController },
{ "mcs", optr.syncMachineConfigServer },
{ "mcd", optr.syncMachineConfigDaemon },
{ "required-pools", optr.syncRequiredMachineConfigPools },
{"pools", optr.syncMachineConfigPools},
{"mcc", optr.syncMachineConfigController},
{"mcs", optr.syncMachineConfigServer},
{"mcd", optr.syncMachineConfigDaemon},
{"required-pools", optr.syncRequiredMachineConfigPools},
}

if err := optr.syncProgressingStatus(); err != nil {
Expand Down Expand Up @@ -329,7 +329,7 @@ func (optr *Operator) syncRequiredMachineConfigPools(config renderConfig) error
return err
}
var lastErr error
if err := wait.Poll(time.Second, 5*time.Minute, func() (bool, error) {
if err := wait.Poll(time.Second, 10*time.Minute, func() (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like these timeouts may still be too short. But we can revisit that later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, the installer waits up to 30 mins anyway, we could bump up to that if needed I guess

pools, err := optr.mcpLister.List(sel)
if apierrors.IsNotFound(err) {
return false, err
Expand All @@ -355,7 +355,7 @@ func (optr *Operator) syncRequiredMachineConfigPools(config renderConfig) error
}
return true, nil
}); err != nil {
if err.Error() == wait.ErrWaitTimeout.Error() {
if err == wait.ErrWaitTimeout {
return fmt.Errorf("%v during syncRequiredMachineConfigPools: %v", err, lastErr)
}
return err
Expand All @@ -365,16 +365,16 @@ func (optr *Operator) syncRequiredMachineConfigPools(config renderConfig) error

const (
deploymentRolloutPollInterval = time.Second
deploymentRolloutTimeout = 5 * time.Minute
deploymentRolloutTimeout = 10 * time.Minute

daemonsetRolloutPollInterval = time.Second
daemonsetRolloutTimeout = 5 * time.Minute
daemonsetRolloutTimeout = 10 * time.Minute

customResourceReadyInterval = time.Second
customResourceReadyTimeout = 5 * time.Minute
customResourceReadyTimeout = 10 * time.Minute

controllerConfigCompletedInterval = time.Second
controllerConfigCompletedTimeout = time.Minute
controllerConfigCompletedTimeout = 5 * time.Minute
)

func (optr *Operator) waitForCustomResourceDefinition(resource *apiextv1beta1.CustomResourceDefinition) error {
Expand Down